VLCMedia.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653
  1. /*****************************************************************************
  2. * VLCMedia.h: VLCKit.framework VLCMedia header
  3. *****************************************************************************
  4. * Copyright (C) 2007 Pierre d'Herbemont
  5. * Copyright (C) 2013 Felix Paul Kühne
  6. * Copyright (C) 2007-2013 VLC authors and VideoLAN
  7. * $Id$
  8. *
  9. * Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
  10. * Felix Paul Kühne <fkuehne # videolan.org>
  11. * Soomin Lee <TheHungryBu # gmail.com>
  12. *
  13. * This program is free software; you can redistribute it and/or modify it
  14. * under the terms of the GNU Lesser General Public License as published by
  15. * the Free Software Foundation; either version 2.1 of the License, or
  16. * (at your option) any later version.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU Lesser General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU Lesser General Public License
  24. * along with this program; if not, write to the Free Software Foundation,
  25. * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  26. *****************************************************************************/
  27. #import <Foundation/Foundation.h>
  28. #import "VLCMediaList.h"
  29. #import "VLCTime.h"
  30. NS_ASSUME_NONNULL_BEGIN
  31. /* Meta Dictionary Keys */
  32. /**
  33. * Standard dictionary keys for retreiving meta data.
  34. */
  35. extern NSString *const VLCMetaInformationTitle; /* NSString */
  36. extern NSString *const VLCMetaInformationArtist; /* NSString */
  37. extern NSString *const VLCMetaInformationGenre; /* NSString */
  38. extern NSString *const VLCMetaInformationCopyright; /* NSString */
  39. extern NSString *const VLCMetaInformationAlbum; /* NSString */
  40. extern NSString *const VLCMetaInformationTrackNumber; /* NSString */
  41. extern NSString *const VLCMetaInformationDescription; /* NSString */
  42. extern NSString *const VLCMetaInformationRating; /* NSString */
  43. extern NSString *const VLCMetaInformationDate; /* NSString */
  44. extern NSString *const VLCMetaInformationSetting; /* NSString */
  45. extern NSString *const VLCMetaInformationURL; /* NSString */
  46. extern NSString *const VLCMetaInformationLanguage; /* NSString */
  47. extern NSString *const VLCMetaInformationNowPlaying; /* NSString */
  48. extern NSString *const VLCMetaInformationPublisher; /* NSString */
  49. extern NSString *const VLCMetaInformationEncodedBy; /* NSString */
  50. extern NSString *const VLCMetaInformationArtworkURL; /* NSString */
  51. extern NSString *const VLCMetaInformationArtwork; /* NSImage */
  52. extern NSString *const VLCMetaInformationTrackID; /* NSString */
  53. extern NSString *const VLCMetaInformationTrackTotal; /* NSString */
  54. extern NSString *const VLCMetaInformationDirector; /* NSString */
  55. extern NSString *const VLCMetaInformationSeason; /* NSString */
  56. extern NSString *const VLCMetaInformationEpisode; /* NSString */
  57. extern NSString *const VLCMetaInformationShowName; /* NSString */
  58. extern NSString *const VLCMetaInformationActors; /* NSString */
  59. extern NSString *const VLCMetaInformationAlbumArtist; /* NSString */
  60. extern NSString *const VLCMetaInformationDiscNumber; /* NSString */
  61. /* Notification Messages */
  62. /**
  63. * Available notification messages.
  64. */
  65. extern NSString *const VLCMediaMetaChanged; ///< Notification message for when the media's meta data has changed
  66. // Forward declarations, supresses compiler error messages
  67. @class VLCMediaList;
  68. @class VLCMedia;
  69. typedef NS_ENUM(NSInteger, VLCMediaState) {
  70. VLCMediaStateNothingSpecial, ///< Nothing
  71. VLCMediaStateBuffering, ///< Stream is buffering
  72. VLCMediaStatePlaying, ///< Stream is playing
  73. VLCMediaStateError, ///< Can't be played because an error occurred
  74. };
  75. /**
  76. * Informal protocol declaration for VLCMedia delegates. Allows data changes to be
  77. * trapped.
  78. */
  79. @protocol VLCMediaDelegate <NSObject>
  80. @optional
  81. /**
  82. * Delegate method called whenever the media's meta data was changed for whatever reason
  83. * \note this is called more often than mediaDidFinishParsing, so it may be less efficient
  84. * \param aMedia The media resource whose meta data has been changed.
  85. */
  86. - (void)mediaMetaDataDidChange:(VLCMedia *)aMedia;
  87. /**
  88. * Delegate method called whenever the media was parsed.
  89. * \param aMedia The media resource whose meta data has been changed.
  90. */
  91. - (void)mediaDidFinishParsing:(VLCMedia *)aMedia;
  92. @end
  93. /**
  94. * Defines files and streams as a managed object. Each media object can be
  95. * administered seperately. VLCMediaPlayer or VLCMediaList must be used
  96. * to execute the appropriate playback functions.
  97. * \see VLCMediaPlayer
  98. * \see VLCMediaList
  99. */
  100. OBJC_VISIBLE
  101. @interface VLCMedia : NSObject
  102. /* Factories */
  103. /**
  104. * Manufactures a new VLCMedia object using the URL specified.
  105. * \param anURL URL to media to be accessed.
  106. * \return A new VLCMedia object, only if there were no errors. This object will be automatically released.
  107. * \see initWithMediaURL
  108. */
  109. + (instancetype)mediaWithURL:(NSURL *)anURL;
  110. /**
  111. * Manufactures a new VLCMedia object using the path specified.
  112. * \param aPath Path to the media to be accessed.
  113. * \return A new VLCMedia object, only if there were no errors. This object will be automatically released.
  114. * \see initWithPath
  115. */
  116. + (instancetype)mediaWithPath:(NSString *)aPath;
  117. /**
  118. * convienience method to return a user-readable codec name for the given FourCC
  119. * \param fourcc the FourCC to process
  120. * \param trackType a VLC track type if known to speed-up the name search
  121. * \return a NSString containing the codec name if recognized, else an empty string
  122. */
  123. + (NSString *)codecNameForFourCC:(uint32_t)fourcc trackType:(NSString *)trackType;
  124. /**
  125. * TODO
  126. * \param aName TODO
  127. * \return a new VLCMedia object, only if there were no errors. This object
  128. * will be automatically released.
  129. * \see initAsNodeWithName
  130. */
  131. + (instancetype)mediaAsNodeWithName:(NSString *)aName;
  132. /* Initializers */
  133. /**
  134. * Initializes a new VLCMedia object to use the specified URL.
  135. * \param anURL the URL to media to be accessed.
  136. * \return A new VLCMedia object, only if there were no errors.
  137. */
  138. - (instancetype)initWithURL:(NSURL *)anURL;
  139. /**
  140. * Initializes a new VLCMedia object to use the specified path.
  141. * \param aPath Path to media to be accessed.
  142. * \return A new VLCMedia object, only if there were no errors.
  143. */
  144. - (instancetype)initWithPath:(NSString *)aPath;
  145. /**
  146. * Initializes a new VLCMedia object to use an input stream.
  147. *
  148. * \note By default, NSStream instances that are not file-based are non-seekable,
  149. * you may subclass NSInputStream whose instances are capable of seeking through a stream.
  150. * This subclass must allow setting NSStreamFileCurrentOffsetKey property.
  151. * \note VLCMedia will open stream if it is not already opened, and will close eventually.
  152. * You can't pass an already closed input stream.
  153. * \param stream Input stream for media to be accessed.
  154. * \return A new VLCMedia object, only if there were no errors.
  155. */
  156. - (instancetype)initWithStream:(NSInputStream *)stream;
  157. /**
  158. * TODO
  159. * \param aName TODO
  160. * \return A new VLCMedia object, only if there were no errors.
  161. */
  162. - (instancetype)initAsNodeWithName:(NSString *)aName;
  163. /**
  164. * list of possible media orientation.
  165. */
  166. typedef NS_ENUM(NSUInteger, VLCMediaOrientation) {
  167. VLCMediaOrientationTopLeft,
  168. VLCMediaOrientationTopRight,
  169. VLCMediaOrientationBottomLeft,
  170. VLCMediaOrientationBottomRight,
  171. VLCMediaOrientationLeftTop,
  172. VLCMediaOrientationLeftBottom,
  173. VLCMediaOrientationRightTop,
  174. VLCMediaOrientationRightBottom
  175. };
  176. /**
  177. * list of possible media projection.
  178. */
  179. typedef NS_ENUM(NSUInteger, VLCMediaProjection) {
  180. VLCMediaProjectionRectangular,
  181. VLCMediaProjectionEquiRectangular,
  182. VLCMediaProjectionCubemapLayoutStandard = 0x100
  183. };
  184. /**
  185. * list of possible media types that could be returned by "mediaType"
  186. */
  187. typedef NS_ENUM(NSUInteger, VLCMediaType) {
  188. VLCMediaTypeUnknown,
  189. VLCMediaTypeFile,
  190. VLCMediaTypeDirectory,
  191. VLCMediaTypeDisc,
  192. VLCMediaTypeStream,
  193. VLCMediaTypePlaylist,
  194. };
  195. /**
  196. * media type
  197. * \return returns the type of a media (VLCMediaType)
  198. */
  199. @property (readonly) VLCMediaType mediaType;
  200. /**
  201. * Returns an NSComparisonResult value that indicates the lexical ordering of
  202. * the receiver and a given meda.
  203. * \param media The media with which to compare with the receiver.
  204. * \return NSOrderedAscending if the URL of the receiver precedes media in
  205. * lexical ordering, NSOrderedSame if the URL of the receiver and media are
  206. * equivalent in lexical value, and NSOrderedDescending if the URL of the
  207. * receiver follows media. If media is nil, returns NSOrderedDescending.
  208. */
  209. - (NSComparisonResult)compare:(VLCMedia *)media;
  210. /* Properties */
  211. /**
  212. * Receiver's delegate.
  213. */
  214. @property (nonatomic, weak) id<VLCMediaDelegate> delegate;
  215. /**
  216. * A VLCTime object describing the length of the media resource, only if it is
  217. * available. Use lengthWaitUntilDate: to wait for a specified length of time.
  218. * \see lengthWaitUntilDate
  219. */
  220. @property (nonatomic, readwrite, strong) VLCTime * length;
  221. /**
  222. * Returns a VLCTime object describing the length of the media resource,
  223. * however, this is a blocking operation and will wait until the preparsing is
  224. * completed before returning anything.
  225. * \param aDate Time for operation to wait until, if there are no results
  226. * before specified date then nil is returned.
  227. * \return The length of the media resource, nil if it couldn't wait for it.
  228. */
  229. - (VLCTime *)lengthWaitUntilDate:(NSDate *)aDate;
  230. /**
  231. * list of possible parsed states returnable by parsedStatus
  232. */
  233. typedef NS_ENUM(unsigned, VLCMediaParsedStatus)
  234. {
  235. VLCMediaParsedStatusInit = 0,
  236. VLCMediaParsedStatusSkipped,
  237. VLCMediaParsedStatusFailed,
  238. VLCMediaParsedStatusTimeout,
  239. VLCMediaParsedStatusDone
  240. };
  241. /**
  242. * \return Returns the parse status of the media
  243. */
  244. @property (nonatomic, readonly) VLCMediaParsedStatus parsedStatus;
  245. /**
  246. * The URL for the receiver's media resource.
  247. */
  248. @property (nonatomic, readonly, strong) NSURL * url;
  249. /**
  250. * The receiver's sub list.
  251. */
  252. @property (nonatomic, readonly, strong) VLCMediaList * subitems;
  253. /**
  254. * get meta property for key
  255. * \note for performance reasons, fetching the metaDictionary will be faster!
  256. * \see metaDictionary
  257. * \see dictionary keys above
  258. */
  259. - (NSString *)metadataForKey:(NSString *)key;
  260. /**
  261. * set meta property for key
  262. * \param data the metadata to set as NSString
  263. * \param key the metadata key
  264. * \see dictionary keys above
  265. */
  266. - (void)setMetadata:(NSString *)data forKey:(NSString *)key;
  267. /**
  268. * Save the previously changed metadata
  269. * \return true if saving was successful
  270. */
  271. @property (NS_NONATOMIC_IOSONLY, readonly) BOOL saveMetadata;
  272. /**
  273. * The receiver's meta data as a NSDictionary object.
  274. */
  275. @property (nonatomic, readonly, copy) NSDictionary * metaDictionary;
  276. /**
  277. * The receiver's state, such as Playing, Error, NothingSpecial, Buffering.
  278. */
  279. @property (nonatomic, readonly) VLCMediaState state;
  280. /**
  281. * returns a bool whether is the media is expected to play fluently on this
  282. * device or not. It always returns YES on a Mac.*/
  283. @property (NS_NONATOMIC_IOSONLY, getter=isMediaSizeSuitableForDevice, readonly) BOOL mediaSizeSuitableForDevice;
  284. /**
  285. * Tracks information NSDictionary Possible Keys
  286. */
  287. /**
  288. * Codec information
  289. * \note returns a NSNumber
  290. */
  291. extern NSString *const VLCMediaTracksInformationCodec;
  292. /**
  293. * tracks information ID
  294. * \note returns a NSNumber
  295. */
  296. extern NSString *const VLCMediaTracksInformationId;
  297. /**
  298. * track information type
  299. * \note returns a NSString
  300. * \see VLCMediaTracksInformationTypeAudio
  301. * \see VLCMediaTracksInformationTypeVideo
  302. * \see VLCMediaTracksInformationTypeText
  303. * \see VLCMediaTracksInformationTypeUnknown
  304. */
  305. extern NSString *const VLCMediaTracksInformationType;
  306. /**
  307. * codec profile
  308. * \note returns a NSNumber
  309. */
  310. extern NSString *const VLCMediaTracksInformationCodecProfile;
  311. /**
  312. * codec level
  313. * \note returns a NSNumber
  314. */
  315. extern NSString *const VLCMediaTracksInformationCodecLevel;
  316. /**
  317. * track bitrate
  318. * \note returns the bitrate as NSNumber
  319. */
  320. extern NSString *const VLCMediaTracksInformationBitrate;
  321. /**
  322. * track language
  323. * \note returns the language as NSString
  324. */
  325. extern NSString *const VLCMediaTracksInformationLanguage;
  326. /**
  327. * track description
  328. * \note returns the description as NSString
  329. */
  330. extern NSString *const VLCMediaTracksInformationDescription;
  331. /**
  332. * number of audio channels of a given track
  333. * \note returns the audio channel number as NSNumber
  334. */
  335. extern NSString *const VLCMediaTracksInformationAudioChannelsNumber;
  336. /**
  337. * audio rate
  338. * \note returns the audio rate as NSNumber
  339. */
  340. extern NSString *const VLCMediaTracksInformationAudioRate;
  341. /**
  342. * video track height
  343. * \note returns the height as NSNumber
  344. */
  345. extern NSString *const VLCMediaTracksInformationVideoHeight;
  346. /**
  347. * video track width
  348. * \note the width as NSNumber
  349. */
  350. extern NSString *const VLCMediaTracksInformationVideoWidth;
  351. /**
  352. * video track orientation
  353. * \note returns the orientation as NSNumber
  354. */
  355. extern NSString *const VLCMediaTracksInformationVideoOrientation;
  356. /**
  357. * video track projection
  358. * \note the projection as NSNumber
  359. */
  360. extern NSString *const VLCMediaTracksInformationVideoProjection;
  361. /**
  362. * source aspect ratio
  363. * \note returns the source aspect ratio as NSNumber
  364. */
  365. extern NSString *const VLCMediaTracksInformationSourceAspectRatio;
  366. /**
  367. * source aspect ratio denominator
  368. * \note returns the source aspect ratio denominator as NSNumber
  369. */
  370. extern NSString *const VLCMediaTracksInformationSourceAspectRatioDenominator;
  371. /**
  372. * frame rate
  373. * \note returns the frame rate as NSNumber
  374. */
  375. extern NSString *const VLCMediaTracksInformationFrameRate;
  376. /**
  377. * frame rate denominator
  378. * \note returns the frame rate denominator as NSNumber
  379. */
  380. extern NSString *const VLCMediaTracksInformationFrameRateDenominator;
  381. /**
  382. * text encoding
  383. * \note returns the text encoding as NSString
  384. */
  385. extern NSString *const VLCMediaTracksInformationTextEncoding;
  386. /**
  387. * audio track information NSDictionary value for VLCMediaTracksInformationType
  388. */
  389. extern NSString *const VLCMediaTracksInformationTypeAudio;
  390. /**
  391. * video track information NSDictionary value for VLCMediaTracksInformationType
  392. */
  393. extern NSString *const VLCMediaTracksInformationTypeVideo;
  394. /**
  395. * text / subtitles track information NSDictionary value for VLCMediaTracksInformationType
  396. */
  397. extern NSString *const VLCMediaTracksInformationTypeText;
  398. /**
  399. * unknown track information NSDictionary value for VLCMediaTracksInformationType
  400. */
  401. extern NSString *const VLCMediaTracksInformationTypeUnknown;
  402. /**
  403. * Returns the tracks information.
  404. *
  405. * This is an array of NSDictionary representing each track.
  406. * It can contain the following keys:
  407. *
  408. * \see VLCMediaTracksInformationCodec
  409. * \see VLCMediaTracksInformationId
  410. * \see VLCMediaTracksInformationType
  411. *
  412. * \see VLCMediaTracksInformationCodecProfile
  413. * \see VLCMediaTracksInformationCodecLevel
  414. *
  415. * \see VLCMediaTracksInformationBitrate
  416. * \see VLCMediaTracksInformationLanguage
  417. * \see VLCMediaTracksInformationDescription
  418. *
  419. * \see VLCMediaTracksInformationAudioChannelsNumber
  420. * \see VLCMediaTracksInformationAudioRate
  421. *
  422. * \see VLCMediaTracksInformationVideoHeight
  423. * \see VLCMediaTracksInformationVideoWidth
  424. * \see VLCMediaTracksInformationVideoOrientation
  425. * \see VLCMediaTracksInformationVideoProjection
  426. *
  427. * \see VLCMediaTracksInformationSourceAspectRatio
  428. * \see VLCMediaTracksInformationSourceAspectRatioDenominator
  429. *
  430. * \see VLCMediaTracksInformationFrameRate
  431. * \see VLCMediaTracksInformationFrameRateDenominator
  432. *
  433. * \see VLCMediaTracksInformationTextEncoding
  434. */
  435. @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *tracksInformation;
  436. enum {
  437. VLCMediaParseLocal = 0x00, ///< Parse media if it's a local file
  438. VLCMediaParseNetwork = 0x01, ///< Parse media even if it's a network file
  439. VLCMediaFetchLocal = 0x02, ///< Fetch meta and covert art using local resources
  440. VLCMediaFetchNetwork = 0x04, ///< Fetch meta and covert art using network resources
  441. VLCMediaDoInteract = 0x08, ///< Interact with the user when preparsing this item (and not its sub items). Set this flag in order to receive a callback when the input is asking for credentials.
  442. };
  443. /**
  444. * enum of available options for use with parseWithOptions
  445. * \note you may pipe multiple values for the single parameter
  446. */
  447. typedef int VLCMediaParsingOptions;
  448. /**
  449. * triggers an asynchronous parse of the media item
  450. * using the given options
  451. * \param options the option mask based on VLCMediaParsingOptions
  452. * \see VLCMediaParsingOptions
  453. * \return an int. 0 on success, -1 in case of error
  454. * \note listen to the "parsed" key value or the mediaDidFinishParsing:
  455. * delegate method to be notified about parsing results. Those triggers
  456. * will _NOT_ be raised if parsing fails and this method returns an error.
  457. */
  458. - (int)parseWithOptions:(VLCMediaParsingOptions)options;
  459. /**
  460. * triggers an asynchronous parse of the media item
  461. * using the given options
  462. * \param options the option mask based on VLCMediaParsingOptions
  463. * \param timeoutValue a time-out value in milliseconds (-1 for default, 0 for infinite)
  464. * \see VLCMediaParsingOptions
  465. * \return an int. 0 on success, -1 in case of error
  466. * \note listen to the "parsed" key value or the mediaDidFinishParsing:
  467. * delegate method to be notified about parsing results. Those triggers
  468. * will _NOT_ be raised if parsing fails and this method returns an error.
  469. */
  470. - (int)parseWithOptions:(VLCMediaParsingOptions)options timeout:(int)timeoutValue;
  471. /**
  472. * Stop the parsing of the media
  473. *
  474. * When the media parsing is stopped, the mediaDidFinishParsing will
  475. * be sent with the VLCMediaParsedStatusTimeout status.
  476. */
  477. - (void)parseStop;
  478. /**
  479. * Add options to the media, that will be used to determine how
  480. * VLCMediaPlayer will read the media. This allow to use VLC advanced
  481. * reading/streaming options in a per-media basis
  482. *
  483. * The options are detailed in vlc --long-help, for instance "--sout-all"
  484. * And on the web: http://wiki.videolan.org/VLC_command-line_help
  485. */
  486. - (void)addOption:(NSString *)option;
  487. - (void)addOptions:(NSDictionary*)options;
  488. /**
  489. * Parse a value of an incoming Set-Cookie header (see RFC 6265) and append the
  490. * cookie to the stored cookies if appropriate. The "secure" attribute can be added
  491. * to cookie to limit the scope of the cookie to secured channels (https).
  492. *
  493. * \note must be called before the first call of play() to
  494. * take effect. The cookie storage is only used for http/https.
  495. * \warning This method will never succeed on macOS, but requires iOS or tvOS
  496. *
  497. * \param cookie header field value of Set-Cookie: "name=value<;attributes>"
  498. * \param host host to which the cookie will be sent
  499. * \param path scope of the cookie
  500. *
  501. * \return 0 on success, -1 on error.
  502. */
  503. - (int)storeCookie:(NSString * _Nonnull)cookie
  504. forHost:(NSString * _Nonnull)host
  505. path:(NSString * _Nonnull)path;
  506. /**
  507. * Clear the stored cookies of a media.
  508. *
  509. * \note must be called before the first call of play() to
  510. * take effect. The cookie jar is only used for http/https.
  511. * \warning This method will never succeed on macOS, but requires iOS or tvOS
  512. */
  513. - (void)clearStoredCookies;
  514. /**
  515. * Getter for statistics information
  516. * Returns a NSDictionary with NSNumbers for values.
  517. *
  518. */
  519. @property (NS_NONATOMIC_IOSONLY, readonly, copy, nullable) NSDictionary *stats;
  520. #pragma mark - individual stats
  521. /**
  522. * returns the number of bytes read by the current input module
  523. * \return a NSInteger with the raw number of bytes
  524. */
  525. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfReadBytesOnInput;
  526. /**
  527. * returns the current input bitrate. may be 0 if the buffer is full
  528. * \return a float of the current input bitrate
  529. */
  530. @property (NS_NONATOMIC_IOSONLY, readonly) float inputBitrate;
  531. /**
  532. * returns the number of bytes read by the current demux module
  533. * \return a NSInteger with the raw number of bytes
  534. */
  535. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfReadBytesOnDemux;
  536. /**
  537. * returns the current demux bitrate. may be 0 if the buffer is empty
  538. * \return a float of the current demux bitrate
  539. */
  540. @property (NS_NONATOMIC_IOSONLY, readonly) float demuxBitrate;
  541. /**
  542. * returns the total number of decoded video blocks in the current media session
  543. * \return a NSInteger with the total number of decoded blocks
  544. */
  545. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfDecodedVideoBlocks;
  546. /**
  547. * returns the total number of decoded audio blocks in the current media session
  548. * \return a NSInteger with the total number of decoded blocks
  549. */
  550. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfDecodedAudioBlocks;
  551. /**
  552. * returns the total number of displayed pictures during the current media session
  553. * \return a NSInteger with the total number of displayed pictures
  554. */
  555. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfDisplayedPictures;
  556. /**
  557. * returns the total number of pictures lost during the current media session
  558. * \return a NSInteger with the total number of lost pictures
  559. */
  560. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfLostPictures;
  561. /**
  562. * returns the total number of played audio buffers during the current media session
  563. * \return a NSInteger with the total number of played audio buffers
  564. */
  565. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfPlayedAudioBuffers;
  566. /**
  567. * returns the total number of audio buffers lost during the current media session
  568. * \return a NSInteger with the total number of displayed pictures
  569. */
  570. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfLostAudioBuffers;
  571. /**
  572. * returns the total number of corrupted data packets during current sout session
  573. * \note value is 0 on non-stream-output operations
  574. * \return a NSInteger with the total number of corrupted data packets
  575. */
  576. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfCorruptedDataPackets;
  577. /**
  578. * returns the total number of discontinuties during current sout session
  579. * \note value is 0 on non-stream-output operations
  580. * \return a NSInteger with the total number of discontinuties
  581. */
  582. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfDiscontinuties;
  583. @end
  584. NS_ASSUME_NONNULL_END