Commit 29f6f780 authored by Jean-Paul Saman's avatar Jean-Paul Saman

zvbi: patch for building against older libzvbi0wq

parent 8b4543fd
...@@ -102,6 +102,7 @@ vlc_module_end () ...@@ -102,6 +102,7 @@ vlc_module_end ()
****************************************************************************/ ****************************************************************************/
// #define ZVBI_DEBUG // #define ZVBI_DEBUG
// #define EVENTKEY
//Guessing table for missing "default region triplet" //Guessing table for missing "default region triplet"
static const int pi_default_triplet[] = { static const int pi_default_triplet[] = {
...@@ -189,8 +190,11 @@ static int Opaque( vlc_object_t *p_this, char const *psz_cmd, ...@@ -189,8 +190,11 @@ static int Opaque( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data ); vlc_value_t oldval, vlc_value_t newval, void *p_data );
static int Position( vlc_object_t *p_this, char const *psz_cmd, static int Position( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data ); vlc_value_t oldval, vlc_value_t newval, void *p_data );
#if defined(EVENTKEY)
static int EventKey( vlc_object_t *p_this, char const *psz_cmd, static int EventKey( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data ); vlc_value_t oldval, vlc_value_t newval, void *p_data );
#endif
/***************************************************************************** /*****************************************************************************
* Open: probe the decoder and return score * Open: probe the decoder and return score
...@@ -268,8 +272,10 @@ static int Open( vlc_object_t *p_this ) ...@@ -268,8 +272,10 @@ static int Open( vlc_object_t *p_this )
p_sys->b_text = var_CreateGetBool( p_dec, "vbi-text" ); p_sys->b_text = var_CreateGetBool( p_dec, "vbi-text" );
// var_AddCallback( p_dec, "vbi-text", Text, p_sys ); // var_AddCallback( p_dec, "vbi-text", Text, p_sys );
#if defined(EVENTKEY)
/* Listen for keys */ /* Listen for keys */
var_AddCallback( p_dec->p_libvlc, "key-pressed", EventKey, p_dec ); var_AddCallback( p_dec->p_libvlc, "key-pressed", EventKey, p_dec );
#endif
es_format_Init( &p_dec->fmt_out, SPU_ES, VLC_FOURCC( 's','p','u',' ' ) ); es_format_Init( &p_dec->fmt_out, SPU_ES, VLC_FOURCC( 's','p','u',' ' ) );
if( p_sys->b_text ) if( p_sys->b_text )
...@@ -290,7 +296,10 @@ static void Close( vlc_object_t *p_this ) ...@@ -290,7 +296,10 @@ static void Close( vlc_object_t *p_this )
var_DelCallback( p_dec, "vbi-position", Position, 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-opaque", Opaque, p_sys );
var_DelCallback( p_dec, "vbi-page", RequestPage, p_sys ); var_DelCallback( p_dec, "vbi-page", RequestPage, p_sys );
#if defined(EVENTKEY)
var_DelCallback( p_dec->p_libvlc, "key-pressed", EventKey, p_dec ); var_DelCallback( p_dec->p_libvlc, "key-pressed", EventKey, p_dec );
#endif
vlc_mutex_destroy( &p_sys->lock ); vlc_mutex_destroy( &p_sys->lock );
...@@ -662,6 +671,7 @@ static int Position( vlc_object_t *p_this, char const *psz_cmd, ...@@ -662,6 +671,7 @@ static int Position( vlc_object_t *p_this, char const *psz_cmd,
return VLC_SUCCESS; return VLC_SUCCESS;
} }
#if defined(EVENTKEY)
static int EventKey( vlc_object_t *p_this, char const *psz_cmd, static int EventKey( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data ) vlc_value_t oldval, vlc_value_t newval, void *p_data )
{ {
...@@ -716,3 +726,5 @@ static int EventKey( vlc_object_t *p_this, char const *psz_cmd, ...@@ -716,3 +726,5 @@ static int EventKey( vlc_object_t *p_this, char const *psz_cmd,
return VLC_SUCCESS; return VLC_SUCCESS;
} }
#endif
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