Commit 48cbd8f3 authored by Sam Hocevar's avatar Sam Hocevar

  * ALL: got rid of *_Probe functions because most of them were duplicates
    of the real _Init or _Create functions. That's 1000 lines of code gained.
  * ./src/misc/modules.c: we try not to keep the global lock in module_Need,
    which should speed up output spawning.
  * ./plugins/dummy/input_dummy.c: fixed vlc:quit command.
  * ./plugins/gtk/gtk_playlist.c: compilation fix.
  * ./plugins/macosx/*: preliminary fixes for the vout4 port.

   Notes on the *_Probe eradication:
  o I probably broke the DirectX video output, because of the "must init and
    run in the same thread" issue. I'll fix this ASAP.
  o Subtitles are broken (or at least, pretty ugly) in RGB mode.
  o The input plugins still have *_Probe functions. This will disappear when
    meuuh is finished with the access plugins.
  o The decoder plugins still have *_Probe functions. This is probably not
    going to change, it looks OK to me.
parent 46a1caf2
......@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: common.h,v 1.72 2002/02/14 23:29:17 sam Exp $
* $Id: common.h,v 1.73 2002/02/15 13:32:52 sam Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -167,7 +167,6 @@ struct pgrm_descriptor_s;
struct pes_packet_s;
struct input_area_s;
struct bit_stream_s;
struct probedata_s;
/*****************************************************************************
* Macros and inline functions
......@@ -578,7 +577,7 @@ typedef struct module_symbols_s
char * ( * DecodeLanguage ) ( u16 );
struct module_s * ( * module_Need ) ( int, char *, struct probedata_s * );
struct module_s * ( * module_Need ) ( int, char *, void * );
void ( * module_Unneed ) ( struct module_s * );
} module_symbols_t;
......
......@@ -421,7 +421,7 @@
/* Optimization level, from 0 to 2 - 1 is generally a good compromise. Remember
* that raising this level dramatically lengthens the compilation time. */
#ifdef HAVE_RELEASE
#if defined( HAVE_RELEASE ) || defined( __pentiumpro__ )
# define VPAR_OPTIM_LEVEL 2
#else
# define VPAR_OPTIM_LEVEL 1
......
......@@ -4,7 +4,7 @@
* control the pace of reading.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ext-intf.h,v 1.58 2002/01/21 23:57:46 massiot Exp $
* $Id: input_ext-intf.h,v 1.59 2002/02/15 13:32:52 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -265,6 +265,7 @@ typedef struct input_thread_s
struct module_s * p_input_module;
/* Init/End */
int (* pf_probe)( struct input_thread_s * );
void (* pf_init)( struct input_thread_s * );
void (* pf_open)( struct input_thread_s * );
void (* pf_close)( struct input_thread_s * );
......
......@@ -3,7 +3,7 @@
* but exported to plug-ins
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: input_ext-plugins.h,v 1.16 2002/01/21 23:57:46 massiot Exp $
* $Id: input_ext-plugins.h,v 1.17 2002/02/15 13:32:52 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -72,7 +72,6 @@ int input_UnselectES( struct input_thread_s *, struct es_descriptor_s * );
* Prototypes from input_dec.c
*****************************************************************************/
#ifndef PLUGIN
//decoder_capabilities_s * input_ProbeDecoder( void );
vlc_thread_t input_RunDecoder( struct input_thread_s *,
struct es_descriptor_s * );
void input_EndDecoder( struct input_thread_s *, struct es_descriptor_s * );
......
......@@ -3,7 +3,7 @@
* Declaration and extern access to global program object.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: main.h,v 1.28 2002/02/13 22:10:40 sam Exp $
* $Id: main.h,v 1.29 2002/02/15 13:32:52 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -52,7 +52,9 @@ typedef struct main_s
mtime_t i_desync; /* relative desync of the audio ouput */
/* Fast memcpy plugin used */
memcpy_module_t memcpy;
module_t * p_memcpy_module;
void* ( *pf_memcpy ) ( void *, const void *, size_t );
void* ( *pf_memset ) ( void *, int, size_t ); /* FIXME: unimplemented */
/* Unique threads */
p_intf_thread_t p_intf; /* main interface thread */
......@@ -73,8 +75,8 @@ extern main_t *p_main;
/*****************************************************************************
* Fast memory operation module
*****************************************************************************/
#define FAST_MEMCPY p_main->memcpy.pf_memcpy
#define FAST_MEMSET p_main->memcpy.pf_memset
#define FAST_MEMCPY p_main->pf_memcpy
#define FAST_MEMSET p_main->pf_memset
/*****************************************************************************
* Prototypes - these methods are used to get default values for some threads
......
......@@ -2,7 +2,7 @@
* modules.h : Module management functions.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: modules.h,v 1.40 2002/01/05 03:49:18 sam Exp $
* $Id: modules.h,v 1.41 2002/02/15 13:32:52 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -156,46 +156,11 @@ typedef struct module_s
} module_t;
/*****************************************
* FIXME
* FIXME Capabilities
* FIXME
*******************************************/
typedef struct memcpy_module_s
{
struct module_s *p_module;
void* ( *pf_memcpy ) ( void *, const void *, size_t );
} memcpy_module_t;
typedef struct probedata_s
{
u8 i_type;
struct
{
char * psz_data;
} aout;
struct
{
u32 i_chroma;
} vout;
struct
{
struct picture_heap_s* p_output;
struct picture_heap_s* p_render;
} chroma;
} probedata_t;
/* FIXME: find a nicer way to do this. */
/*****************************************************************************
* Module functions description structure
*****************************************************************************/
typedef struct function_list_s
{
int ( * pf_probe ) ( probedata_t * p_data );
union
{
/* Interface plugin */
......@@ -209,6 +174,7 @@ typedef struct function_list_s
/* Input plugin */
struct
{
int ( * pf_probe )( struct input_thread_s * );
void ( * pf_init ) ( struct input_thread_s * );
void ( * pf_open ) ( struct input_thread_s * );
void ( * pf_close )( struct input_thread_s * );
......@@ -323,13 +289,15 @@ typedef struct function_list_s
/* Decoder plugins */
struct
{
int ( * pf_probe)( u8 * p_es );
int ( * pf_run ) ( struct decoder_config_s * p_config );
} dec;
/* memcpy plugins */
struct
{
void* ( * fast_memcpy ) ( void *, const void *, size_t );
void* ( * pf_memcpy ) ( void *, const void *, size_t );
void* ( * pf_memset ) ( void *, int, size_t );
} memcpy;
} functions;
......@@ -395,12 +363,9 @@ void module_InitBank ( void );
void module_EndBank ( void );
void module_ResetBank ( void );
void module_ManageBank ( void );
module_t * module_Need ( int, char *, probedata_t * );
module_t * module_Need ( int, char *, void * );
void module_Unneed ( module_t * p_module );
int module_NeedMemcpy( memcpy_module_t * );
void module_UnneedMemcpy( memcpy_module_t * );
#else
# define module_Need p_symbols->module_Need
# define module_Unneed p_symbols->module_Unneed
......
......@@ -4,7 +4,7 @@
* (http://liba52.sf.net/).
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: a52.c,v 1.2 2002/02/13 21:54:44 gbazin Exp $
* $Id: a52.c,v 1.3 2002/02/15 13:32:52 sam Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -47,7 +47,7 @@
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static int decoder_Probe ( probedata_t * );
static int decoder_Probe ( u8 * );
static int decoder_Run ( decoder_config_t * );
static int DecodeFrame ( a52_adec_thread_t * );
static int InitThread ( a52_adec_thread_t * );
......@@ -62,8 +62,8 @@ static __inline__ int16_t convert ( int32_t );
*****************************************************************************/
void _M( adec_getfunctions )( function_list_t * p_function_list )
{
p_function_list->pf_probe = decoder_Probe;
p_function_list->functions.dec.pf_run = decoder_Run;
p_function_list->functions.dec.pf_probe = decoder_Probe;
p_function_list->functions.dec.pf_run = decoder_Run;
}
/*****************************************************************************
......@@ -91,9 +91,9 @@ MODULE_DEACTIVATE_STOP
* Tries to launch a decoder and return score so that the interface is able
* to choose.
*****************************************************************************/
static int decoder_Probe( probedata_t *p_data )
static int decoder_Probe( u8 *pi_type )
{
return ( p_data->i_type == AC3_AUDIO_ES );
return ( *pi_type == AC3_AUDIO_ES ? 0 : -1 );
}
/*****************************************************************************
......
......@@ -2,7 +2,7 @@
* ac3_adec.c: ac3 decoder module main file
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: ac3_adec.c,v 1.18 2002/01/28 23:08:31 stef Exp $
* $Id: ac3_adec.c,v 1.19 2002/02/15 13:32:52 sam Exp $
*
* Authors: Michel Lespinasse <walken@zoy.org>
*
......@@ -49,7 +49,7 @@
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static int decoder_Probe ( probedata_t * );
static int decoder_Probe ( u8 * );
static int decoder_Run ( decoder_config_t * );
static int InitThread ( ac3dec_thread_t * p_adec );
static void EndThread ( ac3dec_thread_t * p_adec );
......@@ -61,8 +61,8 @@ static void BitstreamCallback ( bit_stream_t *p_bit_stream,
*****************************************************************************/
void _M( adec_getfunctions )( function_list_t * p_function_list )
{
p_function_list->pf_probe = decoder_Probe;
p_function_list->functions.dec.pf_run = decoder_Run;
p_function_list->functions.dec.pf_probe = decoder_Probe;
p_function_list->functions.dec.pf_run = decoder_Run;
}
/*****************************************************************************
......@@ -90,9 +90,9 @@ MODULE_DEACTIVATE_STOP
* Tries to launch a decoder and return score so that the interface is able
* to chose.
*****************************************************************************/
static int decoder_Probe( probedata_t *p_data )
static int decoder_Probe( u8 *pi_type )
{
return ( p_data->i_type == AC3_AUDIO_ES ) ? 50 : 0;
return ( *pi_type == AC3_AUDIO_ES ) ? 0 : -1;
}
......
......@@ -2,7 +2,7 @@
* ac3_spdif.c: ac3 pass-through to external decoder with enabled soundcard
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: ac3_spdif.c,v 1.12 2002/01/28 23:08:31 stef Exp $
* $Id: ac3_spdif.c,v 1.13 2002/02/15 13:32:52 sam Exp $
*
* Authors: Stphane Borel <stef@via.ecp.fr>
* Juha Yrjola <jyrjola@cc.hut.fi>
......@@ -50,7 +50,7 @@
/****************************************************************************
* Local Prototypes
****************************************************************************/
static int decoder_Probe ( probedata_t * );
static int decoder_Probe ( u8 * );
static int decoder_Run ( decoder_config_t * );
static int InitThread ( ac3_spdif_thread_t * );
static void EndThread ( ac3_spdif_thread_t * );
......@@ -61,8 +61,8 @@ static void BitstreamCallback ( bit_stream_t *, boolean_t );
*****************************************************************************/
void _M( adec_getfunctions )( function_list_t * p_function_list )
{
p_function_list->pf_probe = decoder_Probe;
p_function_list->functions.dec.pf_run = decoder_Run;
p_function_list->functions.dec.pf_probe = decoder_Probe;
p_function_list->functions.dec.pf_run = decoder_Run;
}
/*****************************************************************************
......@@ -89,10 +89,10 @@ MODULE_DEACTIVATE_STOP
* Tries to launch a decoder and return score so that the interface is able
* to chose.
*****************************************************************************/
static int decoder_Probe( probedata_t *p_data )
static int decoder_Probe( u8 *pi_type )
{
return( ( main_GetIntVariable( AOUT_SPDIF_VAR, 0 )
&& p_data->i_type == AC3_AUDIO_ES ) ? 100 : 0 );
&& *pi_type == AC3_AUDIO_ES ) ? 0 : -1 );
}
......
......@@ -2,7 +2,7 @@
* aout_alsa.c : Alsa functions library
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: aout_alsa.c,v 1.25 2002/01/28 23:08:31 stef Exp $
* $Id: aout_alsa.c,v 1.26 2002/02/15 13:32:52 sam Exp $
*
* Authors: Henri Fallon <henri@videolan.org> - Original Author
* Jeffrey Baker <jwbaker@acm.org> - Port to ALSA 1.0 API
......@@ -61,42 +61,6 @@ typedef struct aout_sys_s
unsigned int bytes_per_frame;
} aout_sys_t;
/*****************************************************************************
* aout_Probe: probes the audio device and return a score
*****************************************************************************
* This function tries to open the dps and returns a score to the plugin
* manager so that it can make its choice.
*****************************************************************************/
static int aout_Probe( probedata_t *p_data )
{
int i_open_return, i_close_return;
aout_sys_t local_sys;
/* Open device */
i_open_return = snd_pcm_open( &(local_sys.p_alsa_handle), "default",
SND_PCM_STREAM_PLAYBACK, 0 );
if( i_open_return )
{
intf_WarnMsg( 2, "aout info: could not probe ALSA device (%s)",
snd_strerror( i_open_return ) );
return ( 0 );
}
/* Close it */
i_close_return = snd_pcm_close( local_sys.p_alsa_handle );
if( i_close_return )
{
intf_ErrMsg( "aout error: could not close ALSA device (%s)",
snd_strerror( i_close_return ) );
return( 0 );
}
/* And return score */
return( 100 );
}
/*****************************************************************************
* aout_Open : creates a handle and opens an alsa device
*****************************************************************************
......@@ -385,7 +349,6 @@ static void aout_Close( aout_thread_t *p_aout )
*****************************************************************************/
void _M( aout_getfunctions )( function_list_t * p_function_list )
{
p_function_list->pf_probe = aout_Probe;
p_function_list->functions.aout.pf_open = aout_Open;
p_function_list->functions.aout.pf_setformat = aout_SetFormat;
p_function_list->functions.aout.pf_getbufinfo = aout_GetBufInfo;
......
......@@ -51,7 +51,6 @@ typedef struct aout_sys_s
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
static int aout_Probe ( probedata_t *p_data );
static int aout_Open ( aout_thread_t *p_aout );
static int aout_SetFormat ( aout_thread_t *p_aout );
static long aout_GetBufInfo ( aout_thread_t *p_aout, long l_buffer_info );
......@@ -65,7 +64,6 @@ static void aout_Close ( aout_thread_t *p_aout );
*****************************************************************************/
void _M( aout_getfunctions )( function_list_t * p_function_list )
{
p_function_list->pf_probe = aout_Probe;
p_function_list->functions.aout.pf_open = aout_Open;
p_function_list->functions.aout.pf_setformat = aout_SetFormat;
p_function_list->functions.aout.pf_getbufinfo = aout_GetBufInfo;
......@@ -73,19 +71,6 @@ void _M( aout_getfunctions )( function_list_t * p_function_list )
p_function_list->functions.aout.pf_close = aout_Close;
}
/*****************************************************************************
* aout_Probe: probes the audio device and return a score
*****************************************************************************
* This function tries to open the dps and returns a score to the plugin
* manager so that it can
*****************************************************************************/
static int aout_Probe( probedata_t *p_data )
{
/* We don't have to test anything -- if we managed to open this plugin,
* it means we have the appropriate libs. */
return( 50 );
}
/*****************************************************************************
* aout_Open: initialize arts connection to server
*****************************************************************************/
......
......@@ -2,7 +2,7 @@
* aout_beos.cpp: BeOS audio output
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: aout_beos.cpp,v 1.20 2002/02/13 22:10:40 sam Exp $
* $Id: aout_beos.cpp,v 1.21 2002/02/15 13:32:52 sam Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -66,7 +66,6 @@ extern "C"
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
static int aout_Probe ( probedata_t *p_data );
static int aout_Open ( aout_thread_t *p_aout );
static int aout_SetFormat ( aout_thread_t *p_aout );
static long aout_GetBufInfo ( aout_thread_t *p_aout, long l_buffer_info );
......@@ -80,7 +79,6 @@ static void aout_Close ( aout_thread_t *p_aout );
*****************************************************************************/
void _M( aout_getfunctions )( function_list_t * p_function_list )
{
p_function_list->pf_probe = aout_Probe;
p_function_list->functions.aout.pf_open = aout_Open;
p_function_list->functions.aout.pf_setformat = aout_SetFormat;
p_function_list->functions.aout.pf_getbufinfo = aout_GetBufInfo;
......@@ -88,16 +86,6 @@ void _M( aout_getfunctions )( function_list_t * p_function_list )
p_function_list->functions.aout.pf_close = aout_Close;
}
/*****************************************************************************
* aout_Probe: probe the audio device and return a score
*****************************************************************************/
static int aout_Probe( probedata_t *p_data )
{
/* We don't test anything since I don't know what to test. However
* if the module could be loaded it is quite likely to work. */
return( 100 );
}
/*****************************************************************************
* aout_Open: opens a BPushGameSound
*****************************************************************************/
......
......@@ -2,7 +2,7 @@
* intf_beos.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: intf_beos.cpp,v 1.37 2002/01/19 19:54:01 gbazin Exp $
* $Id: intf_beos.cpp,v 1.38 2002/02/15 13:32:52 sam Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -60,7 +60,6 @@ extern "C"
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
static int intf_Probe ( probedata_t *p_data );
static int intf_Open ( intf_thread_t *p_intf );
static void intf_Close ( intf_thread_t *p_intf );
static void intf_Run ( intf_thread_t *p_intf );
......@@ -71,23 +70,11 @@ static void intf_Run ( intf_thread_t *p_intf );
*****************************************************************************/
void _M( intf_getfunctions )( function_list_t * p_function_list )
{
p_function_list->pf_probe = intf_Probe;
p_function_list->functions.intf.pf_open = intf_Open;
p_function_list->functions.intf.pf_close = intf_Close;
p_function_list->functions.intf.pf_run = intf_Run;
}
/*****************************************************************************
* intf_Probe: probe the interface and return a score
*****************************************************************************
* This function tries to initialize Gnome and returns a score to the
* plugin manager so that it can select the best plugin.
*****************************************************************************/
static int intf_Probe( probedata_t *p_data )
{
return( 100 );
}
/*****************************************************************************
* intf_Open: initialize interface
*****************************************************************************/
......
......@@ -2,7 +2,7 @@
* vout_beos.cpp: beos video output display method
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: vout_beos.cpp,v 1.40 2002/02/13 22:10:40 sam Exp $
* $Id: vout_beos.cpp,v 1.41 2002/02/15 13:32:52 sam Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -380,7 +380,6 @@ extern "C"
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static int vout_Probe ( probedata_t *p_data );
static int vout_Create ( vout_thread_t * );
static int vout_Init ( vout_thread_t * );
static void vout_End ( vout_thread_t * );
......@@ -398,7 +397,6 @@ static void BeosCloseDisplay( vout_thread_t *p_vout );
*****************************************************************************/
void _M( vout_getfunctions )( function_list_t * p_function_list )
{
p_function_list->pf_probe = vout_Probe;
p_function_list->functions.vout.pf_create = vout_Create;
p_function_list->functions.vout.pf_init = vout_Init;
p_function_list->functions.vout.pf_end = vout_End;
......@@ -408,17 +406,6 @@ void _M( vout_getfunctions )( function_list_t * p_function_list )
p_function_list->functions.vout.pf_render = vout_Render;
}
/*****************************************************************************
* vout_Probe: probe the video driver and return a score
*****************************************************************************
* This function tries to initialize SDL and returns a score to the
* plugin manager so that it can select the best plugin.
*****************************************************************************/
static int vout_Probe( probedata_t *p_data )
{
return( 100 );
}
/*****************************************************************************
* vout_Create: allocates BeOS video thread output method
*****************************************************************************
......
......@@ -2,7 +2,7 @@
* i420_rgb.c : YUV to bitmap RGB conversion module for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: i420_rgb.c,v 1.4 2002/02/08 15:57:29 sam Exp $
* $Id: i420_rgb.c,v 1.5 2002/02/15 13:32:53 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -41,7 +41,6 @@
*****************************************************************************/
static void chroma_getfunctions ( function_list_t * p_function_list );
static int chroma_Probe ( probedata_t *p_data );
static int chroma_Init ( vout_thread_t *p_vout );
static void chroma_End ( vout_thread_t *p_vout );
......@@ -75,52 +74,10 @@ MODULE_DEACTIVATE_STOP
*****************************************************************************/
static void chroma_getfunctions( function_list_t * p_function_list )
{
p_function_list->pf_probe = chroma_Probe;
p_function_list->functions.chroma.pf_init = chroma_Init;
p_function_list->functions.chroma.pf_end = chroma_End;
}
/*****************************************************************************
* chroma_Probe: return a score
*****************************************************************************
* This function checks that we can handle the required data
*****************************************************************************/
static int chroma_Probe( probedata_t *p_data )
{
if( p_data->chroma.p_render->i_width & 1
|| p_data->chroma.p_render->i_height & 1 )
{
return 0;
}
switch( p_data->chroma.p_render->i_chroma )
{
case FOURCC_YV12:
case FOURCC_I420:
case FOURCC_IYUV:
switch( p_data->chroma.p_output->i_chroma )
{
#if defined (MODULE_NAME_IS_chroma_i420_rgb)
case FOURCC_BI_RGB:
break;
#endif
case FOURCC_RV15:
case FOURCC_RV16:
case FOURCC_RV32:
break;
default:
return 0;
}
break;
default:
return 0;
}
return 100;
}
/*****************************************************************************
* chroma_Init: allocate a chroma function
*****************************************************************************
......
......@@ -2,7 +2,7 @@
* i420_ymga.c : YUV to YUV conversion module for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: i420_ymga.c,v 1.1 2002/01/07 02:12:29 sam Exp $
* $Id: i420_ymga.c,v 1.2 2002/02/15 13:32:53 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -42,7 +42,6 @@
*****************************************************************************/
static void chroma_getfunctions ( function_list_t * p_function_list );
static int chroma_Probe ( probedata_t *p_data );
static int chroma_Init ( vout_thread_t *p_vout );
static void chroma_End ( vout_thread_t *p_vout );
......@@ -78,46 +77,10 @@ MODULE_DEACTIVATE_STOP
*****************************************************************************/
static void chroma_getfunctions( function_list_t * p_function_list )
{
p_function_list->pf_probe = chroma_Probe;
p_function_list->functions.chroma.pf_init = chroma_Init;
p_function_list->functions.chroma.pf_end = chroma_End;
}
/*****************************************************************************
* chroma_Probe: return a score
*****************************************************************************
* This function checks that we can handle the required data
*****************************************************************************/
static int chroma_Probe( probedata_t *p_data )
{
if( p_data->chroma.p_render->i_width & 1
|| p_data->chroma.p_render->i_height & 1 )
{
return 0;
}
switch( p_data->chroma.p_render->i_chroma )
{
case FOURCC_YV12:
case FOURCC_I420:
case FOURCC_IYUV:
switch( p_data->chroma.p_output->i_chroma )
{
case FOURCC_YMGA:
break;
default:
return 0;
}
break;
default:
return 0;
}
return 100;
}
/*****************************************************************************
* chroma_Init: allocate a chroma function
*****************************************************************************
......