VLCMedia.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  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. * Determines if the media has already been preparsed.
  231. * \deprecated use parseStatus instead
  232. */
  233. @property (nonatomic, readonly) BOOL isParsed __attribute__((deprecated));
  234. /**
  235. * list of possible parsed states returnable by parsedStatus
  236. */
  237. typedef NS_ENUM(unsigned, VLCMediaParsedStatus)
  238. {
  239. VLCMediaParsedStatusInit = 0,
  240. VLCMediaParsedStatusSkipped,
  241. VLCMediaParsedStatusFailed,
  242. VLCMediaParsedStatusTimeout,
  243. VLCMediaParsedStatusDone
  244. };
  245. /**
  246. * \return Returns the parse status of the media
  247. */
  248. @property (nonatomic, readonly) VLCMediaParsedStatus parsedStatus;
  249. /**
  250. * The URL for the receiver's media resource.
  251. */
  252. @property (nonatomic, readonly, strong) NSURL * url;
  253. /**
  254. * The receiver's sub list.
  255. */
  256. @property (nonatomic, readonly, strong) VLCMediaList * subitems;
  257. /**
  258. * get meta property for key
  259. * \note for performance reasons, fetching the metaDictionary will be faster!
  260. * \see metaDictionary
  261. * \see dictionary keys above
  262. */
  263. - (NSString *)metadataForKey:(NSString *)key;
  264. /**
  265. * set meta property for key
  266. * \param data the metadata to set as NSString
  267. * \param key the metadata key
  268. * \see dictionary keys above
  269. */
  270. - (void)setMetadata:(NSString *)data forKey:(NSString *)key;
  271. /**
  272. * Save the previously changed metadata
  273. * \return true if saving was successful
  274. */
  275. @property (NS_NONATOMIC_IOSONLY, readonly) BOOL saveMetadata;
  276. /**
  277. * The receiver's meta data as a NSDictionary object.
  278. */
  279. @property (nonatomic, readonly, copy) NSDictionary * metaDictionary;
  280. /**
  281. * The receiver's state, such as Playing, Error, NothingSpecial, Buffering.
  282. */
  283. @property (nonatomic, readonly) VLCMediaState state;
  284. /**
  285. * returns a bool whether is the media is expected to play fluently on this
  286. * device or not. It always returns YES on a Mac.*/
  287. @property (NS_NONATOMIC_IOSONLY, getter=isMediaSizeSuitableForDevice, readonly) BOOL mediaSizeSuitableForDevice;
  288. /**
  289. * Tracks information NSDictionary Possible Keys
  290. */
  291. /**
  292. * Codec information
  293. * \note returns a NSNumber
  294. */
  295. extern NSString *const VLCMediaTracksInformationCodec;
  296. /**
  297. * tracks information ID
  298. * \note returns a NSNumber
  299. */
  300. extern NSString *const VLCMediaTracksInformationId;
  301. /**
  302. * track information type
  303. * \note returns a NSString
  304. * \see VLCMediaTracksInformationTypeAudio
  305. * \see VLCMediaTracksInformationTypeVideo
  306. * \see VLCMediaTracksInformationTypeText
  307. * \see VLCMediaTracksInformationTypeUnknown
  308. */
  309. extern NSString *const VLCMediaTracksInformationType;
  310. /**
  311. * codec profile
  312. * \note returns a NSNumber
  313. */
  314. extern NSString *const VLCMediaTracksInformationCodecProfile;
  315. /**
  316. * codec level
  317. * \note returns a NSNumber
  318. */
  319. extern NSString *const VLCMediaTracksInformationCodecLevel;
  320. /**
  321. * track bitrate
  322. * \note returns the bitrate as NSNumber
  323. */
  324. extern NSString *const VLCMediaTracksInformationBitrate;
  325. /**
  326. * track language
  327. * \note returns the language as NSString
  328. */
  329. extern NSString *const VLCMediaTracksInformationLanguage;
  330. /**
  331. * track description
  332. * \note returns the description as NSString
  333. */
  334. extern NSString *const VLCMediaTracksInformationDescription;
  335. /**
  336. * number of audio channels of a given track
  337. * \note returns the audio channel number as NSNumber
  338. */
  339. extern NSString *const VLCMediaTracksInformationAudioChannelsNumber;
  340. /**
  341. * audio rate
  342. * \note returns the audio rate as NSNumber
  343. */
  344. extern NSString *const VLCMediaTracksInformationAudioRate;
  345. /**
  346. * video track height
  347. * \note returns the height as NSNumber
  348. */
  349. extern NSString *const VLCMediaTracksInformationVideoHeight;
  350. /**
  351. * video track width
  352. * \note the width as NSNumber
  353. */
  354. extern NSString *const VLCMediaTracksInformationVideoWidth;
  355. /**
  356. * video track orientation
  357. * \note returns the orientation as NSNumber
  358. */
  359. extern NSString *const VLCMediaTracksInformationVideoOrientation;
  360. /**
  361. * video track projection
  362. * \note the projection as NSNumber
  363. */
  364. extern NSString *const VLCMediaTracksInformationVideoProjection;
  365. /**
  366. * source aspect ratio
  367. * \note returns the source aspect ratio as NSNumber
  368. */
  369. extern NSString *const VLCMediaTracksInformationSourceAspectRatio;
  370. /**
  371. * source aspect ratio denominator
  372. * \note returns the source aspect ratio denominator as NSNumber
  373. */
  374. extern NSString *const VLCMediaTracksInformationSourceAspectRatioDenominator;
  375. /**
  376. * frame rate
  377. * \note returns the frame rate as NSNumber
  378. */
  379. extern NSString *const VLCMediaTracksInformationFrameRate;
  380. /**
  381. * frame rate denominator
  382. * \note returns the frame rate denominator as NSNumber
  383. */
  384. extern NSString *const VLCMediaTracksInformationFrameRateDenominator;
  385. /**
  386. * text encoding
  387. * \note returns the text encoding as NSString
  388. */
  389. extern NSString *const VLCMediaTracksInformationTextEncoding;
  390. /**
  391. * audio track information NSDictionary value for VLCMediaTracksInformationType
  392. */
  393. extern NSString *const VLCMediaTracksInformationTypeAudio;
  394. /**
  395. * video track information NSDictionary value for VLCMediaTracksInformationType
  396. */
  397. extern NSString *const VLCMediaTracksInformationTypeVideo;
  398. /**
  399. * text / subtitles track information NSDictionary value for VLCMediaTracksInformationType
  400. */
  401. extern NSString *const VLCMediaTracksInformationTypeText;
  402. /**
  403. * unknown track information NSDictionary value for VLCMediaTracksInformationType
  404. */
  405. extern NSString *const VLCMediaTracksInformationTypeUnknown;
  406. /**
  407. * Returns the tracks information.
  408. *
  409. * This is an array of NSDictionary representing each track.
  410. * It can contain the following keys:
  411. *
  412. * \see VLCMediaTracksInformationCodec
  413. * \see VLCMediaTracksInformationId
  414. * \see VLCMediaTracksInformationType
  415. *
  416. * \see VLCMediaTracksInformationCodecProfile
  417. * \see VLCMediaTracksInformationCodecLevel
  418. *
  419. * \see VLCMediaTracksInformationBitrate
  420. * \see VLCMediaTracksInformationLanguage
  421. * \see VLCMediaTracksInformationDescription
  422. *
  423. * \see VLCMediaTracksInformationAudioChannelsNumber
  424. * \see VLCMediaTracksInformationAudioRate
  425. *
  426. * \see VLCMediaTracksInformationVideoHeight
  427. * \see VLCMediaTracksInformationVideoWidth
  428. * \see VLCMediaTracksInformationVideoOrientation
  429. * \see VLCMediaTracksInformationVideoProjection
  430. *
  431. * \see VLCMediaTracksInformationSourceAspectRatio
  432. * \see VLCMediaTracksInformationSourceAspectRatioDenominator
  433. *
  434. * \see VLCMediaTracksInformationFrameRate
  435. * \see VLCMediaTracksInformationFrameRateDenominator
  436. *
  437. * \see VLCMediaTracksInformationTextEncoding
  438. */
  439. @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *tracksInformation;
  440. /**
  441. * Start asynchronously to parse the media.
  442. * This will attempt to fetch the meta data and tracks information.
  443. *
  444. * This is automatically done when an accessor requiring parsing
  445. * is called.
  446. *
  447. * \see -[VLCMediaDelegate mediaDidFinishParsing:]
  448. * \deprecated Use parseWithOptions: instead
  449. */
  450. - (void)parse __attribute__((deprecated));
  451. /**
  452. * Trigger a synchronous parsing of the media
  453. * the selector won't return until parsing finished
  454. *
  455. * \deprecated Use parseWithOptions: instead
  456. */
  457. - (void)synchronousParse __attribute__((deprecated));
  458. enum {
  459. VLCMediaParseLocal = 0x00,
  460. VLCMediaParseNetwork = 0x01,
  461. VLCMediaFetchLocal = 0x02,
  462. VLCMediaFetchNetwork = 0x04,
  463. };
  464. /**
  465. * enum of available options for use with parseWithOptions
  466. * \note you may pipe multiple values for the single parameter
  467. */
  468. typedef int VLCMediaParsingOptions;
  469. /**
  470. * triggers an asynchronous parse of the media item
  471. * using the given options
  472. * \param options the option mask based on VLCMediaParsingOptions
  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;
  480. /**
  481. * triggers an asynchronous parse of the media item
  482. * using the given options
  483. * \param options the option mask based on VLCMediaParsingOptions
  484. * \param timeoutValue a time-out value in milliseconds (-1 for default, 0 for infinite)
  485. * \see VLCMediaParsingOptions
  486. * \return an int. 0 on success, -1 in case of error
  487. * \note listen to the "parsed" key value or the mediaDidFinishParsing:
  488. * delegate method to be notified about parsing results. Those triggers
  489. * will _NOT_ be raised if parsing fails and this method returns an error.
  490. */
  491. - (int)parseWithOptions:(VLCMediaParsingOptions)options timeout:(int)timeoutValue;
  492. /**
  493. * Add options to the media, that will be used to determine how
  494. * VLCMediaPlayer will read the media. This allow to use VLC advanced
  495. * reading/streaming options in a per-media basis
  496. *
  497. * The options are detailed in vlc --long-help, for instance "--sout-all"
  498. * And on the web: http://wiki.videolan.org/VLC_command-line_help
  499. */
  500. - (void)addOptions:(NSDictionary*)options;
  501. /**
  502. * Parse a value of an incoming Set-Cookie header (see RFC 6265) and append the
  503. * cookie to the stored cookies if appropriate. The "secure" attribute can be added
  504. * to cookie to limit the scope of the cookie to secured channels (https).
  505. *
  506. * \note must be called before the first call of play() to
  507. * take effect. The cookie storage is only used for http/https.
  508. * \warning This method will never succeed on macOS, but requires iOS or tvOS
  509. *
  510. * \param cookie header field value of Set-Cookie: "name=value<;attributes>"
  511. * \param host host to which the cookie will be sent
  512. * \param path scope of the cookie
  513. *
  514. * \return 0 on success, -1 on error.
  515. */
  516. - (int)storeCookie:(NSString * _Nonnull)cookie
  517. forHost:(NSString * _Nonnull)host
  518. path:(NSString * _Nonnull)path;
  519. /**
  520. * Clear the stored cookies of a media.
  521. *
  522. * \note must be called before the first call of play() to
  523. * take effect. The cookie jar is only used for http/https.
  524. * \warning This method will never succeed on macOS, but requires iOS or tvOS
  525. */
  526. - (void)clearStoredCookies;
  527. /**
  528. * Getter for statistics information
  529. * Returns a NSDictionary with NSNumbers for values.
  530. *
  531. */
  532. @property (NS_NONATOMIC_IOSONLY, readonly, copy, nullable) NSDictionary *stats;
  533. #pragma mark - individual stats
  534. /**
  535. * returns the number of bytes read by the current input module
  536. * \return a NSInteger with the raw number of bytes
  537. */
  538. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfReadBytesOnInput;
  539. /**
  540. * returns the current input bitrate. may be 0 if the buffer is full
  541. * \return a float of the current input bitrate
  542. */
  543. @property (NS_NONATOMIC_IOSONLY, readonly) float inputBitrate;
  544. /**
  545. * returns the number of bytes read by the current demux module
  546. * \return a NSInteger with the raw number of bytes
  547. */
  548. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfReadBytesOnDemux;
  549. /**
  550. * returns the current demux bitrate. may be 0 if the buffer is empty
  551. * \return a float of the current demux bitrate
  552. */
  553. @property (NS_NONATOMIC_IOSONLY, readonly) float demuxBitrate;
  554. /**
  555. * returns the total number of decoded video blocks in the current media session
  556. * \return a NSInteger with the total number of decoded blocks
  557. */
  558. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfDecodedVideoBlocks;
  559. /**
  560. * returns the total number of decoded audio blocks in the current media session
  561. * \return a NSInteger with the total number of decoded blocks
  562. */
  563. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfDecodedAudioBlocks;
  564. /**
  565. * returns the total number of displayed pictures during the current media session
  566. * \return a NSInteger with the total number of displayed pictures
  567. */
  568. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfDisplayedPictures;
  569. /**
  570. * returns the total number of pictures lost during the current media session
  571. * \return a NSInteger with the total number of lost pictures
  572. */
  573. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfLostPictures;
  574. /**
  575. * returns the total number of played audio buffers during the current media session
  576. * \return a NSInteger with the total number of played audio buffers
  577. */
  578. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfPlayedAudioBuffers;
  579. /**
  580. * returns the total number of audio buffers lost during the current media session
  581. * \return a NSInteger with the total number of displayed pictures
  582. */
  583. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfLostAudioBuffers;
  584. /**
  585. * returns the total number of packets sent during the current media session
  586. * \return a NSInteger with the total number of sent packets
  587. */
  588. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfSentPackets;
  589. /**
  590. * returns the total number of raw bytes sent during the current media session
  591. * \return a NSInteger with the total number of sent bytes
  592. */
  593. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfSentBytes;
  594. /**
  595. * returns the current bitrate of sent bytes
  596. * \return a float of the current bitrate of sent bits
  597. */
  598. @property (NS_NONATOMIC_IOSONLY, readonly) float streamOutputBitrate;
  599. /**
  600. * returns the total number of corrupted data packets during current sout session
  601. * \note value is 0 on non-stream-output operations
  602. * \return a NSInteger with the total number of corrupted data packets
  603. */
  604. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfCorruptedDataPackets;
  605. /**
  606. * returns the total number of discontinuties during current sout session
  607. * \note value is 0 on non-stream-output operations
  608. * \return a NSInteger with the total number of discontinuties
  609. */
  610. @property (NS_NONATOMIC_IOSONLY, readonly) NSInteger numberOfDiscontinuties;
  611. @end
  612. NS_ASSUME_NONNULL_END