* distort.c : Misc video effects plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001, 2002, 2003 VideoLAN
- * $Id: distort.c,v 1.14 2004/01/25 20:05:28 hartman Exp $
+ * $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
mtime_t last_date;
};
+/*****************************************************************************
+ * 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 Distort 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_mode = 0;
if( p_vout->p_sys->p_vout == NULL )
{
msg_Err( p_vout, "cannot open vout, aborting" );
-
return VLC_EGENERIC;
}
{
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 );
p_in = p_inpic->p[i_index].p_pixels;
p_out = p_outpic->p[i_index].p_pixels;
- i_num_lines = p_inpic->p[i_index].i_lines;
+ i_num_lines = p_inpic->p[i_index].i_visible_lines;
black_pixel = ( i_index == Y_PLANE ) ? 0x00 : 0x80;
black_pixel = ( i_index == Y_PLANE ) ? 0x00 : 0x80;
- i_num_lines = p_inpic->p[i_index].i_lines;
+ i_num_lines = p_inpic->p[i_index].i_visible_lines;
i_first_line = i_num_lines * 4 / 5;