Commit 7e90ec60 authored by Mark Moriarty's avatar Mark Moriarty

Changed logo and marq control variables to attach to ->p_libvlc, to be persistent.

parent c7e557a1
...@@ -890,12 +890,12 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, ...@@ -890,12 +890,12 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd,
if( strlen( newval.psz_string ) > 0 ) if( strlen( newval.psz_string ) > 0 )
{ {
val.psz_string = newval.psz_string; val.psz_string = newval.psz_string;
var_Set( p_inp, "marq-marquee", val ); var_Set( p_inp->p_libvlc, "marq-marquee", val );
} }
else else
{ {
val.psz_string = ""; val.psz_string = "";
var_Set( p_inp, "marq-marquee", val); var_Set( p_inp->p_libvlc, "marq-marquee", val);
} }
} }
else if( !strcmp( psz_cmd, "marq-x" ) ) else if( !strcmp( psz_cmd, "marq-x" ) )
...@@ -903,7 +903,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, ...@@ -903,7 +903,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd,
if( strlen( newval.psz_string ) > 0) if( strlen( newval.psz_string ) > 0)
{ {
val.i_int = atoi( newval.psz_string ); val.i_int = atoi( newval.psz_string );
var_Set( p_inp, "marq-x", val ); var_Set( p_inp->p_libvlc, "marq-x", val );
} }
} }
else if( !strcmp( psz_cmd, "marq-y" ) ) else if( !strcmp( psz_cmd, "marq-y" ) )
...@@ -911,7 +911,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, ...@@ -911,7 +911,7 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd,
if( strlen( newval.psz_string ) > 0) if( strlen( newval.psz_string ) > 0)
{ {
val.i_int = atoi( newval.psz_string ); val.i_int = atoi( newval.psz_string );
var_Set( p_inp, "marq-y", val ); var_Set( p_inp->p_libvlc, "marq-y", val );
} }
} }
else if( !strcmp( psz_cmd, "marq-timeout" ) ) else if( !strcmp( psz_cmd, "marq-timeout" ) )
......
...@@ -573,7 +573,7 @@ static int CreateFilter( vlc_object_t *p_this ) ...@@ -573,7 +573,7 @@ static int CreateFilter( vlc_object_t *p_this )
return VLC_ENOOBJ; return VLC_ENOOBJ;
} }
p_sys->psz_filename = var_CreateGetString( p_input , "logo-file" ); p_sys->psz_filename = var_CreateGetString( p_input->p_libvlc , "logo-file" );
if( !p_sys->psz_filename || !*p_sys->psz_filename ) if( !p_sys->psz_filename || !*p_sys->psz_filename )
{ {
msg_Err( p_this, "logo file not specified" ); msg_Err( p_this, "logo file not specified" );
...@@ -582,17 +582,17 @@ static int CreateFilter( vlc_object_t *p_this ) ...@@ -582,17 +582,17 @@ static int CreateFilter( vlc_object_t *p_this )
return 0; return 0;
} }
p_sys->posx = var_CreateGetInteger( p_input , "logo-x" ); p_sys->posx = var_CreateGetInteger( p_input->p_libvlc , "logo-x" );
p_sys->posy = var_CreateGetInteger( p_input , "logo-y" ); p_sys->posy = var_CreateGetInteger( p_input->p_libvlc , "logo-y" );
p_sys->pos = var_CreateGetInteger( p_input , "logo-position" ); p_sys->pos = var_CreateGetInteger( p_input->p_libvlc , "logo-position" );
p_sys->i_trans = var_CreateGetInteger( p_input, "logo-transparency"); p_sys->i_trans = var_CreateGetInteger( p_input->p_libvlc, "logo-transparency");
p_sys->i_trans = __MAX( __MIN( p_sys->i_trans, 255 ), 0 ); p_sys->i_trans = __MAX( __MIN( p_sys->i_trans, 255 ), 0 );
var_AddCallback( p_input, "logo-file", LogoCallback, p_sys ); var_AddCallback( p_input->p_libvlc, "logo-file", LogoCallback, p_sys );
var_AddCallback( p_input, "logo-x", LogoCallback, p_sys ); var_AddCallback( p_input->p_libvlc, "logo-x", LogoCallback, p_sys );
var_AddCallback( p_input, "logo-y", LogoCallback, p_sys ); var_AddCallback( p_input->p_libvlc, "logo-y", LogoCallback, p_sys );
var_AddCallback( p_input, "logo-position", LogoCallback, p_sys ); var_AddCallback( p_input->p_libvlc, "logo-position", LogoCallback, p_sys );
var_AddCallback( p_input, "logo-transparency", LogoCallback, p_sys ); var_AddCallback( p_input->p_libvlc, "logo-transparency", LogoCallback, p_sys );
vlc_object_release( p_input ); vlc_object_release( p_input );
p_sys->b_absolute = VLC_TRUE; p_sys->b_absolute = VLC_TRUE;
...@@ -639,11 +639,11 @@ static void DestroyFilter( vlc_object_t *p_this ) ...@@ -639,11 +639,11 @@ static void DestroyFilter( vlc_object_t *p_this )
p_input = vlc_object_find( p_this, VLC_OBJECT_INPUT, FIND_PARENT ); p_input = vlc_object_find( p_this, VLC_OBJECT_INPUT, FIND_PARENT );
if( !p_input ) return; if( !p_input ) return;
var_Destroy( p_input , "logo-file" ); var_Destroy( p_input->p_libvlc , "logo-file" );
var_Destroy( p_input , "logo-x" ); var_Destroy( p_input->p_libvlc , "logo-x" );
var_Destroy( p_input , "logo-y" ); var_Destroy( p_input->p_libvlc , "logo-y" );
var_Destroy( p_input , "logo-position" ); var_Destroy( p_input->p_libvlc , "logo-position" );
var_Destroy( p_input , "logo-transparency" ); var_Destroy( p_input->p_libvlc , "logo-transparency" );
vlc_object_release( p_input ); vlc_object_release( p_input );
} }
......
...@@ -104,23 +104,22 @@ static int CreateFilter( vlc_object_t *p_this ) ...@@ -104,23 +104,22 @@ static int CreateFilter( vlc_object_t *p_this )
return VLC_ENOMEM; return VLC_ENOMEM;
} }
/* hook to the playlist */ /* Hook used for callback variables */
p_input = vlc_object_find( p_this, VLC_OBJECT_INPUT, FIND_ANYWHERE ); p_input = vlc_object_find( p_this, VLC_OBJECT_INPUT, FIND_ANYWHERE );
if( !p_input ) if( !p_input )
{ {
return VLC_ENOOBJ; return VLC_ENOOBJ;
} }
/* p_access->p_libvlc p_demux->p_libvlc */
p_sys->i_xoff = var_CreateGetInteger( p_input , "marq-x" ); p_sys->i_xoff = var_CreateGetInteger( p_input->p_libvlc , "marq-x" );
p_sys->i_yoff = var_CreateGetInteger( p_input , "marq-y" ); p_sys->i_yoff = var_CreateGetInteger( p_input->p_libvlc , "marq-y" );
p_sys->i_timeout = var_CreateGetInteger( p_input , "marq-timeout" ); p_sys->i_timeout = var_CreateGetInteger( p_input->p_libvlc , "marq-timeout" );
p_sys->psz_marquee = var_CreateGetString( p_input, "marq-marquee" ); p_sys->psz_marquee = var_CreateGetString( p_input->p_libvlc, "marq-marquee" );
var_AddCallback( p_input, "marq-x", MarqueeCallback, p_sys ); var_AddCallback( p_input->p_libvlc, "marq-x", MarqueeCallback, p_sys );
var_AddCallback( p_input, "marq-y", MarqueeCallback, p_sys ); var_AddCallback( p_input->p_libvlc, "marq-y", MarqueeCallback, p_sys );
var_AddCallback( p_input, "marq-marquee", MarqueeCallback, p_sys ); var_AddCallback( p_input->p_libvlc, "marq-marquee", MarqueeCallback, p_sys );
var_AddCallback( p_input, "marq-timeout", MarqueeCallback, p_sys ); var_AddCallback( p_input->p_libvlc, "marq-timeout", MarqueeCallback, p_sys );
vlc_object_release( p_input ); vlc_object_release( p_input );
...@@ -149,10 +148,10 @@ static void DestroyFilter( vlc_object_t *p_this ) ...@@ -149,10 +148,10 @@ static void DestroyFilter( vlc_object_t *p_this )
{ {
return; return;
} }
var_Destroy( p_input , "marq-marquee" ); var_Destroy( p_input->p_libvlc , "marq-marquee" );
var_Destroy( p_input , "marq-x" ); var_Destroy( p_input->p_libvlc , "marq-x" );
var_Destroy( p_input , "marq-y" ); var_Destroy( p_input->p_libvlc , "marq-y" );
var_Destroy( p_input , "marq-timeout" ); var_Destroy( p_input->p_libvlc , "marq-timeout" );
vlc_object_release( p_input ); vlc_object_release( p_input );
} }
......
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