Commit 1c2aaca7 authored by Felix Paul Kühne's avatar Felix Paul Kühne

Fix 'hue' variable type

parent f246c938
......@@ -223,9 +223,9 @@ extern NSString * VLCMediaPlayerStateToString(VLCMediaPlayerState state);
/**
* Set/Get the adjust filter's hue value
*
* \param integer value (range: 0-360, default: 0)
* \param float value (range: -180-180, default: 0.)
*/
@property (nonatomic) int hue;
@property (nonatomic) float hue;
/**
* Set/Get the adjust filter's saturation value
*
......
......@@ -585,18 +585,20 @@ static void HandleMediaPlayerSnapshot(const libvlc_event_t * event, void * self)
libvlc_video_set_adjust_float(_playerInstance, libvlc_adjust_Brightness, f_value);
}
}
- (int)hue
- (float)hue
{
libvlc_video_set_adjust_int(_playerInstance, libvlc_adjust_Enable, 1);
return libvlc_video_get_adjust_int(_playerInstance, libvlc_adjust_Hue);
return libvlc_video_get_adjust_float(_playerInstance, libvlc_adjust_Hue);
}
- (void)setHue:(int)i_value
- (void)setHue:(float)f_value
{
if (i_value <= 360 && i_value >= 0) {
if (f_value <= 180. && f_value >= -180.) {
libvlc_video_set_adjust_int(_playerInstance, libvlc_adjust_Enable, 1);
libvlc_video_set_adjust_int(_playerInstance, libvlc_adjust_Hue, i_value);
libvlc_video_set_adjust_float(_playerInstance, libvlc_adjust_Hue, f_value);
}
}
- (float)saturation
{
libvlc_video_set_adjust_int(_playerInstance, libvlc_adjust_Enable, 1);
......
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