Commit fa7f356a authored by Felix Paul Kühne's avatar Felix Paul Kühne

VLCMediaPlayer: expand the API by adding setter/getter for the video scale factor

Needs additional testing
parent 0ad3f78e
......@@ -123,6 +123,17 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
- (void)setVideoCropGeometry:(char *)value;
- (char *)videoCropGeometry;
/**
* Set/Get the current video scaling factor.
* That is the ratio of the number of pixels on
* screen to the number of pixels in the original decoded video in each
* dimension. Zero is a special value; it will adjust the video to the output
* window/drawable (in windowed mode) or the entire screen.
*
* \param relative scale factor as float
*/
@property (readwrite) float scaleFactor;
/**
* Take a snapshot of the current video.
*
......
......@@ -378,6 +378,16 @@ static void HandleMediaPlayerMediaChanged(const libvlc_event_t * event, void * s
return result;
}
- (void)setScaleFactor:(float)value
{
libvlc_video_set_scale(instance, value);
}
- (float)scaleFactor
{
return libvlc_video_get_scale(instance);
}
- (void)saveVideoSnapshotAt:(NSString *)path withWidth:(NSUInteger)width andHeight:(NSUInteger)height
{
int failure = libvlc_video_take_snapshot(instance, 0, [path UTF8String], width, height);
......
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