VLCMediaPlayer.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812
  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. /**
  115. * The player base class needed to do any playback
  116. */
  117. @interface VLCMediaPlayer : NSObject
  118. /**
  119. * the library instance in use by the player instance
  120. */
  121. @property (nonatomic, readonly) VLCLibrary *libraryInstance;
  122. /**
  123. * the delegate object implementing the optional protocol
  124. */
  125. @property (weak, nonatomic) id<VLCMediaPlayerDelegate> delegate;
  126. #if !TARGET_OS_IPHONE
  127. /* Initializers */
  128. /**
  129. * initialize player with a given video view
  130. * \param aVideoView an instance of VLCVideoView
  131. * \note This initializer is for macOS only
  132. */
  133. - (instancetype)initWithVideoView:(VLCVideoView *)aVideoView;
  134. /**
  135. * initialize player with a given video layer
  136. * \param aVideoLayer an instance of VLCVideoLayer
  137. * \note This initializer is for macOS only
  138. */
  139. - (instancetype)initWithVideoLayer:(VLCVideoLayer *)aVideoLayer;
  140. #endif
  141. /**
  142. * initialize player with a given set of options
  143. * \param options an array of private options
  144. * \note This will allocate a new libvlc and VLCLibrary instance, which will have a memory impact
  145. */
  146. - (instancetype)initWithOptions:(NSArray *)options;
  147. /**
  148. * initialize player with a certain libvlc instance and VLCLibrary
  149. * \param playerInstance the libvlc instance
  150. * \param library the library instance
  151. * \note This is an advanced initializer for very specialized environments
  152. */
  153. - (instancetype)initWithLibVLCInstance:(void *)playerInstance andLibrary:(VLCLibrary *)library;
  154. /* Video View Options */
  155. // TODO: Should be it's own object?
  156. #pragma mark -
  157. #pragma mark video functionality
  158. #if !TARGET_OS_IPHONE
  159. /**
  160. * set a video view for rendering
  161. * \param aVideoView instance of VLCVideoView
  162. * \note This setter is macOS only
  163. */
  164. - (void)setVideoView:(VLCVideoView *)aVideoView;
  165. /**
  166. * set a video layer for rendering
  167. * \param aVideoLayer instance of VLCVideoLayer
  168. * \note This setter is macOS only
  169. */
  170. - (void)setVideoLayer:(VLCVideoLayer *)aVideoLayer;
  171. #endif
  172. /**
  173. * set/retrieve a video view for rendering
  174. * This can be any UIView or NSView or instances of VLCVideoView / VLCVideoLayer if running on macOS
  175. */
  176. @property (strong) id drawable; /* The videoView or videoLayer */
  177. /**
  178. * Set/Get current video aspect ratio.
  179. *
  180. * param: psz_aspect new video aspect-ratio or NULL to reset to default
  181. * \note Invalid aspect ratios are ignored.
  182. * \return the video aspect ratio or NULL if unspecified
  183. * (the result must be released with free()).
  184. */
  185. @property (NS_NONATOMIC_IOSONLY) char *videoAspectRatio;
  186. /**
  187. * Set/Get current crop filter geometry.
  188. *
  189. * param: psz_geometry new crop filter geometry (NULL to unset)
  190. * \return the crop filter geometry or NULL if unset
  191. */
  192. @property (NS_NONATOMIC_IOSONLY) char *videoCropGeometry;
  193. /**
  194. * Set/Get the current video scaling factor.
  195. * That is the ratio of the number of pixels on
  196. * screen to the number of pixels in the original decoded video in each
  197. * dimension. Zero is a special value; it will adjust the video to the output
  198. * window/drawable (in windowed mode) or the entire screen.
  199. *
  200. * param: relative scale factor as float
  201. */
  202. @property (nonatomic) float scaleFactor;
  203. /**
  204. * Take a snapshot of the current video.
  205. *
  206. * If width AND height is 0, original size is used.
  207. * If width OR height is 0, original aspect-ratio is preserved.
  208. *
  209. * \param path the path where to save the screenshot to
  210. * \param width the snapshot's width
  211. * \param height the snapshot's height
  212. */
  213. - (void)saveVideoSnapshotAt:(NSString *)path withWidth:(int)width andHeight:(int)height;
  214. /**
  215. * Enable or disable deinterlace filter
  216. *
  217. * \param name of deinterlace filter to use (availability depends on underlying VLC version), NULL to disable.
  218. */
  219. - (void)setDeinterlaceFilter: (NSString *)name;
  220. /**
  221. * Enable or disable adjust video filter (contrast, brightness, hue, saturation, gamma)
  222. *
  223. * \return bool value
  224. */
  225. @property (nonatomic) BOOL adjustFilterEnabled;
  226. /**
  227. * Set/Get the adjust filter's contrast value
  228. *
  229. * \return float value (range: 0-2, default: 1.0)
  230. */
  231. @property (nonatomic) float contrast;
  232. /**
  233. * Set/Get the adjust filter's brightness value
  234. *
  235. * \return float value (range: 0-2, default: 1.0)
  236. */
  237. @property (nonatomic) float brightness;
  238. /**
  239. * Set/Get the adjust filter's hue value
  240. *
  241. * \return float value (range: -180-180, default: 0.)
  242. */
  243. @property (nonatomic) float hue;
  244. /**
  245. * Set/Get the adjust filter's saturation value
  246. *
  247. * \return float value (range: 0-3, default: 1.0)
  248. */
  249. @property (nonatomic) float saturation;
  250. /**
  251. * Set/Get the adjust filter's gamma value
  252. *
  253. * \return float value (range: 0-10, default: 1.0)
  254. */
  255. @property (nonatomic) float gamma;
  256. /**
  257. * Get the requested movie play rate.
  258. * @warning Depending on the underlying media, the requested rate may be
  259. * different from the real playback rate. Due to limitations of some protocols
  260. * this option may not be taken into account at all, if set.
  261. *
  262. * \return movie play rate
  263. */
  264. @property (nonatomic) float rate;
  265. /**
  266. * an audio controller object
  267. * \return instance of VLCAudio
  268. */
  269. @property (nonatomic, readonly, weak) VLCAudio * audio;
  270. /* Video Information */
  271. /**
  272. * Get the current video size
  273. * \return video size as CGSize
  274. */
  275. @property (NS_NONATOMIC_IOSONLY, readonly) CGSize videoSize;
  276. /**
  277. * Does the current media have a video output?
  278. * \note a false return value doesn't mean that the video doesn't have any video
  279. * \note tracks. Those might just be disabled.
  280. * \return current video output status
  281. */
  282. @property (NS_NONATOMIC_IOSONLY, readonly) BOOL hasVideoOut;
  283. /**
  284. * Frames per second
  285. * \deprecated provided for API compatibility only, to retrieve a media's FPS, use VLCMediaTracksInformationFrameRate.
  286. * \returns 0
  287. */
  288. @property (NS_NONATOMIC_IOSONLY, readonly) float framesPerSecond __attribute__((deprecated));
  289. #pragma mark -
  290. #pragma mark time
  291. /**
  292. * Sets the current position (or time) of the feed.
  293. * \param value New time to set the current position to. If time is [VLCTime nullTime], 0 is assumed.
  294. */
  295. /**
  296. * Returns the current position (or time) of the feed.
  297. * \return VLCTime object with current time.
  298. */
  299. @property (NS_NONATOMIC_IOSONLY, strong) VLCTime *time;
  300. /**
  301. * Returns the current position (or time) of the feed, inversed if a duration is available
  302. * \return VLCTime object with requested time
  303. * \note VLCTime will be a nullTime if no duration can be calculated for the current input
  304. */
  305. @property (nonatomic, readonly, weak) VLCTime *remainingTime;
  306. #pragma mark -
  307. #pragma mark ES track handling
  308. /**
  309. * Return the current video track index
  310. *
  311. * \return 0 if none is set.
  312. *
  313. * Pass -1 to disable.
  314. */
  315. @property (readwrite) int currentVideoTrackIndex;
  316. /**
  317. * Returns the video track names, usually a language name or a description
  318. * It includes the "Disabled" fake track at index 0.
  319. */
  320. @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *videoTrackNames;
  321. /**
  322. * Returns the video track IDs
  323. * those are needed to set the video index
  324. */
  325. @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *videoTrackIndexes;
  326. /**
  327. * returns the number of video tracks available in the current media
  328. * \return number of tracks
  329. */
  330. @property (NS_NONATOMIC_IOSONLY, readonly) int numberOfVideoTracks;
  331. /**
  332. * Return the current video subtitle index
  333. *
  334. * \return 0 if none is set.
  335. *
  336. * Pass -1 to disable.
  337. */
  338. @property (readwrite) int currentVideoSubTitleIndex;
  339. /**
  340. * Returns the video subtitle track names, usually a language name or a description
  341. * It includes the "Disabled" fake track at index 0.
  342. */
  343. @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *videoSubTitlesNames;
  344. /**
  345. * Returns the video subtitle track IDs
  346. * those are needed to set the video subtitle index
  347. */
  348. @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *videoSubTitlesIndexes;
  349. /**
  350. * returns the number of SPU tracks available in the current media
  351. * \return number of tracks
  352. */
  353. @property (NS_NONATOMIC_IOSONLY, readonly) int numberOfSubtitlesTracks;
  354. /**
  355. * Load and set a specific video subtitle, from a file.
  356. * \param path to a file
  357. * \return if the call succeed..
  358. *
  359. * \deprecated use addPlaybackSlave:type:enforce: instead
  360. */
  361. - (BOOL)openVideoSubTitlesFromFile:(NSString *)path __attribute__((deprecated));
  362. /**
  363. * VLCMediaPlaybackNavigationAction describes actions which can be performed to navigate an interactive title
  364. */
  365. typedef NS_ENUM(unsigned, VLCMediaPlaybackSlaveType)
  366. {
  367. VLCMediaPlaybackSlaveTypeSubtitle = 0,
  368. VLCMediaPlaybackSlaveTypeAudio
  369. };
  370. /**
  371. * Add additional input sources to a playing media item
  372. * This way, you can add subtitles or audio files to an existing input stream
  373. * For the user, it will appear as if they were part of the existing stream
  374. * \param slaveURL of the content to be added
  375. * \param slaveType content type
  376. * \param enforceSelection switch to the added accessory content
  377. */
  378. - (int)addPlaybackSlave:(NSURL *)slaveURL type:(VLCMediaPlaybackSlaveType)slaveType enforce:(BOOL)enforceSelection;
  379. /**
  380. * Get the current subtitle delay. Positive values means subtitles are being
  381. * displayed later, negative values earlier.
  382. *
  383. * \return time (in microseconds) the display of subtitles is being delayed
  384. */
  385. @property (readwrite) NSInteger currentVideoSubTitleDelay;
  386. /**
  387. * Chapter selection and enumeration, it is bound
  388. * to a title option.
  389. */
  390. /**
  391. * Return the current chapter index, or
  392. * \return NSNotFound if none is set.
  393. */
  394. @property (readwrite) int currentChapterIndex;
  395. /**
  396. * switch to the previous chapter
  397. */
  398. - (void)previousChapter;
  399. /**
  400. * switch to the next chapter
  401. */
  402. - (void)nextChapter;
  403. /**
  404. * returns the number of chapters for a given title
  405. * \param titleIndex the index of the title you are requesting the chapters for
  406. */
  407. - (int)numberOfChaptersForTitle:(int)titleIndex;
  408. /**
  409. * Chapters of a given title index
  410. * \deprecated Use chapterDescriptionsOfTitle instead
  411. */
  412. - (NSArray *)chaptersForTitleIndex:(int)titleIndex __attribute__((deprecated));
  413. /**
  414. * dictionary value for the user-facing chapter name
  415. */
  416. extern NSString *const VLCChapterDescriptionName;
  417. /**
  418. * dictionary value for the chapter's time offset
  419. */
  420. extern NSString *const VLCChapterDescriptionTimeOffset;
  421. /**
  422. * dictionary value for the chapter's duration
  423. */
  424. extern NSString *const VLCChapterDescriptionDuration;
  425. /**
  426. * chapter descriptions
  427. * an array of all chapters of the given title including information about
  428. * chapter name, time offset and duration
  429. * \note if no title value is provided, information about the chapters of the current title is returned
  430. * \return array describing the titles in details
  431. * \see VLCChapterDescriptionName
  432. * \see VLCChapterDescriptionTimeOffset
  433. * \see VLCChapterDescriptionDuration
  434. */
  435. - (NSArray *)chapterDescriptionsOfTitle:(int)titleIndex;
  436. /**
  437. * Title selection and enumeration
  438. * \return NSNotFound if none is set.
  439. */
  440. @property (readwrite) int currentTitleIndex;
  441. /**
  442. * number of titles available for the current media
  443. * \return the number of titles
  444. */
  445. @property (readonly) int numberOfTitles;
  446. /**
  447. * count of titles
  448. * \deprecated Use numberOfTitles instead
  449. */
  450. @property (readonly) NSUInteger countOfTitles __attribute__((deprecated));
  451. /**
  452. * array of available titles
  453. * \deprecated Use titleDescriptions instead
  454. */
  455. @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *titles __attribute__((deprecated));
  456. /**
  457. * dictionary value for the user-facing title name
  458. */
  459. extern NSString *const VLCTitleDescriptionName;
  460. /**
  461. * dictionary value for the title's duration
  462. */
  463. extern NSString *const VLCTitleDescriptionDuration;
  464. /**
  465. * dictionary value whether the title is a menu or not
  466. */
  467. extern NSString *const VLCTitleDescriptionIsMenu;
  468. /**
  469. * title descriptions
  470. * an array of all titles of the current media including information
  471. * of name, duration and potential menu state
  472. * \return array describing the titles in details
  473. * \see VLCTitleDescriptionName
  474. * \see VLCTitleDescriptionDuration
  475. * \see VLCTitleDescriptionIsMenu
  476. */
  477. @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *titleDescriptions;
  478. /**
  479. * the title with the longest duration
  480. * \return int matching the title index
  481. */
  482. @property (readonly) int indexOfLongestTitle;
  483. /* Audio Options */
  484. /**
  485. * Return the current audio track index
  486. *
  487. * \return 0 if none is set.
  488. *
  489. * Pass -1 to disable.
  490. */
  491. @property (readwrite) int currentAudioTrackIndex;
  492. /**
  493. * Returns the audio track names, usually a language name or a description
  494. * It includes the "Disabled" fake track at index 0.
  495. */
  496. @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *audioTrackNames;
  497. /**
  498. * Returns the audio track IDs
  499. * those are needed to set the video index
  500. */
  501. @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *audioTrackIndexes;
  502. /**
  503. * returns the number of audio tracks available in the current media
  504. * \return number of tracks
  505. */
  506. @property (NS_NONATOMIC_IOSONLY, readonly) int numberOfAudioTracks;
  507. #pragma mark -
  508. #pragma mark audio functionality
  509. /**
  510. * sets / returns the current audio channel
  511. * \return the currently set audio channel
  512. */
  513. @property (NS_NONATOMIC_IOSONLY) int audioChannel;
  514. /**
  515. * Get the current audio delay. Positive values means audio is delayed further,
  516. * negative values less.
  517. *
  518. * \return time (in microseconds) the audio playback is being delayed
  519. */
  520. @property (readwrite) NSInteger currentAudioPlaybackDelay;
  521. #pragma mark -
  522. #pragma mark equalizer
  523. /**
  524. * Get a list of available equalizer profiles
  525. * \note Current versions do not allow the addition of further profiles
  526. * so you need to handle this in your app.
  527. *
  528. * \return array of equalizer profiles
  529. */
  530. @property (weak, readonly) NSArray *equalizerProfiles;
  531. /**
  532. * Re-set the equalizer to a profile retrieved from the list
  533. * \note This doesn't enable the Equalizer automagically
  534. */
  535. - (void)resetEqualizerFromProfile:(unsigned)profile;
  536. /**
  537. * Toggle equalizer state
  538. * param: bool value to enable/disable the equalizer
  539. * \return current state */
  540. @property (readwrite) BOOL equalizerEnabled;
  541. /**
  542. * Set amplification level
  543. * param: The supplied amplification value will be clamped to the -20.0 to +20.0 range.
  544. * \note this will create and enabled an Equalizer instance if not present
  545. * \return current amplification level */
  546. @property (readwrite) CGFloat preAmplification;
  547. /**
  548. * Number of equalizer bands
  549. * \return the number of equalizer bands available in the current release */
  550. @property (readonly) unsigned numberOfBands;
  551. /**
  552. * frequency of equalizer band
  553. * \param index the band index
  554. * \return frequency of the requested equalizer band */
  555. - (CGFloat)frequencyOfBandAtIndex:(unsigned)index;
  556. /**
  557. * set amplification for band
  558. * \param amplification value (clamped to the -20.0 to +20.0 range)
  559. * \param index of the respective band */
  560. - (void)setAmplification:(CGFloat)amplification forBand:(unsigned)index;
  561. /**
  562. * amplification of band
  563. * \param index of the band
  564. * \return current amplification value (clamped to the -20.0 to +20.0 range) */
  565. - (CGFloat)amplificationOfBand:(unsigned)index;
  566. #pragma mark -
  567. #pragma mark media handling
  568. /* Media Options */
  569. /**
  570. * The currently media instance set to play
  571. */
  572. @property (NS_NONATOMIC_IOSONLY, strong) VLCMedia *media;
  573. #pragma mark -
  574. #pragma mark playback operations
  575. /**
  576. * Plays a media resource using the currently selected media controller (or
  577. * default controller. If feed was paused then the feed resumes at the position
  578. * it was paused in.
  579. */
  580. - (void)play;
  581. /**
  582. * Toggle's the pause state of the feed.
  583. */
  584. - (void)pause;
  585. /**
  586. * Stop the playing.
  587. */
  588. - (void)stop;
  589. /**
  590. * Advance one frame.
  591. */
  592. - (void)gotoNextFrame;
  593. /**
  594. * Fast forwards through the feed at the standard 1x rate.
  595. */
  596. - (void)fastForward;
  597. /**
  598. * Fast forwards through the feed at the rate specified.
  599. * \param rate Rate at which the feed should be fast forwarded.
  600. */
  601. - (void)fastForwardAtRate:(float)rate;
  602. /**
  603. * Rewinds through the feed at the standard 1x rate.
  604. */
  605. - (void)rewind;
  606. /**
  607. * Rewinds through the feed at the rate specified.
  608. * \param rate Rate at which the feed should be fast rewound.
  609. */
  610. - (void)rewindAtRate:(float)rate;
  611. /**
  612. * Jumps shortly backward in current stream if seeking is supported.
  613. * \param interval to skip, in sec.
  614. */
  615. - (void)jumpBackward:(int)interval;
  616. /**
  617. * Jumps shortly forward in current stream if seeking is supported.
  618. * \param interval to skip, in sec.
  619. */
  620. - (void)jumpForward:(int)interval;
  621. /**
  622. * Jumps shortly backward in current stream if seeking is supported.
  623. */
  624. - (void)extraShortJumpBackward;
  625. /**
  626. * Jumps shortly forward in current stream if seeking is supported.
  627. */
  628. - (void)extraShortJumpForward;
  629. /**
  630. * Jumps shortly backward in current stream if seeking is supported.
  631. */
  632. - (void)shortJumpBackward;
  633. /**
  634. * Jumps shortly forward in current stream if seeking is supported.
  635. */
  636. - (void)shortJumpForward;
  637. /**
  638. * Jumps shortly backward in current stream if seeking is supported.
  639. */
  640. - (void)mediumJumpBackward;
  641. /**
  642. * Jumps shortly forward in current stream if seeking is supported.
  643. */
  644. - (void)mediumJumpForward;
  645. /**
  646. * Jumps shortly backward in current stream if seeking is supported.
  647. */
  648. - (void)longJumpBackward;
  649. /**
  650. * Jumps shortly forward in current stream if seeking is supported.
  651. */
  652. - (void)longJumpForward;
  653. /**
  654. * performs navigation actions on interactive titles
  655. */
  656. - (void)performNavigationAction:(VLCMediaPlaybackNavigationAction)action;
  657. #pragma mark -
  658. #pragma mark playback information
  659. /**
  660. * Playback state flag identifying that the stream is currently playing.
  661. * \return TRUE if the feed is playing, FALSE if otherwise.
  662. */
  663. @property (NS_NONATOMIC_IOSONLY, getter=isPlaying, readonly) BOOL playing;
  664. /**
  665. * Playback state flag identifying wheather the stream will play.
  666. * \return TRUE if the feed is ready for playback, FALSE if otherwise.
  667. */
  668. @property (NS_NONATOMIC_IOSONLY, readonly) BOOL willPlay;
  669. /**
  670. * Playback's current state.
  671. * \see VLCMediaState
  672. */
  673. @property (NS_NONATOMIC_IOSONLY, readonly) VLCMediaPlayerState state;
  674. /**
  675. * Returns the receiver's position in the reading.
  676. * \return movie position as percentage between 0.0 and 1.0.
  677. */
  678. @property (NS_NONATOMIC_IOSONLY) float position;
  679. /**
  680. * Set movie position. This has no effect if playback is not enabled.
  681. * \note movie position as percentage between 0.0 and 1.0.
  682. */
  683. @property (NS_NONATOMIC_IOSONLY, getter=isSeekable, readonly) BOOL seekable;
  684. /**
  685. * property whether the currently playing media can be paused (or not)
  686. * \return BOOL value
  687. */
  688. @property (NS_NONATOMIC_IOSONLY, readonly) BOOL canPause;
  689. #if TARGET_OS_IPHONE
  690. /**
  691. * Array of taken snapshots of the current video output
  692. * \return a NSArray of UIImage instances
  693. * \note This property is not available to macOS
  694. */
  695. @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *snapshots;
  696. /**
  697. * Get last snapshot available.
  698. * \return an UIImage with the last snapshot available.
  699. * \note return value is nil if there is no snapshot
  700. * \note This property is not available to macOS
  701. */
  702. @property (NS_NONATOMIC_IOSONLY, readonly) UIImage *lastSnapshot;
  703. #endif
  704. @end