[vlc-devel] [PATCH] ZVBI: remove never invoked callbacks
Stefan Pöschel
basic.master at gmx.de
Sat Jan 30 11:52:23 CET 2016
The settings vbi-opaque and vbi-position do not appear on global level. So the
regarding variable callbacks are never invoked and therefore can be removed.
---
modules/codec/zvbi.c | 38 --------------------------------------
1 file changed, 38 deletions(-)
diff --git a/modules/codec/zvbi.c b/modules/codec/zvbi.c
index 4d4eaa2..6683cc1 100644
--- a/modules/codec/zvbi.c
+++ b/modules/codec/zvbi.c
@@ -176,10 +176,6 @@ static int get_last_visible_row( vbi_char *p_text, int rows, int columns);
/* Properties callbacks */
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 );
-static int Position( vlc_object_t *p_this, char const *psz_cmd,
- vlc_value_t oldval, vlc_value_t newval, void *p_data );
static int EventKey( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data );
@@ -247,13 +243,8 @@ static int Open( vlc_object_t *p_this )
p_sys->i_wanted_subpage = VBI_ANY_SUBNO;
p_sys->b_opaque = var_CreateGetBool( p_dec, "vbi-opaque" );
- var_AddCallback( p_dec, "vbi-opaque", Opaque, p_sys );
-
p_sys->i_align = var_CreateGetInteger( p_dec, "vbi-position" );
- var_AddCallback( p_dec, "vbi-position", Position, p_sys );
-
p_sys->b_text = var_CreateGetBool( p_dec, "vbi-text" );
-// var_AddCallback( p_dec, "vbi-text", Text, p_sys );
/* Listen for keys */
var_AddCallback( p_dec->p_libvlc, "key-pressed", EventKey, p_dec );
@@ -276,8 +267,6 @@ static void Close( vlc_object_t *p_this )
decoder_t *p_dec = (decoder_t*) p_this;
decoder_sys_t *p_sys = p_dec->p_sys;
- var_DelCallback( p_dec, "vbi-position", Position, p_sys );
- var_DelCallback( p_dec, "vbi-opaque", Opaque, p_sys );
var_DelCallback( p_dec, "vbi-page", RequestPage, p_sys );
var_DelCallback( p_dec->p_libvlc, "key-pressed", EventKey, p_dec );
@@ -711,33 +700,6 @@ 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;
- VLC_UNUSED(p_this); VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval);
-
- vlc_mutex_lock( &p_sys->lock );
- p_sys->b_opaque = newval.b_bool;
- p_sys->b_update = true;
- vlc_mutex_unlock( &p_sys->lock );
-
- return VLC_SUCCESS;
-}
-
-static int Position( 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;
- VLC_UNUSED(p_this); VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval);
-
- vlc_mutex_lock( &p_sys->lock );
- p_sys->i_align = newval.i_int;
- vlc_mutex_unlock( &p_sys->lock );
-
- return VLC_SUCCESS;
-}
-
static int EventKey( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
--
2.7.0
More information about the vlc-devel
mailing list