* invert.c : Invert video plugin for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: invert.c,v 1.4 2002/01/02 14:37:42 sam Exp $
+ * $Id: invert.c,v 1.5 2002/01/04 14:01:34 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
static void vout_End ( struct vout_thread_s * );
static void vout_Destroy ( struct vout_thread_s * );
static int vout_Manage ( struct vout_thread_s * );
+static void vout_Render ( struct vout_thread_s *, struct picture_s * );
static void vout_Display ( struct vout_thread_s *, struct picture_s * );
/*****************************************************************************
p_function_list->functions.vout.pf_end = vout_End;
p_function_list->functions.vout.pf_destroy = vout_Destroy;
p_function_list->functions.vout.pf_manage = vout_Manage;
+ p_function_list->functions.vout.pf_render = vout_Render;
p_function_list->functions.vout.pf_display = vout_Display;
p_function_list->functions.vout.pf_setpalette = NULL;
}
I_OUTPUTPICTURES = 0;
/* Initialize the output structure */
- switch( p_vout->render.i_chroma )
- {
- case FOURCC_I420:
- case FOURCC_IYUV:
- case FOURCC_YV12:
- case FOURCC_I422:
- case FOURCC_I444:
- p_vout->output.i_chroma = p_vout->render.i_chroma;
- p_vout->output.i_width = p_vout->render.i_width;
- p_vout->output.i_height = p_vout->render.i_height;
- p_vout->output.i_aspect = p_vout->render.i_aspect;
- break;
-
- default:
- return( 0 ); /* unknown chroma */
- break;
- }
+ p_vout->output.i_chroma = p_vout->render.i_chroma;
+ p_vout->output.i_width = p_vout->render.i_width;
+ p_vout->output.i_height = p_vout->render.i_height;
+ p_vout->output.i_aspect = p_vout->render.i_aspect;
/* Try to open the real video output */
psz_filter = main_GetPszVariable( VOUT_FILTER_VAR, "" );
for( i_index = I_OUTPUTPICTURES ; i_index ; )
{
i_index--;
- free( PP_OUTPUTPICTURE[ i_index ]->planes[ 0 ].p_data );
+ free( PP_OUTPUTPICTURE[ i_index ]->p_data );
}
}
}
/*****************************************************************************
- * vout_Display: displays previously rendered output
+ * vout_Render: displays previously rendered output
*****************************************************************************
* This function send the currently rendered image to Invert image, waits
* until it is displayed and switch the two rendering buffers, preparing next
* frame.
*****************************************************************************/
-static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
+static void vout_Render( vout_thread_t *p_vout, picture_t *p_pic )
{
picture_t *p_outpic;
int i_index;
msleep( VOUT_OUTMEM_SLEEP );
}
- vout_DatePicture( p_vout->p_sys->p_vout, p_outpic, mdate() + 50000 );
+ vout_DatePicture( p_vout->p_sys->p_vout, p_outpic, p_pic->date );
vout_LinkPicture( p_vout->p_sys->p_vout, p_outpic );
for( i_index = 0 ; i_index < p_pic->i_planes ; i_index++ )
{
- pixel_data_t *p_in, *p_in_end, *p_out;
+ u8 *p_in, *p_in_end, *p_out;
- p_in = p_pic->planes[ i_index ].p_data;
- p_in_end = p_in + p_pic->planes[ i_index ].i_bytes - 64;
+ p_in = p_pic->p[i_index].p_pixels;
+ p_in_end = p_in - 64 + p_pic->p[i_index].i_lines
+ * p_pic->p[i_index].i_pitch;
- p_out = p_outpic->planes[ i_index ].p_data;
+ p_out = p_outpic->p[i_index].p_pixels;
for( ; p_in < p_in_end ; )
{
vout_DisplayPicture( p_vout->p_sys->p_vout, p_outpic );
}
+/*****************************************************************************
+ * vout_Display: displays previously rendered output
+ *****************************************************************************
+ * This function send the currently rendered image to Invert image, waits
+ * until it is displayed and switch the two rendering buffers, preparing next
+ * frame.
+ *****************************************************************************/
+static void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
+{
+ ;
+}
+