[vlc-devel] [PATCH 2/2] Add Brightness control
Edward Wang
edward.c.wang at compdigitec.com
Mon Nov 18 01:40:49 CET 2013
On 2013-11-17 19:20, Jean-Baptiste Kempf <jb at videolan.org> wrote:
> Close #3792
> ---
> modules/control/hotkeys.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
> index e23156e..c409c24 100644
> --- a/modules/control/hotkeys.c
> +++ b/modules/control/hotkeys.c
> @@ -1036,6 +1036,26 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
> if( p_vout && vout_OSDEpg( p_vout, input_GetItem( p_input ) ) )
> DisplayPosition( p_intf, p_vout, p_input );
> break;
> +
> + case ACTIONID_BRIGHTNESS_UP:
> + case ACTIONID_BRIGHTNESS_DOWN:
> + if( p_vout )
> + {
> + vout_EnableFilter( p_vout, "adjust", 1, false );
> +
> + vlc_object_t *p_adjust = vlc_object_find_name( p_vout, "adjust" );
Wasn't this function supposed to be deprecated?
> +
> + if( p_adjust )
> + {
> + float f = var_InheritFloat( p_adjust, "brightness" );
> + if( i_action == ACTIONID_BRIGHTNESS_UP )
> + var_SetFloat( p_adjust, "brightness", __MIN(f + 0.1, 2.0) );
> + else
> + var_SetFloat( p_adjust, "brightness", __MAX(f - 0.1, 0.0) );
> + }
> + }
> +
> + break;
> }
>
> if( p_vout )
> -- 1.8.4.2
More information about the vlc-devel
mailing list