Commit 73ebd279 authored by Sebastien Zwickert's avatar Sebastien Zwickert Committed by Pierre d'Herbemont

macosx/framework: Remove the newly removed exception parameter from libvlc_video_*

Signed-off-by: default avatarPierre d'Herbemont <pdherbemont@free.fr>
parent 3adb049b
...@@ -125,10 +125,9 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state); ...@@ -125,10 +125,9 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
/** /**
* Enable or disable deinterlace filter * Enable or disable deinterlace filter
* *
* \param name of deinterlace filter to use (availability depends on underlying VLC version) * \param name of deinterlace filter to use (availability depends on underlying VLC version), NULL to disable.
* \param enable boolean to enable or disable deinterlace filter
*/ */
- (void)setDeinterlaceFilter: (NSString *)name enabled: (BOOL)enabled; - (void)setDeinterlaceFilter: (NSString *)name;
@property float rate; @property float rate;
......
...@@ -270,32 +270,17 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s ...@@ -270,32 +270,17 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
- (void)setCurrentVideoSubTitleIndex:(NSUInteger)index - (void)setCurrentVideoSubTitleIndex:(NSUInteger)index
{ {
libvlc_exception_t ex; libvlc_video_set_spu( instance, (int)index );
libvlc_exception_init( &ex );
libvlc_video_set_spu( instance, (int)index, &ex );
catch_exception( &ex );
} }
- (NSUInteger)currentVideoSubTitleIndex - (NSUInteger)currentVideoSubTitleIndex
{ {
libvlc_exception_t ex; NSInteger count = libvlc_video_get_spu_count(instance);
libvlc_exception_init( &ex );
NSInteger count = libvlc_video_get_spu_count( instance, &ex );
if (libvlc_exception_raised( &ex ))
{
libvlc_exception_clear( &ex );
return NSNotFound;
}
if (count <= 0) if (count <= 0)
return NSNotFound; return NSNotFound;
NSUInteger result = libvlc_video_get_spu( instance, &ex );
if (libvlc_exception_raised( &ex )) return libvlc_video_get_spu(instance);
{
libvlc_exception_clear( &ex );
return NSNotFound;
}
else
return result;
} }
- (BOOL)openVideoSubTitlesFromFile:(NSString *)path - (BOOL)openVideoSubTitlesFromFile:(NSString *)path
...@@ -322,52 +307,37 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s ...@@ -322,52 +307,37 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
- (void)setVideoCropGeometry:(char *)value - (void)setVideoCropGeometry:(char *)value
{ {
libvlc_exception_t ex; libvlc_video_set_crop_geometry( instance, value );
libvlc_exception_init( &ex );
libvlc_video_set_crop_geometry( instance, value, &ex );
catch_exception( &ex );
} }
- (char *)videoCropGeometry - (char *)videoCropGeometry
{ {
libvlc_exception_t ex; char * result = libvlc_video_get_crop_geometry( instance );
libvlc_exception_init( &ex );
char * result = libvlc_video_get_crop_geometry( instance, &ex );
catch_exception( &ex );
return result; return result;
} }
- (void)setVideoAspectRatio:(char *)value - (void)setVideoAspectRatio:(char *)value
{ {
libvlc_exception_t ex; libvlc_video_set_aspect_ratio( instance, value );
libvlc_exception_init( &ex );
libvlc_video_set_aspect_ratio( instance, value, &ex );
catch_exception( &ex );
} }
- (char *)videoAspectRatio - (char *)videoAspectRatio
{ {
libvlc_exception_t ex; char * result = libvlc_video_get_aspect_ratio( instance );
libvlc_exception_init( &ex );
char * result = libvlc_video_get_aspect_ratio( instance, &ex );
catch_exception( &ex );
return result; return result;
} }
- (void)saveVideoSnapshotAt: (NSString *)path withWidth:(NSUInteger)width andHeight:(NSUInteger)height - (void)saveVideoSnapshotAt: (NSString *)path withWidth:(NSUInteger)width andHeight:(NSUInteger)height
{ {
libvlc_exception_t ex; libvlc_exception_t ex;
libvlc_exception_init( &ex ); libvlc_exception_init( &ex );
libvlc_video_take_snapshot( instance, [path UTF8String], width, height, &ex ); libvlc_video_take_snapshot( instance, [path UTF8String], width, height, &ex );
catch_exception( &ex ); catch_exception( &ex );
} }
- (void)setDeinterlaceFilter: (NSString *)name enabled: (BOOL)enabled - (void)setDeinterlaceFilter: (NSString *)name
{ {
libvlc_exception_t ex; libvlc_video_set_deinterlace( instance, [name UTF8String] );
libvlc_exception_init( &ex );
libvlc_video_set_deinterlace( instance, (int)enabled , [name UTF8String], &ex );
catch_exception( &ex );
} }
- (void)setRate:(float)value - (void)setRate:(float)value
...@@ -382,11 +352,8 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s ...@@ -382,11 +352,8 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
- (NSSize)videoSize - (NSSize)videoSize
{ {
libvlc_exception_t ex; NSSize result = NSMakeSize(libvlc_video_get_height((libvlc_media_player_t *)instance),
libvlc_exception_init( &ex ); libvlc_video_get_width((libvlc_media_player_t *)instance));
NSSize result = NSMakeSize(libvlc_video_get_height((libvlc_media_player_t *)instance, &ex),
libvlc_video_get_width((libvlc_media_player_t *)instance, &ex));
catch_exception( &ex );
return result; return result;
} }
......
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