Commit 2d46bfc2 authored by Felix Paul Kühne's avatar Felix Paul Kühne

osx/framework: added wrapper methods for snapshots and deinterlacing

parent 93f7584b
......@@ -112,6 +112,26 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
- (void)setVideoTeleText:(int)value;
- (int)videoTeleText;
/**
* Take a snapshot of the current video.
*
* If width AND height is 0, original size is used.
* If width OR height is 0, original aspect-ratio is preserved.
*
* \param path the path where to save the screenshot to
* \param width the snapshot's width
* \param height the snapshot's height
*/
- (void)saveVideoSnapshotAt: (NSString *)path withWidth:(NSUInteger)width andHeight:(NSUInteger)height;
/**
* Enable or disable deinterlace filter
*
* \param name of deinterlace filter to use (availability depends on underlying VLC version)
* \param enable boolean to enable or disable deinterlace filter
*/
- (void)setDeinterlaceFilter: (NSString *)name enabled: (BOOL)enabled;
@property float rate;
@property (readonly) VLCAudio * audio;
......
......@@ -304,6 +304,22 @@ static void HandleMediaInstanceStateChanged(const libvlc_event_t * event, void *
return result;
}
- (void)saveVideoSnapshotAt: (NSString *)path withWidth:(NSUInteger)width andHeight:(NSUInteger)height
{
libvlc_exception_t ex;
libvlc_exception_init( &ex );
libvlc_video_take_snapshot( instance, [path UTF8String], width, height, &ex );
catch_exception( &ex );
}
- (void)setDeinterlaceFilter: (NSString *)name enabled: (BOOL)enabled
{
libvlc_exception_t ex;
libvlc_exception_init( &ex );
libvlc_video_set_deinterlace( instance, (int)enabled , [name UTF8String], &ex );
catch_exception( &ex );
}
- (void)setRate:(float)value
{
libvlc_media_player_set_rate( instance, value, NULL );
......
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