X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=plugins%2Ffilter%2Finvert.c;h=d2eb77d16ac1d39263e8bf5eb38f15a18e1fa74e;hb=9915a8b1138e6ca7008b30ff7daaf8a393862f00;hp=0f1f63e78ee478e448b402cf3deef363ddebad09;hpb=c40571df602ed76eaf7971130f212f4a79a3f5c5;p=vlc diff --git a/plugins/filter/invert.c b/plugins/filter/invert.c index 0f1f63e78e..d2eb77d16a 100644 --- a/plugins/filter/invert.c +++ b/plugins/filter/invert.c @@ -2,7 +2,7 @@ * invert.c : Invert video plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: invert.c,v 1.8 2002/02/24 20:51:09 gbazin Exp $ + * $Id: invert.c,v 1.13 2002/06/01 18:04:48 sam Exp $ * * Authors: Samuel Hocevar * @@ -28,10 +28,8 @@ #include /* malloc(), free() */ #include -#include - -#include "video.h" -#include "video_output.h" +#include +#include #include "filter_common.h" @@ -47,7 +45,7 @@ MODULE_CONFIG_START MODULE_CONFIG_STOP MODULE_INIT_START - SET_DESCRIPTION( "invert video module" ) + SET_DESCRIPTION( _("invert video module") ) /* Capability score set to 0 because we don't want to be spawned * as a video output unless explicitly requested to */ ADD_CAPABILITY( VOUT, 0 ) @@ -67,22 +65,21 @@ MODULE_DEACTIVATE_STOP * This structure is part of the video output thread descriptor. * It describes the Invert specific properties of an output thread. *****************************************************************************/ -typedef struct vout_sys_s +struct vout_sys_s { - struct vout_thread_s *p_vout; - -} vout_sys_t; + vout_thread_t *p_vout; +}; /***************************************************************************** * Local prototypes *****************************************************************************/ -static int vout_Create ( struct vout_thread_s * ); -static int vout_Init ( struct vout_thread_s * ); -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 * ); +static int vout_Create ( vout_thread_t * ); +static int vout_Init ( vout_thread_t * ); +static void vout_End ( vout_thread_t * ); +static void vout_Destroy ( vout_thread_t * ); +static int vout_Manage ( vout_thread_t * ); +static void vout_Render ( vout_thread_t *, picture_t * ); +static void vout_Display ( vout_thread_t *, picture_t * ); /***************************************************************************** * Functions exported as capabilities. They are declared as static so that @@ -110,7 +107,7 @@ static int vout_Create( vout_thread_t *p_vout ) p_vout->p_sys = malloc( sizeof( vout_sys_t ) ); if( p_vout->p_sys == NULL ) { - intf_ErrMsg("error: %s", strerror(ENOMEM) ); + msg_Err( p_vout, "out of memory" ); return( 1 ); } @@ -135,23 +132,23 @@ static int vout_Init( vout_thread_t *p_vout ) p_vout->output.i_aspect = p_vout->render.i_aspect; /* Try to open the real video output */ - psz_filter = config_GetPszVariable( VOUT_FILTER_VAR ); - config_PutPszVariable( VOUT_FILTER_VAR, NULL ); + psz_filter = config_GetPsz( p_vout, "filter" ); + config_PutPsz( p_vout, "filter", NULL ); - intf_WarnMsg( 1, "filter: spawning the real video output" ); + msg_Dbg( p_vout, "spawning the real video output" ); p_vout->p_sys->p_vout = - vout_CreateThread( NULL, + vout_CreateThread( p_vout, p_vout->render.i_width, p_vout->render.i_height, p_vout->render.i_chroma, p_vout->render.i_aspect ); - config_PutPszVariable( VOUT_FILTER_VAR, psz_filter ); + config_PutPsz( p_vout, "filter", psz_filter ); if( psz_filter ) free( psz_filter ); /* Everything failed */ if( p_vout->p_sys->p_vout == NULL ) { - intf_ErrMsg( "filter error: can't open vout, aborting" ); + msg_Err( p_vout, "can't open vout, aborting" ); return( 0 ); } @@ -172,7 +169,7 @@ static void vout_End( vout_thread_t *p_vout ) for( i_index = I_OUTPUTPICTURES ; i_index ; ) { i_index--; - free( PP_OUTPUTPICTURE[ i_index ]->p_data ); + free( PP_OUTPUTPICTURE[ i_index ]->p_data_orig ); } } @@ -183,7 +180,7 @@ static void vout_End( vout_thread_t *p_vout ) *****************************************************************************/ static void vout_Destroy( vout_thread_t *p_vout ) { - vout_DestroyThread( p_vout->p_sys->p_vout, NULL ); + vout_DestroyThread( p_vout->p_sys->p_vout ); free( p_vout->p_sys ); }