* adjust.c : Contrast/Hue/Saturation/Brightness video plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001, 2002, 2003 VideoLAN
- * $Id: adjust.c,v 1.13 2003/05/26 01:25:12 hartman Exp $
+ * $Id: adjust.c,v 1.14 2003/10/15 22:49:48 gbazin Exp $
*
* Authors: Simon Latapie <garf@via.ecp.fr>
*
ADD_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
+ ADD_PARENT_CALLBACKS( SendEventsToChild );
+
return VLC_SUCCESS;
}
vlc_object_detach( p_vout->p_sys->p_vout );
vout_Destroy( p_vout->p_sys->p_vout );
+ DEL_PARENT_CALLBACKS( SendEventsToChild );
+
free( p_vout->p_sys );
}
return VLC_SUCCESS;
}
+/*****************************************************************************
+ * SendEventsToChild: forward events to the child/children vout
+ *****************************************************************************/
+static int SendEventsToChild( vlc_object_t *p_this, char const *psz_var,
+ vlc_value_t oldval, vlc_value_t newval, void *p_data )
+{
+ vout_thread_t *p_vout = (vout_thread_t *)p_this;
+ var_Set( p_vout->p_sys->p_vout, psz_var, newval );
+ return VLC_SUCCESS;
+}
* clone.c : Clone video plugin for vlc
*****************************************************************************
* Copyright (C) 2002, 2003 VideoLAN
- * $Id: clone.c,v 1.10 2003/05/15 22:27:37 massiot Exp $
+ * $Id: clone.c,v 1.11 2003/10/15 22:49:48 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
if( psz_default_vout ) free( psz_default_vout );
ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES );
+ ADD_PARENT_CALLBACKS( SendEventsToChild );
+
return VLC_SUCCESS;
}
RemoveAllVout( p_vout );
+ DEL_PARENT_CALLBACKS( SendEventsToChild );
+
free( p_vout->p_sys->pp_vout );
free( p_vout->p_sys );
}
return VLC_SUCCESS;
}
+
+/*****************************************************************************
+ * SendEventsToChild: forward events to the child/children vout
+ *****************************************************************************/
+static int SendEventsToChild( vlc_object_t *p_this, char const *psz_var,
+ vlc_value_t oldval, vlc_value_t newval, void *p_data )
+{
+ vout_thread_t *p_vout = (vout_thread_t *)p_this;
+ int i_vout;
+
+ for( i_vout = 0; i_vout < p_vout->p_sys->i_clones; i_vout++ )
+ {
+ var_Set( p_vout->p_sys->pp_vout[ i_vout ], psz_var, newval );
+
+ if( !strcmp( psz_var, "fullscreen" ) ) break;
+ }
+
+ return VLC_SUCCESS;
+}
* crop.c : Crop video plugin for vlc
*****************************************************************************
* Copyright (C) 2002, 2003 VideoLAN
- * $Id: crop.c,v 1.12 2003/05/26 02:03:10 hartman Exp $
+ * $Id: crop.c,v 1.13 2003/10/15 22:49:48 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
ADD_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
+ ADD_PARENT_CALLBACKS( SendEventsToChild );
+
return VLC_SUCCESS;
}
vlc_object_detach( p_vout->p_sys->p_vout );
vout_Destroy( p_vout->p_sys->p_vout );
+ DEL_PARENT_CALLBACKS( SendEventsToChild );
+
free( p_vout->p_sys );
}
return VLC_SUCCESS;
}
+/*****************************************************************************
+ * SendEventsToChild: forward events to the child/children vout
+ *****************************************************************************/
+static int SendEventsToChild( vlc_object_t *p_this, char const *psz_var,
+ vlc_value_t oldval, vlc_value_t newval, void *p_data )
+{
+ vout_thread_t *p_vout = (vout_thread_t *)p_this;
+ var_Set( p_vout->p_sys->p_vout, psz_var, newval );
+ return VLC_SUCCESS;
+}
* deinterlace.c : deinterlacer plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001, 2002, 2003 VideoLAN
- * $Id: deinterlace.c,v 1.14 2003/05/25 11:31:54 gbazin Exp $
+ * $Id: deinterlace.c,v 1.15 2003/10/15 22:49:48 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
ADD_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
+ ADD_PARENT_CALLBACKS( SendEventsToChild );
+
return VLC_SUCCESS;
}
vlc_object_detach( p_vout->p_sys->p_vout );
vout_Destroy( p_vout->p_sys->p_vout );
+ DEL_PARENT_CALLBACKS( SendEventsToChild );
+
free( p_vout->p_sys );
}
vlc_mutex_unlock( &p_vout->p_sys->filter_lock );
return VLC_SUCCESS;
}
+
+/*****************************************************************************
+ * SendEventsToChild: forward events to the child/children vout
+ *****************************************************************************/
+static int SendEventsToChild( vlc_object_t *p_this, char const *psz_var,
+ vlc_value_t oldval, vlc_value_t newval, void *p_data )
+{
+ vout_thread_t *p_vout = (vout_thread_t *)p_this;
+ var_Set( p_vout->p_sys->p_vout, psz_var, newval );
+ return VLC_SUCCESS;
+}
* distort.c : Misc video effects plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001, 2002, 2003 VideoLAN
- * $Id: distort.c,v 1.10 2003/05/15 22:27:37 massiot Exp $
+ * $Id: distort.c,v 1.11 2003/10/15 22:49:48 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
ADD_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
+ ADD_PARENT_CALLBACKS( SendEventsToChild );
+
p_vout->p_sys->f_angle = 0.0;
p_vout->p_sys->last_date = 0;
vlc_object_detach( p_vout->p_sys->p_vout );
vout_Destroy( p_vout->p_sys->p_vout );
+ DEL_PARENT_CALLBACKS( SendEventsToChild );
+
free( p_vout->p_sys );
}
return VLC_SUCCESS;
}
+/*****************************************************************************
+ * SendEventsToChild: forward events to the child/children vout
+ *****************************************************************************/
+static int SendEventsToChild( vlc_object_t *p_this, char const *psz_var,
+ vlc_value_t oldval, vlc_value_t newval, void *p_data )
+{
+ vout_thread_t *p_vout = (vout_thread_t *)p_this;
+ var_Set( p_vout->p_sys->p_vout, psz_var, newval );
+ return VLC_SUCCESS;
+}
* filter_common.h: Common filter functions
*****************************************************************************
* Copyright (C) 2001, 2002, 2003 VideoLAN
- * $Id: filter_common.h,v 1.2 2003/01/17 16:18:03 sam Exp $
+ * $Id: filter_common.h,v 1.3 2003/10/15 22:49:48 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
I_OUTPUTPICTURES++; \
} \
+/*****************************************************************************
+ * SetParentVal: forward variable value to parent whithout triggering the
+ * callback
+ *****************************************************************************/
+static int SetParentVal( vlc_object_t *p_this, char const *psz_var,
+ vlc_value_t oldval, vlc_value_t newval, void *p_data )
+{
+ var_Change( (vlc_object_t *)p_data, psz_var, VLC_VAR_SETVALUE,
+ &newval, NULL );
+ return VLC_SUCCESS;
+}
+
#define ADD_CALLBACKS( newvout, handler ) \
+ var_AddCallback( newvout, "fullscreen", SetParentVal, p_vout ); \
var_AddCallback( newvout, "mouse-x", SendEvents, p_vout ); \
var_AddCallback( newvout, "mouse-y", SendEvents, p_vout ); \
var_AddCallback( newvout, "mouse-moved", SendEvents, p_vout ); \
var_AddCallback( newvout, "key-pressed", SendEvents, p_vout )
#define DEL_CALLBACKS( newvout, handler ) \
+ var_DelCallback( newvout, "fullscreen", SetParentVal, p_vout ); \
var_DelCallback( newvout, "mouse-x", SendEvents, p_vout ); \
var_DelCallback( newvout, "mouse-y", SendEvents, p_vout ); \
var_DelCallback( newvout, "mouse-moved", SendEvents, p_vout ); \
var_DelCallback( newvout, "mouse-clicked", SendEvents, p_vout ); \
var_DelCallback( newvout, "key-pressed", SendEvents, p_vout )
+#define ADD_PARENT_CALLBACKS( handler ) \
+ var_AddCallback( p_vout, "fullscreen", handler, NULL ); \
+ var_AddCallback( p_vout, "aspect-ratio", handler, NULL ); \
+ var_AddCallback( p_vout, "crop", handler, NULL );
+
+#define DEL_PARENT_CALLBACKS( handler ) \
+ var_DelCallback( p_vout, "fullscreen", handler, NULL ); \
+ var_DelCallback( p_vout, "aspect-ratio", handler, NULL ); \
+ var_DelCallback( p_vout, "crop", handler, NULL );
+
+static int SendEventsToChild( vlc_object_t *, char const *,
+ vlc_value_t, vlc_value_t, void * );
* invert.c : Invert video plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001, 2002, 2003 VideoLAN
- * $Id: invert.c,v 1.7 2003/03/30 18:14:38 gbazin Exp $
+ * $Id: invert.c,v 1.8 2003/10/15 22:49:48 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
ADD_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
+ ADD_PARENT_CALLBACKS( SendEventsToChild );
+
return VLC_SUCCESS;
}
vlc_object_detach( p_vout->p_sys->p_vout );
vout_Destroy( p_vout->p_sys->p_vout );
+ DEL_PARENT_CALLBACKS( SendEventsToChild );
+
free( p_vout->p_sys );
}
return VLC_SUCCESS;
}
+/*****************************************************************************
+ * SendEventsToChild: forward events to the child/children vout
+ *****************************************************************************/
+static int SendEventsToChild( vlc_object_t *p_this, char const *psz_var,
+ vlc_value_t oldval, vlc_value_t newval, void *p_data )
+{
+ vout_thread_t *p_vout = (vout_thread_t *)p_this;
+ var_Set( p_vout->p_sys->p_vout, psz_var, newval );
+ return VLC_SUCCESS;
+}
* logo.c : logo video plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001, 2002, 2003 VideoLAN
- * $Id: logo.c,v 1.3 2003/09/18 21:42:54 garf Exp $
+ * $Id: logo.c,v 1.4 2003/10/15 22:49:48 gbazin Exp $
*
* Authors: Simon Latapie <garf@videolan.org>
*
ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES );
ADD_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
-
+
+ ADD_PARENT_CALLBACKS( SendEventsToChild );
+
p_vout->p_sys->posx = config_GetInt( p_vout, "logo_x" );
p_vout->p_sys->posy = config_GetInt( p_vout, "logo_y" );
p_vout->p_sys->trans = (int)(config_GetFloat( p_vout, "logo_transparency" ) * 255);
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
+ DEL_PARENT_CALLBACKS( SendEventsToChild );
+
free( p_vout->p_sys );
}
return VLC_SUCCESS;
}
+
+/*****************************************************************************
+ * SendEventsToChild: forward events to the child/children vout
+ *****************************************************************************/
+static int SendEventsToChild( vlc_object_t *p_this, char const *psz_var,
+ vlc_value_t oldval, vlc_value_t newval, void *p_data )
+{
+ vout_thread_t *p_vout = (vout_thread_t *)p_this;
+ var_Set( p_vout->p_sys->p_vout, psz_var, newval );
+ return VLC_SUCCESS;
+}
* motion_blur.c : motion blur filter for vlc
*****************************************************************************
* Copyright (C) 2000, 2001, 2002, 2003 VideoLAN
- * $Id: motionblur.c,v 1.12 2003/05/26 01:25:12 hartman Exp $
+ * $Id: motionblur.c,v 1.13 2003/10/15 22:49:48 gbazin Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
ADD_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
+ ADD_PARENT_CALLBACKS( SendEventsToChild );
+
return VLC_SUCCESS;
}
vlc_object_detach( p_vout->p_sys->p_vout );
vout_Destroy( p_vout->p_sys->p_vout );
+ DEL_PARENT_CALLBACKS( SendEventsToChild );
+
free( p_vout->p_sys );
}
return VLC_SUCCESS;
}
+/*****************************************************************************
+ * SendEventsToChild: forward events to the child/children vout
+ *****************************************************************************/
+static int SendEventsToChild( vlc_object_t *p_this, char const *psz_var,
+ vlc_value_t oldval, vlc_value_t newval, void *p_data )
+{
+ vout_thread_t *p_vout = (vout_thread_t *)p_this;
+ var_Set( p_vout->p_sys->p_vout, psz_var, newval );
+ return VLC_SUCCESS;
+}
* transform.c : transform image plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001, 2002, 2003 VideoLAN
- * $Id: transform.c,v 1.13 2003/08/22 13:38:03 hartman Exp $
+ * $Id: transform.c,v 1.14 2003/10/15 22:49:48 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
ADD_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
+ ADD_PARENT_CALLBACKS( SendEventsToChild );
+
return VLC_SUCCESS;
}
vlc_object_detach( p_vout->p_sys->p_vout );
vout_Destroy( p_vout->p_sys->p_vout );
+ DEL_PARENT_CALLBACKS( SendEventsToChild );
+
free( p_vout->p_sys );
}
return VLC_SUCCESS;
}
+/*****************************************************************************
+ * SendEventsToChild: forward events to the child/children vout
+ *****************************************************************************/
+static int SendEventsToChild( vlc_object_t *p_this, char const *psz_var,
+ vlc_value_t oldval, vlc_value_t newval, void *p_data )
+{
+ vout_thread_t *p_vout = (vout_thread_t *)p_this;
+ var_Set( p_vout->p_sys->p_vout, psz_var, newval );
+ return VLC_SUCCESS;
+}
* wall.c : Wall video plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001, 2002, 2003 VideoLAN
- * $Id: wall.c,v 1.10 2003/05/15 22:27:37 massiot Exp $
+ * $Id: wall.c,v 1.11 2003/10/15 22:49:48 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
ALLOCATE_DIRECTBUFFERS( VOUT_MAX_PICTURES );
+ ADD_PARENT_CALLBACKS( SendEventsToChild );
+
return VLC_SUCCESS;
}
RemoveAllVout( p_vout );
+ DEL_PARENT_CALLBACKS( SendEventsToChild );
+
free( p_vout->p_sys->pp_vout );
free( p_vout->p_sys );
}
return VLC_SUCCESS;
}
+/*****************************************************************************
+ * SendEventsToChild: forward events to the child/children vout
+ *****************************************************************************/
+static int SendEventsToChild( vlc_object_t *p_this, char const *psz_var,
+ vlc_value_t oldval, vlc_value_t newval, void *p_data )
+{
+ vout_thread_t *p_vout = (vout_thread_t *)p_this;
+ int i_row, i_col, i_vout = 0;
+
+ for( i_row = 0; i_row < p_vout->p_sys->i_row; i_row++ )
+ {
+ for( i_col = 0; i_col < p_vout->p_sys->i_col; i_col++ )
+ {
+ var_Set( p_vout->p_sys->pp_vout[ i_vout ].p_vout, psz_var, newval);
+ if( !strcmp( psz_var, "fullscreen" ) ) break;
+ i_vout++;
+ }
+ }
+
+ return VLC_SUCCESS;
+}