VLCMedia.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671
  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. @interface VLCMedia : NSObject
  101. /* Factories */
  102. /**
  103. * Manufactures a new VLCMedia object using the URL specified.
  104. * \param anURL URL to media to be accessed.
  105. * \return A new VLCMedia object, only if there were no errors. This object will be automatically released.
  106. * \see initWithMediaURL
  107. */
  108. + (instancetype)mediaWithURL:(NSURL *)anURL;
  109. /**
  110. * Manufactures a new VLCMedia object using the path specified.
  111. * \param aPath Path to the media to be accessed.
  112. * \return A new VLCMedia object, only if there were no errors. This object will be automatically released.
  113. * \see initWithPath
  114. */
  115. + (instancetype)mediaWithPath:(NSString *)aPath;
  116. /**
  117. * convienience method to return a user-readable codec name for the given FourCC
  118. * \param fourcc the FourCC to process
  119. * \param trackType a VLC track type if known to speed-up the name search
  120. * \return a NSString containing the codec name if recognized, else an empty string
  121. */
  122. + (NSString *)codecNameForFourCC:(uint32_t)fourcc trackType:(NSString *)trackType;
  123. /**
  124. * TODO
  125. * \param aName TODO
  126. * \return a new VLCMedia object, only if there were no errors. This object
  127. * will be automatically released.
  128. * \see initAsNodeWithName
  129. */
  130. + (instancetype)mediaAsNodeWithName:(NSString *)aName;
  131. /* Initializers */
  132. /**
  133. * Initializes a new VLCMedia object to use the specified URL.
  134. * \param anURL the URL to media to be accessed.
  135. * \return A new VLCMedia object, only if there were no errors.
  136. */
  137. - (instancetype)initWithURL:(NSURL *)anURL;
  138. /**
  139. * Initializes a new VLCMedia object to use the specified path.
  140. * \param aPath Path to media to be accessed.
  141. * \return A new VLCMedia object, only if there were no errors.
  142. */
  143. - (instancetype)initWithPath:(NSString *)aPath;
  144. /**
  145. * TODO
  146. * \param aName TODO
  147. * \return A new VLCMedia object, only if there were no errors.
  148. */
  149. - (instancetype)initAsNodeWithName:(NSString *)aName;
  150. /**
  151. * list of possible media orientation.
  152. */
  153. typedef NS_ENUM(NSUInteger, VLCMediaOrientation) {
  154. VLCMediaOrientationTopLeft,
  155. VLCMediaOrientationTopRight,
  156. VLCMediaOrientationBottomLeft,
  157. VLCMediaOrientationBottomRight,
  158. VLCMediaOrientationLeftTop,
  159. VLCMediaOrientationLeftBottom,
  160. VLCMediaOrientationRightTop,
  161. VLCMediaOrientationRightBottom
  162. };
  163. /**
  164. * list of possible media projection.
  165. */
  166. typedef NS_ENUM(NSUInteger, VLCMediaProjection) {
  167. VLCMediaProjectionRectangular,
  168. VLCMediaProjectionEquiRectangular,
  169. VLCMediaProjectionCubemapLayoutStandard = 0x100
  170. };
  171. /**
  172. * list of possible media types that could be returned by "mediaType"
  173. */
  174. typedef NS_ENUM(NSUInteger, VLCMediaType) {
  175. VLCMediaTypeUnknown,
  176. VLCMediaTypeFile,
  177. VLCMediaTypeDirectory,
  178. VLCMediaTypeDisc,
  179. VLCMediaTypeStream,
  180. VLCMediaTypePlaylist,
  181. };
  182. /**
  183. * media type
  184. * \return returns the type of a media (VLCMediaType)
  185. */
  186. @property (readonly) VLCMediaType mediaType;
  187. /**
  188. * Returns an NSComparisonResult value that indicates the lexical ordering of
  189. * the receiver and a given meda.
  190. * \param media The media with which to compare with the receiver.
  191. * \return NSOrderedAscending if the URL of the receiver precedes media in
  192. * lexical ordering, NSOrderedSame if the URL of the receiver and media are
  193. * equivalent in lexical value, and NSOrderedDescending if the URL of the
  194. * receiver follows media. If media is nil, returns NSOrderedDescending.
  195. */
  196. - (NSComparisonResult)compare:(VLCMedia *)media;
  197. /* Properties */
  198. /**
  199. * Receiver's delegate.
  200. */
  201. @property (nonatomic, weak) id<VLCMediaDelegate> delegate;
  202. /**
  203. * A VLCTime object describing the length of the media resource, only if it is
  204. * available. Use lengthWaitUntilDate: to wait for a specified length of time.
  205. * \see lengthWaitUntilDate
  206. */
  207. @property (nonatomic, readwrite, strong) VLCTime * length;
  208. /**
  209. * Returns a VLCTime object describing the length of the media resource,
  210. * however, this is a blocking operation and will wait until the preparsing is
  211. * completed before returning anything.
  212. * \param aDate Time for operation to wait until, if there are no results
  213. * before specified date then nil is returned.
  214. * \return The length of the media resource, nil if it couldn't wait for it.
  215. */
  216. - (VLCTime *)lengthWaitUntilDate:(NSDate *)aDate;
  217. /**
  218. * Determines if the media has already been preparsed.
  219. * \deprecated use parseStatus instead
  220. */
  221. @property (nonatomic, readonly) BOOL isParsed __attribute__((deprecated));
  222. /**
  223. * list of possible parsed states returnable by parsedStatus
  224. */
  225. typedef NS_ENUM(unsigned, VLCMediaParsedStatus)
  226. {
  227. VLCMediaParsedStatusInit = 0,
  228. VLCMediaParsedStatusSkipped,
  229. VLCMediaParsedStatusFailed,
  230. VLCMediaParsedStatusTimeout,
  231. VLCMediaParsedStatusDone
  232. };
  233. /**
  234. * \return Returns the parse status of the media
  235. */
  236. @property (nonatomic, readonly) VLCMediaParsedStatus parsedStatus;
  237. /**
  238. * The URL for the receiver's media resource.
  239. */
  240. @property (nonatomic, readonly, strong) NSURL * url;
  241. /**
  242. * The receiver's sub list.
  243. */
  244. @property (nonatomic, readonly, strong) VLCMediaList * subitems;
  245. /**
  246. * get meta property for key
  247. * \note for performance reasons, fetching the metaDictionary will be faster!
  248. * \see metaDictionary
  249. * \see dictionary keys above
  250. */
  251. - (NSString *)metadataForKey:(NSString *)key;
  252. /**
  253. * set meta property for key
  254. * \param data the metadata to set as NSString
  255. * \param key the metadata key
  256. * \see dictionary keys above
  257. */
  258. - (void)setMetadata:(NSString *)data forKey:(NSString *)key;
  259. /**
  260. * Save the previously changed metadata
  261. * \return true if saving was successful
  262. */
  263. @property (NS_NONATOMIC_IOSONLY, readonly) BOOL saveMetadata;
  264. /**
  265. * The receiver's meta data as a NSDictionary object.
  266. */
  267. @property (nonatomic, readonly, copy) NSDictionary * metaDictionary;
  268. /**
  269. * The receiver's state, such as Playing, Error, NothingSpecial, Buffering.
  270. */
  271. @property (nonatomic, readonly) VLCMediaState state;
  272. /**
  273. * returns a bool whether is the media is expected to play fluently on this
  274. * device or not. It always returns YES on a Mac.*/
  275. @property (NS_NONATOMIC_IOSONLY, getter=isMediaSizeSuitableForDevice, readonly) BOOL mediaSizeSuitableForDevice;
  276. /**
  277. * Tracks information NSDictionary Possible Keys
  278. */
  279. /**
  280. * Codec information
  281. * \note returns a NSNumber
  282. */
  283. extern NSString *const VLCMediaTracksInformationCodec;
  284. /**
  285. * tracks information ID
  286. * \note returns a NSNumber
  287. */
  288. extern NSString *const VLCMediaTracksInformationId;
  289. /**
  290. * track information type
  291. * \note returns a NSString
  292. * \see VLCMediaTracksInformationTypeAudio
  293. * \see VLCMediaTracksInformationTypeVideo
  294. * \see VLCMediaTracksInformationTypeText
  295. * \see VLCMediaTracksInformationTypeUnknown
  296. */
  297. extern NSString *const VLCMediaTracksInformationType;
  298. /**
  299. * codec profile
  300. * \note returns a NSNumber
  301. */
  302. extern NSString *const VLCMediaTracksInformationCodecProfile;
  303. /**
  304. * codec level
  305. * \note returns a NSNumber
  306. */
  307. extern NSString *const VLCMediaTracksInformationCodecLevel;
  308. /**
  309. * track bitrate
  310. * \note returns the bitrate as NSNumber
  311. */
  312. extern NSString *const VLCMediaTracksInformationBitrate;
  313. /**
  314. * track language
  315. * \note returns the language as NSString
  316. */
  317. extern NSString *const VLCMediaTracksInformationLanguage;
  318. /**
  319. * track description
  320. * \note returns the description as NSString
  321. */
  322. extern NSString *const VLCMediaTracksInformationDescription;
  323. /**
  324. * number of audio channels of a given track
  325. * \note returns the audio channel number as NSNumber
  326. */
  327. extern NSString *const VLCMediaTracksInformationAudioChannelsNumber;
  328. /**
  329. * audio rate
  330. * \note returns the audio rate as NSNumber
  331. */
  332. extern NSString *const VLCMediaTracksInformationAudioRate;
  333. /**
  334. * video track height
  335. * \note returns the height as NSNumber
  336. */
  337. extern NSString *const VLCMediaTracksInformationVideoHeight;
  338. /**
  339. * video track width
  340. * \note the width as NSNumber
  341. */
  342. extern NSString *const VLCMediaTracksInformationVideoWidth;
  343. /**
  344. * video track orientation
  345. * \note returns the orientation as NSNumber
  346. */
  347. extern NSString *const VLCMediaTracksInformationVideoOrientation;
  348. /**
  349. * video track projection
  350. * \note the projection as NSNumber
  351. */
  352. extern NSString *const VLCMediaTracksInformationVideoProjection;
  353. /**
  354. * source aspect ratio
  355. * \note returns the source aspect ratio as NSNumber
  356. */
  357. extern NSString *const VLCMediaTracksInformationSourceAspectRatio;
  358. /**
  359. * source aspect ratio denominator
  360. * \note returns the source aspect ratio denominator as NSNumber
  361. */
  362. extern NSString *const VLCMediaTracksInformationSourceAspectRatioDenominator;
  363. /**
  364. * frame rate
  365. * \note returns the frame rate as NSNumber
  366. */
  367. extern NSString *const VLCMediaTracksInformationFrameRate;
  368. /**
  369. * frame rate denominator
  370. * \note returns the frame rate denominator as NSNumber
  371. */
  372. extern NSString *const VLCMediaTracksInformationFrameRateDenominator;
  373. /**
  374. * text encoding
  375. * \note returns the text encoding as NSString
  376. */
  377. extern NSString *const VLCMediaTracksInformationTextEncoding;
  378. /**
  379. * audio track information NSDictionary value for VLCMediaTracksInformationType
  380. */
  381. extern NSString *const VLCMediaTracksInformationTypeAudio;
  382. /**
  383. * video track information NSDictionary value for VLCMediaTracksInformationType
  384. */
  385. extern NSString *const VLCMediaTracksInformationTypeVideo;
  386. /**
  387. * text / subtitles track information NSDictionary value for VLCMediaTracksInformationType
  388. */
  389. extern NSString *const VLCMediaTracksInformationTypeText;
  390. /**
  391. * unknown track information NSDictionary value for VLCMediaTracksInformationType
  392. */
  393. extern NSString *const VLCMediaTracksInformationTypeUnknown;
  394. /**
  395. * Returns the tracks information.
  396. *
  397. * This is an array of NSDictionary representing each track.
  398. * It can contain the following keys:
  399. *
  400. * \see VLCMediaTracksInformationCodec
  401. * \see VLCMediaTracksInformationId
  402. * \see VLCMediaTracksInformationType
  403. *
  404. * \see VLCMediaTracksInformationCodecProfile
  405. * \see VLCMediaTracksInformationCodecLevel
  406. *
  407. * \see VLCMediaTracksInformationBitrate
  408. * \see VLCMediaTracksInformationLanguage
  409. * \see VLCMediaTracksInformationDescription
  410. *
  411. * \see VLCMediaTracksInformationAudioChannelsNumber
  412. * \see VLCMediaTracksInformationAudioRate
  413. *
  414. * \see VLCMediaTracksInformationVideoHeight
  415. * \see VLCMediaTracksInformationVideoWidth
  416. * \see VLCMediaTracksInformationVideoOrientation
  417. * \see VLCMediaTracksInformationVideoProjection
  418. *
  419. * \see VLCMediaTracksInformationSourceAspectRatio
  420. * \see VLCMediaTracksInformationSourceAspectRatioDenominator
  421. *
  422. * \see VLCMediaTracksInformationFrameRate
  423. * \see VLCMediaTracksInformationFrameRateDenominator
  424. *
  425. * \see VLCMediaTracksInformationTextEncoding
  426. */
  427. @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *tracksInformation;
  428. /**
  429. * Start asynchronously to parse the media.
  430. * This will attempt to fetch the meta data and tracks information.
  431. *
  432. * This is automatically done when an accessor requiring parsing
  433. * is called.
  434. *
  435. * \see -[VLCMediaDelegate mediaDidFinishParsing:]
  436. * \deprecated Use parseWithOptions: instead
  437. */
  438. - (void)parse __attribute__((deprecated));
  439. /**
  440. * Trigger a synchronous parsing of the media
  441. * the selector won't return until parsing finished
  442. *
  443. * \deprecated Use parseWithOptions: instead
  444. */
  445. - (void)synchronousParse __attribute__((deprecated));
  446. enum {
  447. VLCMediaParseLocal = 0x00,
  448. VLCMediaParseNetwork = 0x01,
  449. VLCMediaFetchLocal = 0x02,
  450. VLCMediaFetchNetwork = 0x04,
  451. };
  452. /**
  453. * enum of available options for use with parseWithOptions
  454. * \note you may pipe multiple values for the single parameter
  455. */
  456. typedef int VLCMediaParsingOptions;
  457. /**
  458. * triggers an asynchronous parse of the media item
  459. * using the given options
  460. * \param options the option mask based on VLCMediaParsingOptions
  461. * \see VLCMediaParsingOptions
  462. * \return an int. 0 on success, -1 in case of error
  463. * \note listen to the "parsed" key value or the mediaDidFinishParsing:
  464. * delegate method to be notified about parsing results. Those triggers
  465. * will _NOT_ be raised if parsing fails and this method returns an error.
  466. */
  467. - (int)parseWithOptions:(VLCMediaParsingOptions)options;
  468. /**
  469. * triggers an asynchronous parse of the media item
  470. * using the given options
  471. * \param options the option mask based on VLCMediaParsingOptions
  472. * \param timeoutValue a time-out value in milliseconds (-1 for default, 0 for infinite)
  473. * \see VLCMediaParsingOptions
  474. * \return an int. 0 on success, -1 in case of error
  475. * \note listen to the "parsed" key value or the mediaDidFinishParsing:
  476. * delegate method to be notified about parsing results. Those triggers
  477. * will _NOT_ be raised if parsing fails and this method returns an error.
  478. */
  479. - (int)parseWithOptions:(VLCMediaParsingOptions)options timeout:(int)timeoutValue;
  480. /**
  481. * Add options to the media, that will be used to determine how
  482. * VLCMediaPlayer will read the media. This allow to use VLC advanced
  483. * reading/streaming options in a per-media basis
  484. *
  485. * The options are detailed in vlc --long-help, for instance "--sout-all"
  486. * And on the web: http://wiki.videolan.org/VLC_command-line_help
  487. */
  488. - (void)addOptions:(NSDictionary*)options;
  489. /**
  490. * Parse a value of an incoming Set-Cookie header (see RFC 6265) and append the
  491. * cookie to the stored cookies if appropriate. The "secure" attribute can be added
  492. * to cookie to limit the scope of the cookie to secured channels (https).
  493. *
  494. * \note must be called before the first call of play() to
  495. * take effect. The cookie storage is only used for http/https.
  496. * \warning This method will never succeed on macOS, but requires iOS or tvOS
  497. *
  498. * \param cookie header field value of Set-Cookie: "name=value<;attributes>"
  499. * \param host host to which the cookie will be sent
  500. * \param path scope of the cookie
  501. *
  502. * \return 0 on success, -1 on error.
  503. */
  504. - (int)storeCookie:(NSString * _Nonnull)cookie
  505. forHost:(NSString * _Nonnull)host
  506. path:(NSString * _Nonnull)path;
  507. /**
  508. * Clear the stored cookies of a media.
  509. *
  510. * \note must be called before the first call of play() to
  511. * take effect. The cookie jar is only used for http/https.
  512. * \warning This method will never succeed on macOS, but requires iOS or tvOS
  513. */
  514. - (void)clearStoredCookies;
  515. /**
  516. * Getter for statistics information
  517. * Returns a NSDictionary with NSNumbers for values.
  518. *
  519. */
  520. @property (NS_NONATOMIC_IOSONLY, readonly, copy, nullable) NSDictionary *stats;
  521. #pragma mark - individual stats
  522. /**
  523. * returns the number of bytes read by the current input module
  524. * \return a NSInteger with the raw number of bytes
  525. */
  526. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfReadBytesOnInput;
  527. /**
  528. * returns the current input bitrate. may be 0 if the buffer is full
  529. * \return a float of the current input bitrate
  530. */
  531. @property (NS_NONATOMIC_IOSONLY, readonly) float inputBitrate;
  532. /**
  533. * returns the number of bytes read by the current demux module
  534. * \return a NSInteger with the raw number of bytes
  535. */
  536. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfReadBytesOnDemux;
  537. /**
  538. * returns the current demux bitrate. may be 0 if the buffer is empty
  539. * \return a float of the current demux bitrate
  540. */
  541. @property (NS_NONATOMIC_IOSONLY, readonly) float demuxBitrate;
  542. /**
  543. * returns the total number of decoded video blocks in the current media session
  544. * \return a NSInteger with the total number of decoded blocks
  545. */
  546. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfDecodedVideoBlocks;
  547. /**
  548. * returns the total number of decoded audio blocks in the current media session
  549. * \return a NSInteger with the total number of decoded blocks
  550. */
  551. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfDecodedAudioBlocks;
  552. /**
  553. * returns the total number of displayed pictures during the current media session
  554. * \return a NSInteger with the total number of displayed pictures
  555. */
  556. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfDisplayedPictures;
  557. /**
  558. * returns the total number of pictures lost during the current media session
  559. * \return a NSInteger with the total number of lost pictures
  560. */
  561. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfLostPictures;
  562. /**
  563. * returns the total number of played audio buffers during the current media session
  564. * \return a NSInteger with the total number of played audio buffers
  565. */
  566. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfPlayedAudioBuffers;
  567. /**
  568. * returns the total number of audio buffers lost during the current media session
  569. * \return a NSInteger with the total number of displayed pictures
  570. */
  571. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfLostAudioBuffers;
  572. /**
  573. * returns the total number of packets sent during the current media session
  574. * \return a NSInteger with the total number of sent packets
  575. */
  576. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfSentPackets;
  577. /**
  578. * returns the total number of raw bytes sent during the current media session
  579. * \return a NSInteger with the total number of sent bytes
  580. */
  581. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfSentBytes;
  582. /**
  583. * returns the current bitrate of sent bytes
  584. * \return a float of the current bitrate of sent bits
  585. */
  586. @property (NS_NONATOMIC_IOSONLY, readonly) float streamOutputBitrate;
  587. /**
  588. * returns the total number of corrupted data packets during current sout session
  589. * \note value is 0 on non-stream-output operations
  590. * \return a NSInteger with the total number of corrupted data packets
  591. */
  592. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfCorruptedDataPackets;
  593. /**
  594. * returns the total number of discontinuties during current sout session
  595. * \note value is 0 on non-stream-output operations
  596. * \return a NSInteger with the total number of discontinuties
  597. */
  598. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfDiscontinuties;
  599. @end
  600. NS_ASSUME_NONNULL_END