Commit 3154a8b7 authored by Felix Paul Kühne's avatar Felix Paul Kühne

osx/framework: fixed a typo and enabled the framework to open external subtitle files

parent 6ee778a4
......@@ -108,6 +108,7 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
- (void)setVideoSubTitles:(int)value;
- (int)countOfVideoSubTitles;
- (int)currentVideoSubTitles;
- (BOOL)openVideoSubTitlesFromFile:(NSString *)path;
- (void)setVideoCropGeometry:(char *)value;
- (char *)videoCropGeometry;
......
......@@ -76,8 +76,8 @@ void __catch_exception( void * e, const char * function, const char * file, int
[defaultParams addObject:@"--ignore-config"]; // Don't read and write VLC config files
[defaultParams addObject:@"--opengl-provider=minimal_macosx"]; // Use minimal_macosx
[defaultParams addObject:@"--vout=minimal_macosx"];
[defaultParams addObject:@"--text-renderer=quartztext"]; // our CoreText-based renderer
[defaultParams addObject:@"--verbose=2"]; // Don't polute the log
[defaultParams addObject:@"--vout=minimal_macosx"];
[defaultParams addObject:@"--no-color"];
vlcParams = defaultParams;
}
......
......@@ -287,7 +287,7 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
{
libvlc_exception_t ex;
libvlc_exception_init( &ex );
int result = libvlc_video_get_spu( instance, &ex );
int result = libvlc_video_get_spu_count( instance, &ex );
catch_exception( &ex );
return result;
}
......@@ -309,6 +309,15 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
}
}
- (BOOL)openVideoSubTitlesFromFile:(NSString *)path
{
libvlc_exception_t ex;
libvlc_exception_init( &ex );
BOOL result = libvlc_video_set_subtitle_file( instance, [path UTF8String], &ex );
catch_exception( &ex );
return result;
}
- (void)setVideoCropGeometry:(char *)value
{
libvlc_exception_t 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