VLCMedia.h 23 KB

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