Commit 6ee778a4 authored by Felix Paul Kühne's avatar Felix Paul Kühne

osx/framework: renamed a few methods for consistency, added an addition subs method

additionally, this changes the playback behavior of VLCKit. play-and-pause is no longer enabled.
parent 42a16215
...@@ -106,7 +106,8 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state); ...@@ -106,7 +106,8 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
- (void)setVideoAspectRatio:(char *)value; - (void)setVideoAspectRatio:(char *)value;
- (char *)videoAspectRatio; - (char *)videoAspectRatio;
- (void)setVideoSubTitles:(int)value; - (void)setVideoSubTitles:(int)value;
- (int)videoSubTitles; - (int)countOfVideoSubTitles;
- (int)currentVideoSubTitles;
- (void)setVideoCropGeometry:(char *)value; - (void)setVideoCropGeometry:(char *)value;
- (char *)videoCropGeometry; - (char *)videoCropGeometry;
...@@ -159,16 +160,16 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state); ...@@ -159,16 +160,16 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
@property (readonly) int fps; @property (readonly) int fps;
- (void)setChapter:(int)value; - (void)setChapter:(int)value;
- (int)chapter; - (int)currentChapter;
- (int)countOfChapters; - (int)countOfChapters;
- (void)setTitle:(int)value; - (void)setCurrentTitle:(int)value;
- (int)title; - (int)currentTitle;
- (int)countOfTitles; - (int)countOfTitles;
/* Audio Options */ /* Audio Options */
- (void)setAudioTrack:(int)value; - (void)setAudioTrack:(int)value;
- (int)audioTrack; - (int)currentAudioTrack;
- (int)countOfAudioTracks; - (int)countOfAudioTracks;
- (void)setAudioChannel:(int)value; - (void)setAudioChannel:(int)value;
......
...@@ -79,7 +79,6 @@ void __catch_exception( void * e, const char * function, const char * file, int ...@@ -79,7 +79,6 @@ void __catch_exception( void * e, const char * function, const char * file, int
[defaultParams addObject:@"--verbose=2"]; // Don't polute the log [defaultParams addObject:@"--verbose=2"]; // Don't polute the log
[defaultParams addObject:@"--vout=minimal_macosx"]; [defaultParams addObject:@"--vout=minimal_macosx"];
[defaultParams addObject:@"--no-color"]; [defaultParams addObject:@"--no-color"];
[defaultParams addObject:@"--play-and-pause"]; // When ending a stream pause it instead of stopping it
vlcParams = defaultParams; vlcParams = defaultParams;
} }
......
...@@ -283,7 +283,7 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void * ...@@ -283,7 +283,7 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
catch_exception( &ex ); catch_exception( &ex );
} }
- (int)videoSubTitles - (int)countOfVideoSubTitles
{ {
libvlc_exception_t ex; libvlc_exception_t ex;
libvlc_exception_init( &ex ); libvlc_exception_init( &ex );
...@@ -292,6 +292,23 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void * ...@@ -292,6 +292,23 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
return result; return result;
} }
- (int)currentVideoSubTitles
{
libvlc_exception_t ex;
libvlc_exception_init( &ex );
int result = libvlc_video_get_spu( instance, &ex );
if (libvlc_exception_raised(&ex))
{
libvlc_exception_clear(&ex);
return -1;
}
else
{
libvlc_exception_clear(&ex);
return result;
}
}
- (void)setVideoCropGeometry:(char *)value - (void)setVideoCropGeometry:(char *)value
{ {
libvlc_exception_t ex; libvlc_exception_t ex;
...@@ -467,7 +484,7 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void * ...@@ -467,7 +484,7 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
catch_exception( &ex ); catch_exception( &ex );
} }
- (void)setTitle:(int)value - (void)setCurrentTitle:(int)value
{ {
libvlc_exception_t ex; libvlc_exception_t ex;
libvlc_exception_init( &ex ); libvlc_exception_init( &ex );
...@@ -501,7 +518,7 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void * ...@@ -501,7 +518,7 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
catch_exception( &ex ); catch_exception( &ex );
} }
- (int)audioTrack - (int)currentAudioTrack
{ {
libvlc_exception_t ex; libvlc_exception_t ex;
libvlc_exception_init( &ex ); libvlc_exception_init( &ex );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment