* 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$
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
/*****************************************************************************
* Module descriptor
*****************************************************************************/
-#define MODE_TEXT N_("Blur factor")
-#define MODE_LONGTEXT N_("The degree of blurring from 1 to 127")
+#define MODE_TEXT N_("Blur factor (1-127)")
+#define MODE_LONGTEXT N_("The degree of blurring from 1 to 127.")
vlc_module_begin();
- add_category_hint( N_("Miscellaneous"), NULL, VLC_FALSE );
- add_integer_with_range( "blur-factor", 80, 1, 127, NULL, MODE_TEXT, MODE_LONGTEXT, VLC_FALSE );
- set_description( _("motion blur filter") );
+ set_description( _("Motion blur filter") );
set_capability( "video filter", 0 );
+
+ add_integer_with_range( "blur-factor", 80, 1, 127, NULL,
+ MODE_TEXT, MODE_LONGTEXT, VLC_FALSE );
+
set_callbacks( Create, Destroy );
vlc_module_end();
picture_t *p_lastpic;
};
+/*****************************************************************************
+ * Control: control facility for the vout (forwards to child vout)
+ *****************************************************************************/
+static int Control( vout_thread_t *p_vout, int i_query, va_list args )
+{
+ return vout_vaControl( p_vout->p_sys->p_vout, i_query, args );
+}
+
/*****************************************************************************
* Create: allocates Deinterlace video thread output method
*****************************************************************************
p_vout->pf_manage = NULL;
p_vout->pf_render = Render;
p_vout->pf_display = NULL;
+ p_vout->pf_control = Control;
p_vout->p_sys->i_factor = config_GetInt( p_vout, "blur-factor" );
p_vout->p_sys->b_double_rate = 0;
ADD_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
+ ADD_PARENT_CALLBACKS( SendEventsToChild );
+
return VLC_SUCCESS;
}
{
vout_thread_t *p_vout = (vout_thread_t *)p_this;
- DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
- vlc_object_detach( p_vout->p_sys->p_vout );
- vout_Destroy( p_vout->p_sys->p_vout );
+ if( p_vout->p_sys->p_vout )
+ {
+ DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents );
+ 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;
+}