VLCMediaPlayer.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694
  1. /*****************************************************************************
  2. * VLCMediaPlayer.h: VLCKit.framework VLCMediaPlayer header
  3. *****************************************************************************
  4. * Copyright (C) 2007-2009 Pierre d'Herbemont
  5. * Copyright (C) 2007-2015 VLC authors and VideoLAN
  6. * Copyright (C) 2009-2015 Felix Paul Kühne
  7. * $Id$
  8. *
  9. * Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
  10. * Felix Paul Kühne <fkuehne # videolan.org>
  11. *
  12. * This program is free software; you can redistribute it and/or modify it
  13. * under the terms of the GNU Lesser General Public License as published by
  14. * the Free Software Foundation; either version 2.1 of the License, or
  15. * (at your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU Lesser General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU Lesser General Public License
  23. * along with this program; if not, write to the Free Software Foundation,
  24. * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  25. *****************************************************************************/
  26. #import <Foundation/Foundation.h>
  27. #if TARGET_OS_IPHONE
  28. # import <CoreGraphics/CoreGraphics.h>
  29. # import <UIKit/UIKit.h>
  30. #endif
  31. #import "VLCMedia.h"
  32. #import "VLCTime.h"
  33. #import "VLCAudio.h"
  34. #if !TARGET_OS_IPHONE
  35. @class VLCVideoView;
  36. @class VLCVideoLayer;
  37. #endif
  38. @class VLCLibrary;
  39. /* Notification Messages */
  40. extern NSString *const VLCMediaPlayerTimeChanged;
  41. extern NSString *const VLCMediaPlayerStateChanged;
  42. extern NSString *const VLCMediaPlayerTitleChanged;
  43. extern NSString *const VLCMediaPlayerChapterChanged;
  44. /**
  45. * VLCMediaPlayerState describes the state of the media player.
  46. */
  47. typedef NS_ENUM(NSInteger, VLCMediaPlayerState)
  48. {
  49. VLCMediaPlayerStateStopped, ///< Player has stopped
  50. VLCMediaPlayerStateOpening, ///< Stream is opening
  51. VLCMediaPlayerStateBuffering, ///< Stream is buffering
  52. VLCMediaPlayerStateEnded, ///< Stream has ended
  53. VLCMediaPlayerStateError, ///< Player has generated an error
  54. VLCMediaPlayerStatePlaying, ///< Stream is playing
  55. VLCMediaPlayerStatePaused ///< Stream is paused
  56. };
  57. /**
  58. * VLCMediaPlaybackNavigationAction describes actions which can be performed to navigate an interactive title
  59. */
  60. typedef NS_ENUM(unsigned, VLCMediaPlaybackNavigationAction)
  61. {
  62. VLCMediaPlaybackNavigationActionActivate = 0,
  63. VLCMediaPlaybackNavigationActionUp,
  64. VLCMediaPlaybackNavigationActionDown,
  65. VLCMediaPlaybackNavigationActionLeft,
  66. VLCMediaPlaybackNavigationActionRight
  67. };
  68. /**
  69. * Returns the name of the player state as a string.
  70. * \param state The player state.
  71. * \return A string containing the name of state. If state is not a valid state, returns nil.
  72. */
  73. extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
  74. /**
  75. * Formal protocol declaration for playback delegates. Allows playback messages
  76. * to be trapped by delegated objects.
  77. */
  78. @protocol VLCMediaPlayerDelegate
  79. @optional
  80. /**
  81. * Sent by the default notification center whenever the player's state has changed.
  82. * \details Discussion The value of aNotification is always an VLCMediaPlayerStateChanged notification. You can retrieve
  83. * the VLCMediaPlayer object in question by sending object to aNotification.
  84. */
  85. - (void)mediaPlayerStateChanged:(NSNotification *)aNotification;
  86. /**
  87. * Sent by the default notification center whenever the player's time has changed.
  88. * \details Discussion The value of aNotification is always an VLCMediaPlayerTimeChanged notification. You can retrieve
  89. * the VLCMediaPlayer object in question by sending object to aNotification.
  90. */
  91. - (void)mediaPlayerTimeChanged:(NSNotification *)aNotification;
  92. /**
  93. * Sent by the default notification center whenever the player's title has changed (if any).
  94. * \details Discussion The value of aNotification is always an VLCMediaPlayerTitleChanged notification. You can retrieve
  95. * the VLCMediaPlayer object in question by sending object to aNotification.
  96. * \note this is about a title in the navigation sense, not about metadata
  97. */
  98. - (void)mediaPlayerTitleChanged:(NSNotification *)aNotification;
  99. /**
  100. * Sent by the default notification center whenever the player's chapter has changed (if any).
  101. * \details Discussion The value of aNotification is always an VLCMediaPlayerChapterChanged notification. You can retrieve
  102. * the VLCMediaPlayer object in question by sending object to aNotification.
  103. */
  104. - (void)mediaPlayerChapterChanged:(NSNotification *)aNotification;
  105. #if TARGET_OS_PHONE
  106. /**
  107. * Sent by the default notification center whenever a new snapshot is taken.
  108. * \details Discussion The value of aNotification is always an VLCMediaPlayerSnapshotTaken notification. You can retrieve
  109. * the VLCMediaPlayer object in question by sending object to aNotification.
  110. */
  111. - (void)mediaPlayerSnapshot:(NSNotification *)aNotification;
  112. #endif
  113. @end
  114. // TODO: Should we use medialist_player or our own flavor of media player?
  115. @interface VLCMediaPlayer : NSObject
  116. @property (nonatomic, readonly) VLCLibrary *libraryInstance;
  117. @property (weak, nonatomic) id<VLCMediaPlayerDelegate> delegate;
  118. #if !TARGET_OS_IPHONE
  119. /* Initializers */
  120. - (instancetype)initWithVideoView:(VLCVideoView *)aVideoView;
  121. - (instancetype)initWithVideoLayer:(VLCVideoLayer *)aVideoLayer;
  122. #endif
  123. - (instancetype)initWithOptions:(NSArray *)options;
  124. - (instancetype)initWithLibVLCInstance:(void *)playerInstance andLibrary:(VLCLibrary *)library;
  125. /* Video View Options */
  126. // TODO: Should be it's own object?
  127. #pragma mark -
  128. #pragma mark video functionality
  129. #if !TARGET_OS_IPHONE
  130. - (void)setVideoView:(VLCVideoView *)aVideoView;
  131. - (void)setVideoLayer:(VLCVideoLayer *)aVideoLayer;
  132. #endif
  133. @property (strong) id drawable; /* The videoView or videoLayer */
  134. /**
  135. * Set/Get current video aspect ratio.
  136. *
  137. * param: psz_aspect new video aspect-ratio or NULL to reset to default
  138. * \note Invalid aspect ratios are ignored.
  139. * \return the video aspect ratio or NULL if unspecified
  140. * (the result must be released with free()).
  141. */
  142. @property (NS_NONATOMIC_IOSONLY) char *videoAspectRatio;
  143. /**
  144. * Set/Get current crop filter geometry.
  145. *
  146. * param: psz_geometry new crop filter geometry (NULL to unset)
  147. * \return the crop filter geometry or NULL if unset
  148. */
  149. @property (NS_NONATOMIC_IOSONLY) char *videoCropGeometry;
  150. /**
  151. * Set/Get the current video scaling factor.
  152. * That is the ratio of the number of pixels on
  153. * screen to the number of pixels in the original decoded video in each
  154. * dimension. Zero is a special value; it will adjust the video to the output
  155. * window/drawable (in windowed mode) or the entire screen.
  156. *
  157. * param: relative scale factor as float
  158. */
  159. @property (nonatomic) float scaleFactor;
  160. /**
  161. * Take a snapshot of the current video.
  162. *
  163. * If width AND height is 0, original size is used.
  164. * If width OR height is 0, original aspect-ratio is preserved.
  165. *
  166. * \param path the path where to save the screenshot to
  167. * \param width the snapshot's width
  168. * \param height the snapshot's height
  169. */
  170. - (void)saveVideoSnapshotAt:(NSString *)path withWidth:(int)width andHeight:(int)height;
  171. /**
  172. * Enable or disable deinterlace filter
  173. *
  174. * \param name of deinterlace filter to use (availability depends on underlying VLC version), NULL to disable.
  175. */
  176. - (void)setDeinterlaceFilter: (NSString *)name;
  177. /**
  178. * Enable or disable adjust video filter (contrast, brightness, hue, saturation, gamma)
  179. *
  180. * \return bool value
  181. */
  182. @property (nonatomic) BOOL adjustFilterEnabled;
  183. /**
  184. * Set/Get the adjust filter's contrast value
  185. *
  186. * \return float value (range: 0-2, default: 1.0)
  187. */
  188. @property (nonatomic) float contrast;
  189. /**
  190. * Set/Get the adjust filter's brightness value
  191. *
  192. * \return float value (range: 0-2, default: 1.0)
  193. */
  194. @property (nonatomic) float brightness;
  195. /**
  196. * Set/Get the adjust filter's hue value
  197. *
  198. * \return float value (range: -180-180, default: 0.)
  199. */
  200. @property (nonatomic) float hue;
  201. /**
  202. * Set/Get the adjust filter's saturation value
  203. *
  204. * \return float value (range: 0-3, default: 1.0)
  205. */
  206. @property (nonatomic) float saturation;
  207. /**
  208. * Set/Get the adjust filter's gamma value
  209. *
  210. * \return float value (range: 0-10, default: 1.0)
  211. */
  212. @property (nonatomic) float gamma;
  213. /**
  214. * Get the requested movie play rate.
  215. * @warning Depending on the underlying media, the requested rate may be
  216. * different from the real playback rate. Due to limitations of some protocols
  217. * this option may not be taken into account at all, if set.
  218. *
  219. * \return movie play rate
  220. */
  221. @property (nonatomic) float rate;
  222. @property (nonatomic, readonly, weak) VLCAudio * audio;
  223. /* Video Information */
  224. /**
  225. * Get the current video size
  226. * \return video size as CGSize
  227. */
  228. @property (NS_NONATOMIC_IOSONLY, readonly) CGSize videoSize;
  229. /**
  230. * Does the current media have a video output?
  231. * \note a false return value doesn't mean that the video doesn't have any video
  232. * \note tracks. Those might just be disabled.
  233. * \return current video output status
  234. */
  235. @property (NS_NONATOMIC_IOSONLY, readonly) BOOL hasVideoOut;
  236. /**
  237. * Frames per second
  238. * \note Deprecated, provided for API compatibility only
  239. * \note To retrieve a media's FPS, use VLCMediaTracksInformationFrameRate.
  240. * \returns 0
  241. */
  242. @property (NS_NONATOMIC_IOSONLY, readonly) float framesPerSecond __attribute__((deprecated));
  243. #pragma mark -
  244. #pragma mark time
  245. /**
  246. * Sets the current position (or time) of the feed.
  247. * \param value New time to set the current position to. If time is [VLCTime nullTime], 0 is assumed.
  248. */
  249. /**
  250. * Returns the current position (or time) of the feed.
  251. * \return VLCTIme object with current time.
  252. */
  253. @property (NS_NONATOMIC_IOSONLY, strong) VLCTime *time;
  254. @property (nonatomic, readonly, weak) VLCTime *remainingTime;
  255. #pragma mark -
  256. #pragma mark ES track handling
  257. /**
  258. * Return the current video track index
  259. *
  260. * \return 0 if none is set.
  261. *
  262. * Pass -1 to disable.
  263. */
  264. @property (readwrite) int currentVideoTrackIndex;
  265. /**
  266. * Returns the video track names, usually a language name or a description
  267. * It includes the "Disabled" fake track at index 0.
  268. */
  269. @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *videoTrackNames;
  270. /**
  271. * Returns the video track IDs
  272. * those are needed to set the video index
  273. */
  274. @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *videoTrackIndexes;
  275. /**
  276. * returns the number of video tracks available in the current media
  277. * \return number of tracks
  278. */
  279. @property (NS_NONATOMIC_IOSONLY, readonly) int numberOfVideoTracks;
  280. /**
  281. * Return the current video subtitle index
  282. *
  283. * \return 0 if none is set.
  284. *
  285. * Pass -1 to disable.
  286. */
  287. @property (readwrite) int currentVideoSubTitleIndex;
  288. /**
  289. * Returns the video subtitle track names, usually a language name or a description
  290. * It includes the "Disabled" fake track at index 0.
  291. */
  292. @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *videoSubTitlesNames;
  293. /**
  294. * Returns the video subtitle track IDs
  295. * those are needed to set the video subtitle index
  296. */
  297. @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *videoSubTitlesIndexes;
  298. /**
  299. * returns the number of SPU tracks available in the current media
  300. * \return number of tracks
  301. */
  302. @property (NS_NONATOMIC_IOSONLY, readonly) int numberOfSubtitlesTracks;
  303. /**
  304. * Load and set a specific video subtitle, from a file.
  305. * \param path to a file
  306. * \return if the call succeed..
  307. *
  308. * \note use addPlaybackSlave:type:enforce: instead
  309. */
  310. - (BOOL)openVideoSubTitlesFromFile:(NSString *)path __attribute__((deprecated));
  311. /**
  312. * VLCMediaPlaybackNavigationAction describes actions which can be performed to navigate an interactive title
  313. */
  314. typedef NS_ENUM(unsigned, VLCMediaPlaybackSlaveType)
  315. {
  316. VLCMediaPlaybackSlaveTypeSubtitle = 0,
  317. VLCMediaPlaybackSlaveTypeAudio
  318. };
  319. /**
  320. * Add additional input sources to a playing media item
  321. * This way, you can add subtitles or audio files to an existing input stream
  322. * For the user, it will appear as if they were part of the existing stream
  323. * \param slaveURL of the content to be added
  324. * \param slaveType content type
  325. * \param enforceSelection switch to the added accessory content
  326. */
  327. - (int)addPlaybackSlave:(NSURL *)slaveURL type:(VLCMediaPlaybackSlaveType)slaveType enforce:(BOOL)enforceSelection;
  328. /**
  329. * Get the current subtitle delay. Positive values means subtitles are being
  330. * displayed later, negative values earlier.
  331. *
  332. * \return time (in microseconds) the display of subtitles is being delayed
  333. */
  334. @property (readwrite) NSInteger currentVideoSubTitleDelay;
  335. /**
  336. * Chapter selection and enumeration, it is bound
  337. * to a title option.
  338. */
  339. /**
  340. * Return the current video subtitle index, or
  341. * \return NSNotFound if none is set.
  342. *
  343. * To disable subtitle pass NSNotFound.
  344. */
  345. @property (readwrite) int currentChapterIndex;
  346. - (void)previousChapter;
  347. - (void)nextChapter;
  348. - (int)numberOfChaptersForTitle:(int)titleIndex;
  349. - (NSArray *)chaptersForTitleIndex:(int)titleIndex __attribute__((deprecated));
  350. extern NSString *const VLCChapterDescriptionName;
  351. extern NSString *const VLCChapterDescriptionTimeOffset;
  352. extern NSString *const VLCChapterDescriptionDuration;
  353. /**
  354. * chapter descriptions
  355. * an array of all chapters of the given title including information about
  356. * chapter name, time offset and duration
  357. * \note if no title value is provided, information about the chapters of the current title is returned
  358. * \return array describing the titles in details
  359. */
  360. - (NSArray *)chapterDescriptionsOfTitle:(int)titleIndex;
  361. /**
  362. * Title selection and enumeration
  363. * \return NSNotFound if none is set.
  364. */
  365. @property (readwrite) int currentTitleIndex;
  366. @property (readonly) int numberOfTitles;
  367. @property (readonly) NSUInteger countOfTitles __attribute__((deprecated));
  368. @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *titles __attribute__((deprecated));
  369. extern NSString *const VLCTitleDescriptionName;
  370. extern NSString *const VLCTitleDescriptionDuration;
  371. extern NSString *const VLCTitleDescriptionIsMenu;
  372. /**
  373. * title descriptions
  374. * an array of all titles of the current media including information
  375. * of name, duration and potential menu state
  376. * \return array describing the titles in details
  377. */
  378. @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *titleDescriptions;
  379. /**
  380. * the title with the longest duration
  381. * \return int matching the title index
  382. */
  383. @property (readonly) int indexOfLongestTitle;
  384. /* Audio Options */
  385. /**
  386. * Return the current audio track index
  387. *
  388. * \return 0 if none is set.
  389. *
  390. * Pass -1 to disable.
  391. */
  392. @property (readwrite) int currentAudioTrackIndex;
  393. /**
  394. * Returns the audio track names, usually a language name or a description
  395. * It includes the "Disabled" fake track at index 0.
  396. */
  397. @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *audioTrackNames;
  398. /**
  399. * Returns the audio track IDs
  400. * those are needed to set the video index
  401. */
  402. @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *audioTrackIndexes;
  403. /**
  404. * returns the number of audio tracks available in the current media
  405. * \return number of tracks
  406. */
  407. @property (NS_NONATOMIC_IOSONLY, readonly) int numberOfAudioTracks;
  408. #pragma mark -
  409. #pragma mark audio functionality
  410. @property (NS_NONATOMIC_IOSONLY) int audioChannel;
  411. /**
  412. * Get the current audio delay. Positive values means audio is delayed further,
  413. * negative values less.
  414. *
  415. * \return time (in microseconds) the audio playback is being delayed
  416. */
  417. @property (readwrite) NSInteger currentAudioPlaybackDelay;
  418. #pragma mark -
  419. #pragma mark equalizer
  420. /**
  421. * Get a list of available equalizer profiles
  422. * \Note Current versions do not allow the addition of further profiles
  423. * so you need to handle this in your app.
  424. *
  425. * \return array of equalizer profiles
  426. */
  427. @property (weak, readonly) NSArray *equalizerProfiles;
  428. /**
  429. * Re-set the equalizer to a profile retrieved from the list
  430. * \Note This doesn't enable the Equalizer automagically
  431. */
  432. - (void)resetEqualizerFromProfile:(unsigned)profile;
  433. /**
  434. * Toggle equalizer state
  435. * param: bool value to enable/disable the equalizer
  436. * \return current state */
  437. @property (readwrite) BOOL equalizerEnabled;
  438. /**
  439. * Set amplification level
  440. * param: The supplied amplification value will be clamped to the -20.0 to +20.0 range.
  441. * \note this will create and enabled an Equalizer instance if not present
  442. * \return current amplification level */
  443. @property (readwrite) CGFloat preAmplification;
  444. /**
  445. * Number of equalizer bands
  446. * \return the number of equalizer bands available in the current release */
  447. @property (readonly) unsigned numberOfBands;
  448. /**
  449. * frequency of equalizer band
  450. * \param index the band index
  451. * \return frequency of the requested equalizer band */
  452. - (CGFloat)frequencyOfBandAtIndex:(unsigned)index;
  453. /**
  454. * set amplification for band
  455. * \param amplification value (clamped to the -20.0 to +20.0 range)
  456. * \param index of the respective band */
  457. - (void)setAmplification:(CGFloat)amplification forBand:(unsigned)index;
  458. /**
  459. * amplification of band
  460. * \param index of the band
  461. * \return current amplification value (clamped to the -20.0 to +20.0 range) */
  462. - (CGFloat)amplificationOfBand:(unsigned)index;
  463. #pragma mark -
  464. #pragma mark media handling
  465. /* Media Options */
  466. @property (NS_NONATOMIC_IOSONLY, strong) VLCMedia *media;
  467. #pragma mark -
  468. #pragma mark playback operations
  469. /**
  470. * Plays a media resource using the currently selected media controller (or
  471. * default controller. If feed was paused then the feed resumes at the position
  472. * it was paused in.
  473. */
  474. - (void)play;
  475. /**
  476. * Toggle's the pause state of the feed.
  477. */
  478. - (void)pause;
  479. /**
  480. * Stop the playing.
  481. */
  482. - (void)stop;
  483. /**
  484. * Advance one frame.
  485. */
  486. - (void)gotoNextFrame;
  487. /**
  488. * Fast forwards through the feed at the standard 1x rate.
  489. */
  490. - (void)fastForward;
  491. /**
  492. * Fast forwards through the feed at the rate specified.
  493. * \param rate Rate at which the feed should be fast forwarded.
  494. */
  495. - (void)fastForwardAtRate:(float)rate;
  496. /**
  497. * Rewinds through the feed at the standard 1x rate.
  498. */
  499. - (void)rewind;
  500. /**
  501. * Rewinds through the feed at the rate specified.
  502. * \param rate Rate at which the feed should be fast rewound.
  503. */
  504. - (void)rewindAtRate:(float)rate;
  505. /**
  506. * Jumps shortly backward in current stream if seeking is supported.
  507. * \param interval to skip, in sec.
  508. */
  509. - (void)jumpBackward:(int)interval;
  510. /**
  511. * Jumps shortly forward in current stream if seeking is supported.
  512. * \param interval to skip, in sec.
  513. */
  514. - (void)jumpForward:(int)interval;
  515. /**
  516. * Jumps shortly backward in current stream if seeking is supported.
  517. */
  518. - (void)extraShortJumpBackward;
  519. /**
  520. * Jumps shortly forward in current stream if seeking is supported.
  521. */
  522. - (void)extraShortJumpForward;
  523. /**
  524. * Jumps shortly backward in current stream if seeking is supported.
  525. */
  526. - (void)shortJumpBackward;
  527. /**
  528. * Jumps shortly forward in current stream if seeking is supported.
  529. */
  530. - (void)shortJumpForward;
  531. /**
  532. * Jumps shortly backward in current stream if seeking is supported.
  533. */
  534. - (void)mediumJumpBackward;
  535. /**
  536. * Jumps shortly forward in current stream if seeking is supported.
  537. */
  538. - (void)mediumJumpForward;
  539. /**
  540. * Jumps shortly backward in current stream if seeking is supported.
  541. */
  542. - (void)longJumpBackward;
  543. /**
  544. * Jumps shortly forward in current stream if seeking is supported.
  545. */
  546. - (void)longJumpForward;
  547. /**
  548. * performs navigation actions on interactive titles
  549. */
  550. - (void)performNavigationAction:(VLCMediaPlaybackNavigationAction)action;
  551. #pragma mark -
  552. #pragma mark playback information
  553. /**
  554. * Playback state flag identifying that the stream is currently playing.
  555. * \return TRUE if the feed is playing, FALSE if otherwise.
  556. */
  557. @property (NS_NONATOMIC_IOSONLY, getter=isPlaying, readonly) BOOL playing;
  558. /**
  559. * Playback state flag identifying wheather the stream will play.
  560. * \return TRUE if the feed is ready for playback, FALSE if otherwise.
  561. */
  562. @property (NS_NONATOMIC_IOSONLY, readonly) BOOL willPlay;
  563. /**
  564. * Playback's current state.
  565. * \see VLCMediaState
  566. */
  567. @property (NS_NONATOMIC_IOSONLY, readonly) VLCMediaPlayerState state;
  568. /**
  569. * Returns the receiver's position in the reading.
  570. * \return movie position as percentage between 0.0 and 1.0.
  571. */
  572. @property (NS_NONATOMIC_IOSONLY) float position;
  573. /**
  574. * Set movie position. This has no effect if playback is not enabled.
  575. * \note movie position as percentage between 0.0 and 1.0.
  576. */
  577. @property (NS_NONATOMIC_IOSONLY, getter=isSeekable, readonly) BOOL seekable;
  578. @property (NS_NONATOMIC_IOSONLY, readonly) BOOL canPause;
  579. #if TARGET_OS_IPHONE
  580. @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *snapshots;
  581. /**
  582. * Get last snapshot available.
  583. * \return an UIImage with the last snapshot available.
  584. * \note return value is nil if there is no snapshot
  585. */
  586. @property (NS_NONATOMIC_IOSONLY, readonly) UIImage *lastSnapshot;
  587. #endif
  588. @end