Commit 75543f3d authored by Antoine Cellerier's avatar Antoine Cellerier

* mosaic.c, rc.c, rtci.c : callbacks to change mosaic sub filter

                            parameters on the fly
 * mosaic.c : center image in rectangle when keep aspect ratio is enabled
 * picture.c : remove debug message
parent ede8b843
...@@ -374,6 +374,31 @@ static void Run( intf_thread_t *p_intf ) ...@@ -374,6 +374,31 @@ static void Run( intf_thread_t *p_intf )
var_Create( p_intf, "marq-timeout", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND ); var_Create( p_intf, "marq-timeout", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "marq-timeout", Other, NULL ); var_AddCallback( p_intf, "marq-timeout", Other, NULL );
var_Create( p_intf, "mosaic-alpha", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-alpha", Other, NULL );
var_Create( p_intf, "mosaic-height", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-height", Other, NULL );
var_Create( p_intf, "mosaic-width", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-width", Other, NULL );
var_Create( p_intf, "mosaic-xoffset", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-xoffset", Other, NULL );
var_Create( p_intf, "mosaic-yoffset", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-yoffset", Other, NULL );
var_Create( p_intf, "mosaic-vborder", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-vborder", Other, NULL );
var_Create( p_intf, "mosaic-hborder", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-hborder", Other, NULL );
var_Create( p_intf, "mosaic-position",
VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-position", Other, NULL );
var_Create( p_intf, "mosaic-rows", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-rows", Other, NULL );
var_Create( p_intf, "mosaic-cols", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-cols", Other, NULL );
var_Create( p_intf, "mosaic-keep-aspect-ratio",
VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-keep-aspect-ratio", Other, NULL );
/* time on the fly items */ /* time on the fly items */
var_Create( p_intf, "time-format", VLC_VAR_VOID | VLC_VAR_ISCOMMAND ); var_Create( p_intf, "time-format", VLC_VAR_VOID | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "time-format", Other, NULL ); var_AddCallback( p_intf, "time-format", Other, NULL );
...@@ -388,7 +413,6 @@ static void Run( intf_thread_t *p_intf ) ...@@ -388,7 +413,6 @@ static void Run( intf_thread_t *p_intf )
var_Create( p_intf, "time-opacity", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND ); var_Create( p_intf, "time-opacity", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "time-opacity", Other, NULL ); var_AddCallback( p_intf, "time-opacity", Other, NULL );
var_Create( p_intf, "pause", VLC_VAR_VOID | VLC_VAR_ISCOMMAND ); var_Create( p_intf, "pause", VLC_VAR_VOID | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "pause", Input, NULL ); var_AddCallback( p_intf, "pause", Input, NULL );
var_Create( p_intf, "seek", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND ); var_Create( p_intf, "seek", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
...@@ -1028,6 +1052,94 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, ...@@ -1028,6 +1052,94 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd,
var_Set( p_inp, "marq-timeout", val ); var_Set( p_inp, "marq-timeout", val );
} }
} }
else if( !strcmp( psz_cmd, "mosaic-alpha" ) )
{
if( strlen( newval.psz_string) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-alpha", val );
}
}
else if( !strcmp( psz_cmd, "mosaic-height" ) )
{
if( strlen( newval.psz_string) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-height", val );
}
}
else if( !strcmp( psz_cmd, "mosaic-width" ) )
{
if( strlen( newval.psz_string) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-width", val );
}
}
else if( !strcmp( psz_cmd, "mosaic-xoffset" ) )
{
if( strlen( newval.psz_string) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-xoffset", val );
}
}
else if( !strcmp( psz_cmd, "mosaic-yoffset" ) )
{
if( strlen( newval.psz_string) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-yoffset", val );
}
}
else if( !strcmp( psz_cmd, "mosaic-vborder" ) )
{
if( strlen( newval.psz_string) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-vborder", val );
}
}
else if( !strcmp( psz_cmd, "mosaic-hborder" ) )
{
if( strlen( newval.psz_string) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-hborder", val );
}
}
else if( !strcmp( psz_cmd, "mosaic-position" ) )
{
if( strlen( newval.psz_string) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-position", val );
}
}
else if( !strcmp( psz_cmd, "mosaic-rows" ) )
{
if( strlen( newval.psz_string) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-rows", val );
}
}
else if( !strcmp( psz_cmd, "mosaic-cols" ) )
{
if( strlen( newval.psz_string) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-cols", val );
}
}
else if( !strcmp( psz_cmd, "mosaic-keep-aspect-ratio" ) )
{
if( strlen( newval.psz_string) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-keep-aspect-ratio", val );
}
}
else if( !strcmp( psz_cmd, "time-format" ) ) else if( !strcmp( psz_cmd, "time-format" ) )
{ {
if( strlen( newval.psz_string ) > 0 ) if( strlen( newval.psz_string ) > 0 )
......
...@@ -355,6 +355,31 @@ static void Run( intf_thread_t *p_intf ) ...@@ -355,6 +355,31 @@ static void Run( intf_thread_t *p_intf )
var_Create( p_intf, "marq-timeout", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND ); var_Create( p_intf, "marq-timeout", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "marq-timeout", Other, NULL ); var_AddCallback( p_intf, "marq-timeout", Other, NULL );
var_Create( p_intf, "mosaic-alpha", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-alpha", Other, NULL );
var_Create( p_intf, "mosaic-height", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-height", Other, NULL );
var_Create( p_intf, "mosaic-width", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-width", Other, NULL );
var_Create( p_intf, "mosaic-xoffset", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-xoffset", Other, NULL );
var_Create( p_intf, "mosaic-yoffset", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-yoffset", Other, NULL );
var_Create( p_intf, "mosaic-vborder", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-vborder", Other, NULL );
var_Create( p_intf, "mosaic-hborder", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-hborder", Other, NULL );
var_Create( p_intf, "mosaic-position",
VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-position", Other, NULL );
var_Create( p_intf, "mosaic-rows", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-rows", Other, NULL );
var_Create( p_intf, "mosaic-cols", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-cols", Other, NULL );
var_Create( p_intf, "mosaic-keep-aspect-ratio",
VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "mosaic-keep-aspect-ratio", Other, NULL );
var_Create( p_intf, "pause", VLC_VAR_VOID | VLC_VAR_ISCOMMAND ); var_Create( p_intf, "pause", VLC_VAR_VOID | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "pause", Input, NULL ); var_AddCallback( p_intf, "pause", Input, NULL );
var_Create( p_intf, "seek", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND ); var_Create( p_intf, "seek", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
...@@ -945,7 +970,95 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd, ...@@ -945,7 +970,95 @@ static int Other( vlc_object_t *p_this, char const *psz_cmd,
var_Set( p_pl, "marq-timeout", val ); var_Set( p_pl, "marq-timeout", val );
} }
} }
else if( !strcmp( psz_cmd, "mosaic-alpha" ) )
{
if( strlen( newval.psz_string) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-alpha", val );
}
}
else if( !strcmp( psz_cmd, "mosaic-height" ) )
{
if( strlen( newval.psz_string) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-height", val );
}
}
else if( !strcmp( psz_cmd, "mosaic-width" ) )
{
if( strlen( newval.psz_string) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-width", val );
}
}
else if( !strcmp( psz_cmd, "mosaic-xoffset" ) )
{
if( strlen( newval.psz_string) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-xoffset", val );
}
}
else if( !strcmp( psz_cmd, "mosaic-yoffset" ) )
{
if( strlen( newval.psz_string) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-yoffset", val );
}
}
else if( !strcmp( psz_cmd, "mosaic-vborder" ) )
{
if( strlen( newval.psz_string) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-vborder", val );
}
}
else if( !strcmp( psz_cmd, "mosaic-hborder" ) )
{
if( strlen( newval.psz_string) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-hborder", val );
}
}
else if( !strcmp( psz_cmd, "mosaic-position" ) )
{
if( strlen( newval.psz_string) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-position", val );
}
}
else if( !strcmp( psz_cmd, "mosaic-rows" ) )
{
if( strlen( newval.psz_string) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-rows", val );
}
}
else if( !strcmp( psz_cmd, "mosaic-cols" ) )
{
if( strlen( newval.psz_string) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-cols", val );
}
}
else if( !strcmp( psz_cmd, "mosaic-keep-aspect-ratio" ) )
{
if( strlen( newval.psz_string) > 0)
{
val.i_int = atoi( newval.psz_string );
var_Set( p_inp->p_libvlc, "mosaic-keep-aspect-ratio", val );
}
}
/* /*
* sanity check * sanity check
*/ */
......
This diff is collapsed.
...@@ -86,7 +86,7 @@ static int Open ( vlc_object_t *p_this ) ...@@ -86,7 +86,7 @@ static int Open ( vlc_object_t *p_this )
} }
if( var_Get( p_libvlc, "p_picture_vout", &val ) != VLC_SUCCESS ){ if( var_Get( p_libvlc, "p_picture_vout", &val ) != VLC_SUCCESS ){
msg_Err( p_vout, "p_picture_vout not found" ); msg_Dbg( p_vout, "p_picture_vout not found" );
p_picture_vout = malloc( sizeof( struct picture_vout_t ) ); p_picture_vout = malloc( sizeof( struct picture_vout_t ) );
if( p_vout->p_sys == NULL ) if( p_vout->p_sys == NULL )
{ {
...@@ -104,7 +104,7 @@ static int Open ( vlc_object_t *p_this ) ...@@ -104,7 +104,7 @@ static int Open ( vlc_object_t *p_this )
p_picture_vout->p_pic = NULL; p_picture_vout->p_pic = NULL;
} else { } else {
p_picture_vout = val.p_address; p_picture_vout = val.p_address;
msg_Err( p_vout, "p_picture_vout found" ); msg_Dbg( p_vout, "p_picture_vout found" );
vlc_mutex_lock( &p_picture_vout->lock ); vlc_mutex_lock( &p_picture_vout->lock );
} }
......
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