Commit 385ff17d authored by Jean-Paul Saman's avatar Jean-Paul Saman Committed by Jean-Paul Saman

Add callback to vbi-opaque setting to change it at runtime from the gui.

parent 04372454
......@@ -103,6 +103,9 @@ static void event_handler(vbi_event *ev, void *user_data);
static int RequestPage( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data );
static int Opaque( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data );
/*****************************************************************************
* Open: probe the decoder and return score
*****************************************************************************
......@@ -147,7 +150,7 @@ static int Open( vlc_object_t *p_this )
var_AddCallback( p_dec->p_libvlc, "vbi-page", RequestPage, p_sys );
p_sys->b_opaque = var_CreateGetBool( p_dec, "vbi-opaque" );
var_AddCallback( p_dec, "vbi-opaque", Opaque, p_sys );
return VLC_SUCCESS;
}
......@@ -374,3 +377,13 @@ static int RequestPage( vlc_object_t *p_this, char const *psz_cmd,
return VLC_SUCCESS;
}
static int Opaque( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
decoder_sys_t *p_sys = p_data;
if( p_sys )
p_sys->b_opaque = newval.b_bool;
return VLC_SUCCESS;
}
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