29 #import <Foundation/Foundation.h>
31 # import <CoreGraphics/CoreGraphics.h>
32 # import <UIKit/UIKit.h>
33 #endif // TARGET_OS_IPHONE
35 NS_ASSUME_NONNULL_BEGIN
40 #endif // !TARGET_OS_IPHONE
43 #endif // !TARGET_OS_TV
46 extern NSString *
const VLCMediaPlayerTimeChanged;
47 extern NSString *
const VLCMediaPlayerStateChanged;
48 extern NSString *
const VLCMediaPlayerTitleChanged;
49 extern NSString *
const VLCMediaPlayerChapterChanged;
50 extern NSString *
const VLCMediaPlayerLoudnessChanged;
55 typedef NS_ENUM(NSInteger, VLCMediaPlayerState)
57 VLCMediaPlayerStateStopped,
58 VLCMediaPlayerStateOpening,
59 VLCMediaPlayerStateBuffering,
60 VLCMediaPlayerStateEnded,
61 VLCMediaPlayerStateError,
62 VLCMediaPlayerStatePlaying,
63 VLCMediaPlayerStatePaused,
64 VLCMediaPlayerStateESAdded
70 typedef NS_ENUM(
unsigned, VLCMediaPlaybackNavigationAction)
72 VLCMediaPlaybackNavigationActionActivate = 0,
73 VLCMediaPlaybackNavigationActionUp,
74 VLCMediaPlaybackNavigationActionDown,
75 VLCMediaPlaybackNavigationActionLeft,
76 VLCMediaPlaybackNavigationActionRight
82 typedef NS_ENUM(NSInteger, VLCDeinterlace)
84 VLCDeinterlaceAuto = -1,
104 @property (readonly, atomic) int64_t
date;
113 extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
127 - (void)mediaPlayerStateChanged:(NSNotification *)aNotification;
134 - (void)mediaPlayerTimeChanged:(NSNotification *)aNotification;
142 - (void)mediaPlayerTitleChanged:(NSNotification *)aNotification;
149 - (void)mediaPlayerChapterChanged:(NSNotification *)aNotification;
156 - (void)mediaPlayerLoudnessChanged:(NSNotification *)aNotification;
163 - (void)mediaPlayerSnapshot:(NSNotification *)aNotification;
176 - (void)mediaPlayer:(
VLCMediaPlayer *)player recordingStoppedAtPath:(NSString *)path;
193 @property (weak, nonatomic, nullable) id<VLCMediaPlayerDelegate> delegate;
195 #if !TARGET_OS_IPHONE
202 - (instancetype)initWithVideoView:(
VLCVideoView *)aVideoView;
208 - (instancetype)initWithVideoLayer:(
VLCVideoLayer *)aVideoLayer;
214 - (instancetype)initWithLibrary:(
VLCLibrary *)library;
220 - (instancetype)initWithOptions:(NSArray *)options;
227 - (instancetype)initWithLibVLCInstance:(
void *)playerInstance andLibrary:(
VLCLibrary *)library;
233 #pragma mark video functionality
235 #if !TARGET_OS_IPHONE
254 @property (strong, nullable)
id drawable;
264 @property (NS_NONATOMIC_IOSONLY, nullable)
char *videoAspectRatio;
272 @property (NS_NONATOMIC_IOSONLY, nullable)
char *videoCropGeometry;
283 @property (nonatomic)
float scaleFactor;
295 - (void)saveVideoSnapshotAt:(NSString *)path withWidth:(
int)width andHeight:(
int)height;
302 - (void)setDeinterlaceFilter: (nullable NSString *)name;
310 - (void)setDeinterlace:(VLCDeinterlace)deinterlace withFilter:(NSString *)name;
322 @property (nonatomic) BOOL adjustFilterEnabled __deprecated_msg(
"Use -[VLCMediaPlayer adjustFilter].enabled instead");
328 @property (nonatomic)
float contrast __deprecated_msg(
"Use -[VLCMediaPlayer adjustFilter].contrast instead");
334 @property (nonatomic)
float brightness __deprecated_msg(
"Use -[VLCMediaPlayer adjustFilter].brightness instead");
340 @property (nonatomic)
float hue __deprecated_msg(
"Use -[VLCMediaPlayer adjustFilter].hue instead");
346 @property (nonatomic)
float saturation __deprecated_msg(
"Use -[VLCMediaPlayer adjustFilter].saturation instead");
352 @property (nonatomic)
float gamma __deprecated_msg(
"Use -[VLCMediaPlayer adjustFilter].gamma instead");
362 @property (nonatomic)
float rate;
368 @property (nonatomic, readonly, weak)
VLCAudio * audio;
375 @property (NS_NONATOMIC_IOSONLY, readonly) CGSize videoSize;
383 @property (NS_NONATOMIC_IOSONLY, readonly) BOOL hasVideoOut;
390 @property (NS_NONATOMIC_IOSONLY, readonly)
float framesPerSecond __attribute__((deprecated));
404 @property (NS_NONATOMIC_IOSONLY, strong)
VLCTime *time;
411 @property (nonatomic, readonly, weak)
VLCTime *remainingTime;
414 #pragma mark ES track handling
423 @property (readwrite)
int currentVideoTrackIndex;
429 @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *videoTrackNames;
435 @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *videoTrackIndexes;
441 @property (NS_NONATOMIC_IOSONLY, readonly)
int numberOfVideoTracks;
450 @property (readwrite)
int currentVideoSubTitleIndex;
456 @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *videoSubTitlesNames;
462 @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *videoSubTitlesIndexes;
468 @property (NS_NONATOMIC_IOSONLY, readonly)
int numberOfSubtitlesTracks;
475 - (BOOL)openVideoSubTitlesFromFile:(NSString *)path __attribute__((deprecated));
480 typedef NS_ENUM(
unsigned, VLCMediaPlaybackSlaveType)
482 VLCMediaPlaybackSlaveTypeSubtitle = 0,
483 VLCMediaPlaybackSlaveTypeAudio
494 - (int)addPlaybackSlave:(NSURL *)slaveURL type:(VLCMediaPlaybackSlaveType)slaveType enforce:(BOOL)enforceSelection;
502 @property (readwrite) NSInteger currentVideoSubTitleDelay;
513 @property (readwrite)
int currentChapterIndex;
517 - (void)previousChapter;
526 - (int)numberOfChaptersForTitle:(
int)titleIndex;
532 - (NSArray *)chaptersForTitleIndex:(
int)titleIndex __attribute__((deprecated));
557 - (NSArray *)chapterDescriptionsOfTitle:(
int)titleIndex;
563 @property (readwrite)
int currentTitleIndex;
568 @property (readonly)
int numberOfTitles;
574 @property (readonly) NSUInteger countOfTitles __attribute__((deprecated));
579 @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *titles __attribute__((deprecated));
603 @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *titleDescriptions;
609 @property (readonly)
int indexOfLongestTitle;
620 @property (readwrite)
int currentAudioTrackIndex;
626 @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *audioTrackNames;
632 @property (NS_NONATOMIC_IOSONLY, readonly, copy) NSArray *audioTrackIndexes;
638 @property (NS_NONATOMIC_IOSONLY, readonly)
int numberOfAudioTracks;
641 #pragma mark audio functionality
647 @property (NS_NONATOMIC_IOSONLY)
int audioChannel;
655 @property (readwrite) NSInteger currentAudioPlaybackDelay;
663 #pragma mark equalizer
675 @property (weak, readonly) NSArray *equalizerProfiles DEPRECATED_MSG_ATTRIBUTE(
"Use -[VLCMediaPlayer equalizer] instead");
681 - (void)resetEqualizerFromProfile:(
unsigned)profile DEPRECATED_MSG_ATTRIBUTE("Use -[
VLCMediaPlayer equalizer] instead");
688 @property (readwrite) BOOL equalizerEnabled DEPRECATED_MSG_ATTRIBUTE(
"Use -[VLCMediaPlayer equalizer] instead");
695 @property (readwrite) CGFloat preAmplification DEPRECATED_MSG_ATTRIBUTE(
"Use -[VLCMediaPlayer equalizer] instead");
700 @property (readonly)
unsigned numberOfBands DEPRECATED_MSG_ATTRIBUTE(
"Use -[VLCMediaPlayer equalizer] instead");
706 - (CGFloat)frequencyOfBandAtIndex:(
unsigned)index DEPRECATED_MSG_ATTRIBUTE("Use -[
VLCMediaPlayer equalizer] instead");
712 - (void)setAmplification:(CGFloat)amplification forBand:(
unsigned)index DEPRECATED_MSG_ATTRIBUTE("Use -[
VLCMediaPlayer equalizer] instead");
718 - (CGFloat)amplificationOfBand:(
unsigned)index DEPRECATED_MSG_ATTRIBUTE("Use -[
VLCMediaPlayer equalizer] instead");
721 #pragma mark media handling
727 @property (NS_NONATOMIC_IOSONLY, strong, nullable)
VLCMedia *media;
730 #pragma mark playback operations
751 - (void)gotoNextFrame;
762 - (void)fastForwardAtRate:(
float)rate;
773 - (void)rewindAtRate:(
float)rate;
779 - (void)jumpBackward:(
int)interval;
785 - (void)jumpForward:(
int)interval;
790 - (void)extraShortJumpBackward;
795 - (void)extraShortJumpForward;
800 - (void)shortJumpBackward;
805 - (void)shortJumpForward;
810 - (void)mediumJumpBackward;
815 - (void)mediumJumpForward;
820 - (void)longJumpBackward;
825 - (void)longJumpForward;
830 - (void)performNavigationAction:(VLCMediaPlaybackNavigationAction)action;
843 - (BOOL)updateViewpoint:(
float)yaw pitch:(
float)pitch roll:(
float)roll fov:(
float)fov absolute:(BOOL)absolute;
850 @property (nonatomic)
float yaw;
857 @property (nonatomic)
float pitch;
864 @property (nonatomic)
float roll;
871 @property (nonatomic)
float fov;
874 #pragma mark playback information
879 @property (NS_NONATOMIC_IOSONLY, getter=isPlaying, readonly) BOOL playing;
885 @property (NS_NONATOMIC_IOSONLY, readonly) BOOL willPlay;
891 @property (NS_NONATOMIC_IOSONLY, readonly) VLCMediaPlayerState state;
897 @property (NS_NONATOMIC_IOSONLY)
float position;
904 @property (NS_NONATOMIC_IOSONLY, getter=isSeekable, readonly) BOOL seekable;
910 @property (NS_NONATOMIC_IOSONLY, readonly) BOOL canPause;
917 @property (NS_NONATOMIC_IOSONLY, readonly, copy, nullable) NSArray *snapshots;
926 @property (NS_NONATOMIC_IOSONLY, readonly, nullable) UIImage *lastSnapshot;
934 @property (NS_NONATOMIC_IOSONLY, readonly, nullable) NSImage *lastSnapshot;
942 - (BOOL)startRecordingAtPath:(NSString *)path;
948 - (BOOL)stopRecording;
951 #pragma mark Renderer
962 #endif // !TARGET_OS_TV
964 NS_ASSUME_NONNULL_END