]> git.sesse.net Git - vlc/commitdiff
* ALL: got rid of *_Probe functions because most of them were duplicates
authorSam Hocevar <sam@videolan.org>
Fri, 15 Feb 2002 13:32:54 +0000 (13:32 +0000)
committerSam Hocevar <sam@videolan.org>
Fri, 15 Feb 2002 13:32:54 +0000 (13:32 +0000)
    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.

96 files changed:
include/common.h
include/config.h
include/input_ext-intf.h
include/input_ext-plugins.h
include/main.h
include/modules.h
plugins/a52/a52.c
plugins/ac3_adec/ac3_adec.c
plugins/ac3_spdif/ac3_spdif.c
plugins/alsa/aout_alsa.c
plugins/arts/aout_arts.c
plugins/beos/aout_beos.cpp
plugins/beos/intf_beos.cpp
plugins/beos/vout_beos.cpp
plugins/chroma/i420_rgb.c
plugins/chroma/i420_ymga.c
plugins/chroma/i420_yuy2.c
plugins/chroma/i422_yuy2.c
plugins/directx/aout_directx.c
plugins/directx/vout_directx.c
plugins/downmix/downmix.c
plugins/downmix/downmix3dn.c
plugins/downmix/downmixsse.c
plugins/dsp/aout_dsp.c
plugins/dummy/aout_dummy.c
plugins/dummy/input_dummy.c
plugins/dummy/intf_dummy.c
plugins/dummy/vout_dummy.c
plugins/dvd/input_dvd.c
plugins/dvdread/input_dvdread.c
plugins/esd/aout_esd.c
plugins/fb/fb.c
plugins/filter/deinterlace.c
plugins/filter/distort.c
plugins/filter/invert.c
plugins/filter/transform.c
plugins/filter/wall.c
plugins/ggi/ggi.c
plugins/glide/glide.c
plugins/gtk/gnome.c
plugins/gtk/gtk.c
plugins/gtk/gtk_playlist.c
plugins/idct/idct.c
plugins/idct/idct_decl.h
plugins/idct/idctaltivec.c
plugins/idct/idctclassic.c
plugins/idct/idctmmx.c
plugins/idct/idctmmxext.c
plugins/imdct/imdct.c
plugins/imdct/imdct3dn.c
plugins/imdct/imdctsse.c
plugins/lirc/lirc.c
plugins/lpcm_adec/lpcm_adec.c
plugins/macosx/aout_macosx.c
plugins/macosx/intf_main.c
plugins/macosx/intf_main.h [new file with mode: 0644]
plugins/macosx/intf_vlc_wrapper.c
plugins/macosx/macosx.h
plugins/macosx/vout_macosx.c
plugins/mad/mad_adec.c
plugins/memcpy/memcpy.c
plugins/mga/mga.c
plugins/mga/xmga.c
plugins/motion/motion.c
plugins/motion/motion3dnow.c
plugins/motion/motionaltivec.c
plugins/motion/motionmmx.c
plugins/motion/motionmmxext.c
plugins/mpeg_adec/mpeg_adec.c
plugins/mpeg_system/input_es.c
plugins/mpeg_system/input_ps.c
plugins/mpeg_system/input_ts.c
plugins/mpeg_system/mpeg_es.c
plugins/mpeg_system/mpeg_ps.c
plugins/mpeg_vdec/video_parser.c
plugins/qnx/aout_qnx.c
plugins/qnx/vout_qnx.c
plugins/qt/intf_qt.cpp
plugins/sdl/aout_sdl.c
plugins/sdl/vout_sdl.c
plugins/spudec/spu_decoder.c
plugins/text/ncurses.c
plugins/text/rc.c
plugins/vcd/input_vcd.c
plugins/vcd/vcd.c
plugins/win32/aout_waveout.c
plugins/x11/xcommon.c
src/audio_output/aout_ext-dec.c
src/audio_output/audio_output.c
src/input/input.c
src/input/input_dec.c
src/interface/interface.c
src/interface/main.c
src/misc/modules.c
src/video_output/video_output.c
src/video_output/vout_pictures.c

index 27bdd83af3eb2e3be85741b2e721b089a860a187..55a91e110951856aa57c5d3d00d6a88b293301dc 100644 (file)
@@ -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;
index 7c57b6a9f6f288733f0708e6d597320b92753b4e..b77ee0fee59132018ce2fb868924033fa57cfe4f 100644 (file)
 
 /* 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
index b108f745ad000a193493d9313574294c807dfd6b..0154b6e82e26034dc67a1c503b285c28733d9568 100644 (file)
@@ -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 * );
index 477a1b5e29f3fb81a51519e89a2d636580defcfc..9727a4a4a7bea442e972e3a47d652b6f42519805 100644 (file)
@@ -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 * );
index 69f31794d552a5bfaa8d00faf23d8e89f966c8e5..66c312a61ef13267838b818e3cadd04efa5c59ca 100644 (file)
@@ -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
index df963c278888e95e0f202b289352eb20eecdbbb4..f2377292f473f5d004a07540991e5167eee85f31 100644 (file)
@@ -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
index de00d0350d92cdd56fdf543ebbc3adb308c9e1ec..e044c10fc01acf57966419e0aa53cad66534bbdb 100644 (file)
@@ -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 );
 }
 
 /*****************************************************************************
index 9cbb42f0a6fd68d5aa5260e245dcaf0be83f7729..8ac89fc55f523e12cccb8c32be39df1be7143a6f 100644 (file)
@@ -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;
 }
 
 
index 7c8854c0f8f0805f04b9952569054db612fac1e2..34e2d8f329254ff87ccc69ba5b744f7ab434fbf1 100644 (file)
@@ -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: Stéphane 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 );
 }
 
 
index 96f394f9b09c96cbfd8261f12c7d987eab335508..48ea8ed307ce7d0f9811de706b14db6a84278574 100644 (file)
@@ -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;
index a25b2a4ab713c11e83a41dc6f05582ba67656d53..902c2a85e28f48671d74ecbfde4203d40cd1a427 100644 (file)
@@ -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
  *****************************************************************************/
index 59df307921877de9f4f02c6f5e901643aa1f6ee5..195aec99d603a934636fc38cd4f01279d91d3339 100644 (file)
@@ -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
  *****************************************************************************/
index a4fe28cd6d1c4000606a1ea188f5c3cc838ce4c1..b1d0ca78a3a380db46e8629b0ad5237b15ddd004 100644 (file)
@@ -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
  *****************************************************************************/
index 3589647e61d61297f2a85bc30d43e6406b9a2990..152dbf1ee356eb2e87e8f525cd2cc5b81efa31a1 100644 (file)
@@ -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
  *****************************************************************************
index 119b95ccfd3535e081c351724b076520889cd539..a30fd5c0156757c899557eea6eb37af86ef6317f 100644 (file)
@@ -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
  *****************************************************************************
index 5f1d011a74758da1edc4dc678fa9b5f10627335d..5b938f1ee2231c033be25213357447754f5daa8d 100644 (file)
@@ -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
  *****************************************************************************
index 9ae01d33a1e76c0b4a7d0dbe773667067e891519..db7c3bcadd55060e39b59d7b2e27d45daa7335ab 100644 (file)
@@ -2,7 +2,7 @@
  * i420_yuy2.c : YUV to YUV conversion module for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: i420_yuy2.c,v 1.1 2002/01/04 14:01:34 sam Exp $
+ * $Id: i420_yuy2.c,v 1.2 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -49,7 +49,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 );
 
@@ -92,66 +91,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_YUY2:
-                case FOURCC_YUNV:
-                    break;
-
-                case FOURCC_YVYU:
-                    break;
-
-                case FOURCC_UYVY:
-                case FOURCC_UYNV:
-                case FOURCC_Y422:
-                    break;
-
-                case FOURCC_IUYV:
-                    break;
-
-                case FOURCC_cyuv:
-                    break;
-
-#if defined (MODULE_NAME_IS_chroma_i420_yuy2)
-                case FOURCC_Y211:
-                    break;
-#endif
-
-                default:
-                    return 0;
-            }
-            break;
-
-        default:
-            return 0;
-    }
-
-    return 100;
-}
-
 /*****************************************************************************
  * chroma_Init: allocate a chroma function
  *****************************************************************************
index cf7676a2cbf2f46a38b66adf48c2bda101cd422f..dd44d00aa318bf11104beb8a303557830c59f653 100644 (file)
@@ -2,7 +2,7 @@
  * i422_yuy2.c : YUV to YUV conversion module for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: i422_yuy2.c,v 1.1 2002/01/04 14:01:34 sam Exp $
+ * $Id: i422_yuy2.c,v 1.2 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -48,7 +48,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 );
 
@@ -91,64 +90,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_I422:
-            switch( p_data->chroma.p_output->i_chroma )
-            {
-                case FOURCC_YUY2:
-                case FOURCC_YUNV:
-                    break;
-
-                case FOURCC_YVYU:
-                    break;
-
-                case FOURCC_UYVY:
-                case FOURCC_UYNV:
-                case FOURCC_Y422:
-                    break;
-
-                case FOURCC_IUYV:
-                    break;
-
-                case FOURCC_cyuv:
-                    break;
-
-#if defined (MODULE_NAME_IS_chroma_i422_yuy2)
-                case FOURCC_Y211:
-                    break;
-#endif
-
-                default:
-                    return 0;
-            }
-            break;
-
-        default:
-            return 0;
-    }
-
-    return 100;
-}
-
 /*****************************************************************************
  * chroma_Init: allocate a chroma function
  *****************************************************************************
index 84d39763163b8c20f3553a665a0c0ec7cec4f760..4aca5703ea2b89dc1d3c4c825e5a8cb1240550ce 100644 (file)
@@ -2,7 +2,7 @@
  * aout_directx.c: Windows DirectX audio output method
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: aout_directx.c,v 1.16 2002/01/28 23:08:31 stef Exp $
+ * $Id: aout_directx.c,v 1.17 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -91,7 +91,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 );
@@ -111,7 +110,6 @@ static void DirectSoundThread            ( 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;
@@ -119,18 +117,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
- *****************************************************************************
- * This function tries to probe for a Direct Sound  device and returns a
- * score to the plugin manager so that it can select the best plugin.
- *****************************************************************************/
-static int aout_Probe( probedata_t *p_data )
-{
-    /* For now just assume the computer has a sound device */
-    return( 1 );
-}
-
 /*****************************************************************************
  * aout_Open: open the audio device
  *****************************************************************************
index 1ca5d9c44b12320f32f40a0a8406048430712244..74bcb4f6b996a8b27551a38d6788e48538b6f9e9 100644 (file)
@@ -2,7 +2,7 @@
  * vout_directx.c: Windows DirectX video output display method
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: vout_directx.c,v 1.20 2002/01/27 22:14:52 gbazin Exp $
+ * $Id: vout_directx.c,v 1.21 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -71,7 +71,6 @@ DEFINE_GUID( IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0x
 /*****************************************************************************
  * Local prototypes.
  *****************************************************************************/
-static int  vout_Probe     ( probedata_t *p_data );
 static int  vout_Create    ( vout_thread_t * );
 static void vout_Destroy   ( vout_thread_t * );
 static int  vout_Init      ( vout_thread_t * );
@@ -102,7 +101,6 @@ static int  DirectXGetSurfaceDesc ( picture_t *p_pic );
  *****************************************************************************/
 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;
@@ -112,21 +110,6 @@ void _M( vout_getfunctions )( function_list_t * p_function_list )
     p_function_list->functions.vout.pf_display    = vout_Display;
 }
 
-/*****************************************************************************
- * vout_Probe: probe the video driver and return a score
- *****************************************************************************
- * This function tries to initialize Windows DirectX and returns a score to
- * the plugin manager so that it can select the best plugin.
- *****************************************************************************/
-static int vout_Probe( probedata_t *p_data )
-{
-
-    /* Check that at least DirectX5 is installed on the computer */
-    /* Fixme */
-
-    return( 400 );
-}
-
 /*****************************************************************************
  * vout_Create: allocate DirectX video thread output method
  *****************************************************************************
index 702d4d6636c6414f681a114d42a4cbebf4242df1..6c00138a5e7d7b799039f0be870dd714c5490dd6 100644 (file)
@@ -2,7 +2,7 @@
  * downmix.c : AC3 downmix module
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: downmix.c,v 1.6 2001/12/30 07:09:54 sam Exp $
+ * $Id: downmix.c,v 1.7 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Renaud Dartus <reno@via.ecp.fr>
  *
@@ -36,7 +36,6 @@
  * Local and extern prototypes.
  *****************************************************************************/
 static void downmix_getfunctions( function_list_t * p_function_list );
-static int  downmix_Probe       ( probedata_t *p_data );
 
 /*****************************************************************************
  * Build configuration tree.
@@ -66,7 +65,6 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static void downmix_getfunctions( function_list_t * p_function_list )
 {
-    p_function_list->pf_probe = downmix_Probe;
 #define F p_function_list->functions.downmix
     F.pf_downmix_3f_2r_to_2ch = _M( downmix_3f_2r_to_2ch );
     F.pf_downmix_3f_1r_to_2ch = _M( downmix_3f_1r_to_2ch );
@@ -78,11 +76,3 @@ static void downmix_getfunctions( function_list_t * p_function_list )
 #undef F
 }
 
-/*****************************************************************************
- * downmix_Probe: returns a preference score
- *****************************************************************************/
-static int downmix_Probe( probedata_t *p_data )
-{
-    return( 50 );
-}
-
index 2e364384c67f55d443a74a496c941caa270d328f..6d24779986e9cf8983020c413075d4344823cae8 100644 (file)
@@ -2,7 +2,7 @@
  * downmix3dn.c : accelerated 3D Now! AC3 downmix module
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: downmix3dn.c,v 1.7 2001/12/30 07:09:54 sam Exp $
+ * $Id: downmix3dn.c,v 1.8 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Renaud Dartus <reno@via.ecp.fr>
  *
@@ -36,7 +36,6 @@
  * Local and extern prototypes.
  *****************************************************************************/
 static void downmix_getfunctions( function_list_t * p_function_list );
-static int  downmix_Probe       ( probedata_t *p_data );
 
 /*****************************************************************************
  * Build configuration tree.
@@ -68,7 +67,6 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static void downmix_getfunctions( function_list_t * p_function_list )
 {
-    p_function_list->pf_probe = downmix_Probe;
 #define F p_function_list->functions.downmix
     F.pf_downmix_3f_2r_to_2ch = _M( downmix_3f_2r_to_2ch );
     F.pf_downmix_3f_1r_to_2ch = _M( downmix_3f_1r_to_2ch );
@@ -80,11 +78,3 @@ static void downmix_getfunctions( function_list_t * p_function_list )
 #undef F
 }
 
-/*****************************************************************************
- * downmix_Probe: returns a preference score
- *****************************************************************************/
-static int downmix_Probe( probedata_t *p_data )
-{
-    return( 200 );
-}
-
index 25993cdcfc62fa09bac4d27123cce2f0e01ea26e..c3022a23877512025f4a8b3833cfbdcbe52ab5a6 100644 (file)
@@ -2,7 +2,7 @@
  * downmixsse.c : accelerated SSE AC3 downmix module
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: downmixsse.c,v 1.7 2001/12/30 07:09:54 sam Exp $
+ * $Id: downmixsse.c,v 1.8 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Renaud Dartus <reno@via.ecp.fr>
  *
@@ -36,7 +36,6 @@
  * Local and extern prototypes.
  *****************************************************************************/
 static void downmix_getfunctions( function_list_t * p_function_list );
-static int  downmix_Probe       ( probedata_t *p_data );
 
 /*****************************************************************************
  * Build configuration tree.
@@ -67,7 +66,6 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static void downmix_getfunctions( function_list_t * p_function_list )
 {
-    p_function_list->pf_probe = downmix_Probe;
 #define F p_function_list->functions.downmix
     F.pf_downmix_3f_2r_to_2ch = _M( downmix_3f_2r_to_2ch );
     F.pf_downmix_3f_1r_to_2ch = _M( downmix_3f_1r_to_2ch );
@@ -79,11 +77,3 @@ static void downmix_getfunctions( function_list_t * p_function_list )
 #undef F
 }
 
-/*****************************************************************************
- * downmix_Probe: returns a preference score
- *****************************************************************************/
-static int downmix_Probe( probedata_t *p_data )
-{
-    return( 200 );
-}
-
index ef5051b4db80cce69a6a8584ccce4bbea8918026..4512301036a158090376fcdbbe01ded43e6461c8 100644 (file)
@@ -2,7 +2,7 @@
  * aout_dsp.c : dsp functions library
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: aout_dsp.c,v 1.20 2002/01/28 23:08:31 stef Exp $
+ * $Id: aout_dsp.c,v 1.21 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -68,7 +68,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 );
@@ -82,7 +81,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;
@@ -90,30 +88,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
- *****************************************************************************
- * This function tries to open the DSP and returns a score to the plugin
- * manager so that it can choose the most appropriate one.
- *****************************************************************************/
-static int aout_Probe( probedata_t *p_data )
-{
-    char * psz_device = main_GetPszVariable( AOUT_DSP_VAR, AOUT_DSP_DEFAULT );
-    int i_fd = open( psz_device, O_WRONLY|O_NONBLOCK );
-
-    /* If we were unable to open the device, there is no way we can use
-     * the plugin. Return a score of 0. */
-    if( i_fd < 0 )
-    {
-        return( 0 );
-    }
-
-    /* Otherwise, there are good chances we can use this plugin, return 100. */
-    close( i_fd );
-
-    return( 100 );
-}
-
 /*****************************************************************************
  * aout_Open: opens the audio device (the digital sound processor)
  *****************************************************************************
index 326cc693f09b5aac368dc24e342ec9407f8a368b..d27dc1ee1f9331a2ca7f7462ae2d61596f4300f1 100644 (file)
@@ -2,7 +2,7 @@
  * aout_dummy.c : dummy audio output plugin
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: aout_dummy.c,v 1.18 2002/01/28 23:08:31 stef Exp $
+ * $Id: aout_dummy.c,v 1.19 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -46,7 +46,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 );
@@ -60,7 +59,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;
@@ -68,14 +66,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 )
-{
-    return( 1 );
-}
-
 /*****************************************************************************
  * aout_Open: opens a dummy audio device
  *****************************************************************************/
index 5f45dd27bcd1d4119ae2d776484da62aafb28daa..7a892b740ff8a201e9917c7e7adc1ac5e737d446 100644 (file)
@@ -2,7 +2,7 @@
  * input_dummy.c: dummy input plugin, to manage "vlc:***" special options
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: input_dummy.c,v 1.14 2002/01/10 04:11:25 sam Exp $
+ * $Id: input_dummy.c,v 1.15 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -46,7 +46,7 @@
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-static int  DummyProbe     ( probedata_t * );
+static int  DummyProbe     ( struct input_thread_s * );
 static void DummyInit      ( struct input_thread_s * );
 static void DummyOpen      ( struct input_thread_s * );
 static void DummyClose     ( struct input_thread_s * );
@@ -78,7 +78,7 @@ typedef struct dummy_data_s
 void _M( input_getfunctions )( function_list_t * p_function_list )
 {
 #define input p_function_list->functions.input
-    p_function_list->pf_probe = DummyProbe;
+    input.pf_probe            = DummyProbe;
     input.pf_init             = DummyInit;
     input.pf_open             = DummyOpen;
     input.pf_close            = DummyClose;
@@ -98,18 +98,17 @@ void _M( input_getfunctions )( function_list_t * p_function_list )
 /*****************************************************************************
  * DummyProbe: verifies that the input is a vlc command
  *****************************************************************************/
-static int DummyProbe( probedata_t *p_data )
+static int DummyProbe( input_thread_t *p_input )
 {
-    input_thread_t *p_input = (input_thread_t *)p_data;
     char *psz_name = p_input->p_source;
 
     if( ( strlen(psz_name) > 4 ) && !strncasecmp( psz_name, "vlc:", 4 ) )
     {
-        /* If the user specified "vlc:" then it's probably a file */
-        return( 1 );
+        /* If the user specified "vlc:" then it's probably a special command */
+        return 0;
     }
 
-    return( 0 );
+    return -1;
 }
 
 /*****************************************************************************
@@ -221,7 +220,8 @@ static int DummyRead( struct input_thread_s *p_input, data_packet_t **pp_data )
     switch( p_method->i_command )
     {
         case COMMAND_QUIT:
-            p_input->b_die = 1;
+            p_main->p_intf->b_die = 1;
+            p_input->b_eof = 1;
             break;
 
         case COMMAND_LOOP:
index 21bd9622a435bb76438d3ecb5c0b6c3cbb0d6498..6dfa763e0807ffcadefaf2d6d69f880477f31739 100644 (file)
@@ -2,7 +2,7 @@
  * intf_dummy.c: dummy interface plugin
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: intf_dummy.c,v 1.14 2002/01/29 20:11:18 gbazin Exp $
+ * $Id: intf_dummy.c,v 1.15 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -44,7 +44,6 @@ typedef struct intf_sys_s
 /*****************************************************************************
  * 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 );
@@ -55,23 +54,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( 1 );
-}
-
 /*****************************************************************************
  * intf_Open: initialize dummy interface
  *****************************************************************************/
index 2f41bd765ae4e4a74596ad48df2c697cc93fb297..803bf8582931827f5b202ed4b11c3ead45c76d77 100644 (file)
@@ -2,7 +2,7 @@
  * vout_dummy.c: Dummy video output display method for testing purposes
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: vout_dummy.c,v 1.17 2002/01/12 01:25:57 sam Exp $
+ * $Id: vout_dummy.c,v 1.18 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -52,7 +52,6 @@ typedef struct vout_sys_s
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-static int  vout_Probe     ( probedata_t *p_data );
 static int  vout_Create    ( struct vout_thread_s * );
 static int  vout_Init      ( struct vout_thread_s * );
 static void vout_End       ( struct vout_thread_s * );
@@ -69,7 +68,6 @@ static int  DummyNewPicture( struct vout_thread_s *, struct picture_s * );
  *****************************************************************************/
 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;
@@ -79,14 +77,6 @@ void _M( vout_getfunctions )( function_list_t * p_function_list )
     p_function_list->functions.vout.pf_display    = vout_Display;
 }
 
-/*****************************************************************************
- * intf_Probe: return a score
- *****************************************************************************/
-static int vout_Probe( probedata_t *p_data )
-{
-    return( 1 );
-}
-
 /*****************************************************************************
  * vout_Create: allocates dummy video thread output method
  *****************************************************************************
index 1186d984e66313c95fbbc9f8b49d3974dde1c6c2..101495f041a2493c373ef7c63bbbc8973205c8fd 100644 (file)
@@ -9,7 +9,7 @@
  *  -dvd_udf to find files
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: input_dvd.c,v 1.118 2002/01/10 04:11:25 sam Exp $
+ * $Id: input_dvd.c,v 1.119 2002/02/15 13:32:53 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -85,7 +85,7 @@
  * Local prototypes
  *****************************************************************************/
 /* called from outside */
-static int  DVDProbe        ( probedata_t *p_data );
+static int  DVDProbe        ( struct input_thread_s * );
 static void DVDInit         ( struct input_thread_s * );
 static void DVDEnd          ( struct input_thread_s * );
 static void DVDOpen         ( struct input_thread_s * );
@@ -124,7 +124,7 @@ DECLARE_BUFFERS_SHAREBUFFER( FLAGS );
 void _M( input_getfunctions )( function_list_t * p_function_list )
 {
 #define input p_function_list->functions.input
-    p_function_list->pf_probe = DVDProbe;
+    input.pf_probe            = DVDProbe;
     input.pf_init             = DVDInit;
     input.pf_open             = DVDOpen;
     input.pf_close            = DVDClose;
@@ -150,21 +150,17 @@ void _M( input_getfunctions )( function_list_t * p_function_list )
 /*****************************************************************************
  * DVDProbe: verifies that the stream is a PS stream
  *****************************************************************************/
-static int DVDProbe( probedata_t *p_data )
+static int DVDProbe( input_thread_t * p_input )
 {
-    input_thread_t * p_input = (input_thread_t *)p_data;
-
     char * psz_name = p_input->p_source;
-    int i_score = 0;
 
     if( ( strlen(psz_name) > 4 ) && !strncasecmp( psz_name, "dvd:", 4 ) )
     {
         /* If the user specified "dvd:" then it's probably a DVD */
-        i_score = 100;
-        psz_name += 4;
+        return 0;
     }
 
-    return( i_score );
+    return -1;
 }
 
 /*****************************************************************************
index 1b86929699daa0050c88ecf49ca7264f7ddfa0d3..e20d3f5fb24d85bea1acabd324ca0b0a09ebdf37 100644 (file)
@@ -6,7 +6,7 @@
  * It depends on: libdvdread for ifo files and block reading.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: input_dvdread.c,v 1.19 2002/01/15 19:01:28 stef Exp $
+ * $Id: input_dvdread.c,v 1.20 2002/02/15 13:32:53 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -78,7 +78,7 @@
  * Local prototypes
  *****************************************************************************/
 /* called from outside */
-static int  DvdReadProbe    ( probedata_t *p_data );
+static int  DvdReadProbe    ( struct input_thread_s * );
 static void DvdReadInit     ( struct input_thread_s * );
 static void DvdReadEnd      ( struct input_thread_s * );
 static void DvdReadOpen     ( struct input_thread_s * );
@@ -115,7 +115,7 @@ DECLARE_BUFFERS_SHAREBUFFER( FLAGS );
 void _M( input_getfunctions )( function_list_t * p_function_list )
 {
 #define input p_function_list->functions.input
-    p_function_list->pf_probe = DvdReadProbe;
+    input.pf_probe            = DvdReadProbe;
     input.pf_init             = DvdReadInit;
     input.pf_open             = DvdReadOpen;
     input.pf_close            = DvdReadClose;
@@ -142,19 +142,17 @@ void _M( input_getfunctions )( function_list_t * p_function_list )
 /*****************************************************************************
  * DvdReadProbe: verifies that the stream is a PS stream
  *****************************************************************************/
-static int DvdReadProbe( probedata_t *p_data )
+static int DvdReadProbe( input_thread_t *p_input )
 {
-    input_thread_t * p_input = (input_thread_t *)p_data;
-
     char * psz_name = p_input->p_source;
 
     if((( strlen(psz_name) > 8 ) && !strncasecmp( psz_name, "dvdread:", 8 ))
      ||(( strlen(psz_name) > 4 ) && !strncasecmp( psz_name, "dvd:", 4 )))
     {
-        return 1;
+        return 0;
     }
 
-    return 0;
+    return -1;
 }
 
 /*****************************************************************************
index 871aa84897bb8ce8b013906789e6c086f5431452..52fc5b86859b4a20930b10d71cac1be2e17aac0a 100644 (file)
@@ -2,7 +2,7 @@
  * aout_esd.c : Esound functions library
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: aout_esd.c,v 1.18 2002/01/28 23:08:31 stef Exp $
+ * $Id: aout_esd.c,v 1.19 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -58,7 +58,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 );
@@ -72,7 +71,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;
@@ -80,19 +78,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: open an esd socket
  *****************************************************************************/
index 5bf04207b1218fdf4bc6231eb82553dfb30e87dd..1a3e1fe266a66aa87a4bb9d9eefb4dbd8b470bf3 100644 (file)
@@ -2,7 +2,7 @@
  * fb.c : framebuffer plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: fb.c,v 1.12 2002/01/12 01:25:57 sam Exp $
+ * $Id: fb.c,v 1.13 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *      
@@ -49,7 +49,6 @@
  *****************************************************************************/
 static void vout_getfunctions( function_list_t * p_function_list );
 
-static int  vout_Probe     ( probedata_t *p_data );
 static int  vout_Create    ( vout_thread_t * );
 static void vout_Destroy   ( vout_thread_t * );
 static void vout_Render    ( vout_thread_t *, picture_t * );
@@ -125,7 +124,6 @@ typedef struct vout_sys_s
  *****************************************************************************/
 static void 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;
@@ -135,27 +133,6 @@ static void vout_getfunctions( function_list_t * p_function_list )
     p_function_list->functions.vout.pf_display    = vout_Display;
 }
 
-/*****************************************************************************
- * vout_Probe: probe the video driver and return a score
- *****************************************************************************
- * This function tries to open the framebuffer and returns a score to the
- * plugin manager so that it can select the best plugin.
- *****************************************************************************/
-static int vout_Probe( probedata_t *p_data )
-{
-    int i_fd;
-
-    i_fd = open( main_GetPszVariable( VOUT_FB_DEV_VAR,
-                                      VOUT_FB_DEV_DEFAULT ), O_RDWR );
-    if( i_fd == -1 )
-    {
-        return( 0 );
-    }
-    close( i_fd );
-
-    return( 30 );
-}
-
 /*****************************************************************************
  * vout_Create: allocates FB video thread output method
  *****************************************************************************
index db33b7eabce9cdaa8749db07c5605080bdb3cfa7..35ea719986fc3b87416b8869874c2c441e3718fb 100644 (file)
@@ -2,7 +2,7 @@
  * deinterlace.c : deinterlacer plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: deinterlace.c,v 1.4 2002/01/05 03:49:18 sam Exp $
+ * $Id: deinterlace.c,v 1.5 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -83,7 +83,6 @@ typedef struct vout_sys_s
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-static int  vout_Probe     ( probedata_t *p_data );
 static int  vout_Create    ( struct vout_thread_s * );
 static int  vout_Init      ( struct vout_thread_s * );
 static void vout_End       ( struct vout_thread_s * );
@@ -98,7 +97,6 @@ static void vout_Display   ( struct vout_thread_s *, struct picture_s * );
  *****************************************************************************/
 static void 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;
@@ -108,14 +106,6 @@ static void vout_getfunctions( function_list_t * p_function_list )
     p_function_list->functions.vout.pf_display    = vout_Display;
 }
 
-/*****************************************************************************
- * intf_Probe: return a score
- *****************************************************************************/
-static int vout_Probe( probedata_t *p_data )
-{
-    return( 0 );
-}
-
 /*****************************************************************************
  * vout_Create: allocates Deinterlace video thread output method
  *****************************************************************************
index c36fc663f86a15c24fcbb0f2c12b9ab46071a517..c2259d9aaec9717cdc88db13fd21603e951a46ea 100644 (file)
@@ -2,7 +2,7 @@
  * distort.c : Misc video effects plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: distort.c,v 1.6 2002/01/05 03:49:18 sam Exp $
+ * $Id: distort.c,v 1.7 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -86,7 +86,6 @@ typedef struct vout_sys_s
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-static int  vout_Probe     ( probedata_t *p_data );
 static int  vout_Create    ( struct vout_thread_s * );
 static int  vout_Init      ( struct vout_thread_s * );
 static void vout_End       ( struct vout_thread_s * );
@@ -106,7 +105,6 @@ static void DistortRipple  ( struct vout_thread_s *, struct picture_s *,
  *****************************************************************************/
 static void 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;
@@ -116,14 +114,6 @@ static void vout_getfunctions( function_list_t * p_function_list )
     p_function_list->functions.vout.pf_display    = vout_Display;
 }
 
-/*****************************************************************************
- * intf_Probe: return a score
- *****************************************************************************/
-static int vout_Probe( probedata_t *p_data )
-{
-    return( 0 );
-}
-
 /*****************************************************************************
  * vout_Create: allocates Distort video thread output method
  *****************************************************************************
index 2ead9f1cc67f19a02c8b95f0e3a17d9b7b3dd99d..ace5419e81f044a1de21b9787d0259ac83310d09 100644 (file)
@@ -2,7 +2,7 @@
  * invert.c : Invert video plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: invert.c,v 1.6 2002/01/05 03:49:18 sam Exp $
+ * $Id: invert.c,v 1.7 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -76,7 +76,6 @@ typedef struct vout_sys_s
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-static int  vout_Probe     ( probedata_t *p_data );
 static int  vout_Create    ( struct vout_thread_s * );
 static int  vout_Init      ( struct vout_thread_s * );
 static void vout_End       ( struct vout_thread_s * );
@@ -91,7 +90,6 @@ static void vout_Display   ( struct vout_thread_s *, struct picture_s * );
  *****************************************************************************/
 static void 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;
@@ -101,14 +99,6 @@ static void vout_getfunctions( function_list_t * p_function_list )
     p_function_list->functions.vout.pf_display    = vout_Display;
 }
 
-/*****************************************************************************
- * intf_Probe: return a score
- *****************************************************************************/
-static int vout_Probe( probedata_t *p_data )
-{
-    return( 0 );
-}
-
 /*****************************************************************************
  * vout_Create: allocates Invert video thread output method
  *****************************************************************************
index 1e96bb10eec852e992aa8ccc1344a75f5557fdfb..86ef46f33e14b1a2c60cd98ae80b681f6d894d97 100644 (file)
@@ -2,7 +2,7 @@
  * transform.c : transform image plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: transform.c,v 1.5 2002/01/05 03:49:18 sam Exp $
+ * $Id: transform.c,v 1.6 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -84,7 +84,6 @@ typedef struct vout_sys_s
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-static int  vout_Probe     ( probedata_t *p_data );
 static int  vout_Create    ( struct vout_thread_s * );
 static int  vout_Init      ( struct vout_thread_s * );
 static void vout_End       ( struct vout_thread_s * );
@@ -99,7 +98,6 @@ static void vout_Display   ( struct vout_thread_s *, struct picture_s * );
  *****************************************************************************/
 static void 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;
@@ -109,14 +107,6 @@ static void vout_getfunctions( function_list_t * p_function_list )
     p_function_list->functions.vout.pf_display    = vout_Display;
 }
 
-/*****************************************************************************
- * intf_Probe: return a score
- *****************************************************************************/
-static int vout_Probe( probedata_t *p_data )
-{
-    return( 0 );
-}
-
 /*****************************************************************************
  * vout_Create: allocates Transform video thread output method
  *****************************************************************************
index 17b9c1d9288e6099a23912c4bd984b3ec88f0abf..76c9c153340edd61f4f8dc39cc3dbe3f6c2844b3 100644 (file)
@@ -2,7 +2,7 @@
  * wall.c : Wall video plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: wall.c,v 1.11 2002/01/30 00:09:49 sam Exp $
+ * $Id: wall.c,v 1.12 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -85,7 +85,6 @@ typedef struct vout_sys_s
 /*****************************************************************************
  * 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 * );
@@ -102,7 +101,6 @@ static void RemoveAllVout  ( vout_thread_t *p_vout );
  *****************************************************************************/
 static void 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;
@@ -112,14 +110,6 @@ static void vout_getfunctions( function_list_t * p_function_list )
     p_function_list->functions.vout.pf_display    = vout_Display;
 }
 
-/*****************************************************************************
- * intf_Probe: return a score
- *****************************************************************************/
-static int vout_Probe( probedata_t *p_data )
-{
-    return( 0 );
-}
-
 /*****************************************************************************
  * vout_Create: allocates Wall video thread output method
  *****************************************************************************
@@ -198,6 +188,7 @@ static int vout_Create( vout_thread_t *p_vout )
                      "using wall:3x3" );
         p_vout->p_sys->i_col = 3;
         p_vout->p_sys->i_row = 3;
+        psz_method = NULL;
     }
 
     p_vout->p_sys->i_col = MAX( 1, MIN( 15, p_vout->p_sys->i_col ) );
index 08455a82cefee739105bf99819d7eb0bc8c37ea7..346705433821642479781596228b17ad7bf2ddc3 100644 (file)
@@ -2,7 +2,7 @@
  * ggi.c : GGI plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: ggi.c,v 1.12 2002/01/12 01:25:57 sam Exp $
+ * $Id: ggi.c,v 1.13 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -44,7 +44,6 @@
  *****************************************************************************/
 static void vout_getfunctions( function_list_t * p_function_list );
 
-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 * );
@@ -102,7 +101,6 @@ typedef struct vout_sys_s
  *****************************************************************************/
 static void 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;
@@ -112,17 +110,6 @@ static void vout_getfunctions( function_list_t * p_function_list )
     p_function_list->functions.vout.pf_display = vout_Display;
 }
 
-/*****************************************************************************
- * vout_Probe: probe the video driver and return a score
- *****************************************************************************
- * This function tries to initialize GGI 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( 1 );
-}
-
 /*****************************************************************************
  * vout_Create: allocate GGI video thread output method
  *****************************************************************************
index bb7a2a0312c176da7d66424b2456f9d11b0e2bff..6be25a75c7a055a7eba0156d4eeff1fbb6feb88d 100644 (file)
@@ -2,7 +2,7 @@
  * glide.c : 3dfx Glide plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: glide.c,v 1.11 2002/01/09 02:01:14 sam Exp $
+ * $Id: glide.c,v 1.12 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -51,7 +51,6 @@
  *****************************************************************************/
 static void vout_getfunctions( function_list_t * p_function_list );
 
-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 * );
@@ -104,7 +103,6 @@ typedef struct vout_sys_s
  *****************************************************************************/
 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;
@@ -114,21 +112,6 @@ void _M( vout_getfunctions )( function_list_t * p_function_list )
     p_function_list->functions.vout.pf_display    = vout_Display;
 }
 
-/*****************************************************************************
- * 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 )
-{
-    /* We could do a grSstQueryBoards( GrHwConfiguration *hwConfig ) at
-     * this point, but if the user didn't configure his 3dfx card, we
-     * have great chances to segfault here. So we'd better assume
-     * everything is fine and worry only if we really need to use Glide */
-    return( 1 );
-}
-
 /*****************************************************************************
  * vout_Create: allocates Glide video thread output method
  *****************************************************************************
index ad228e4fb1d3302a92c165458b41df575fe47c59..afa145166f83299685709979dfa8d5964650eab9 100644 (file)
@@ -2,7 +2,7 @@
  * gnome.c : Gnome plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: gnome.c,v 1.8 2002/01/15 19:01:28 stef Exp $
+ * $Id: gnome.c,v 1.9 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *      
@@ -52,7 +52,6 @@
  * Local prototypes.
  *****************************************************************************/
 static void intf_getfunctions( function_list_t * p_function_list );
-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 );
@@ -124,30 +123,11 @@ void g_atexit( GVoidFunc func )
  *****************************************************************************/
 static void 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 )
-{
-#ifndef WIN32
-    if( getenv( "DISPLAY" ) == NULL )
-    {
-        return( 15 );
-    }
-#endif
-
-    return( 100 );
-}
-
 /*****************************************************************************
  * intf_Open: initialize and create window
  *****************************************************************************/
index b103c2a47ca112941dbe1cd5ae293498be5a444a..38f5a4111c6d0e4e97ad4cbb9345e0c6d5eebade 100644 (file)
@@ -2,7 +2,7 @@
  * gtk.c : Gtk+ plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: gtk.c,v 1.10 2002/01/15 19:01:28 stef Exp $
+ * $Id: gtk.c,v 1.11 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *      
@@ -53,7 +53,6 @@
  * Local prototypes.
  *****************************************************************************/
 static void intf_getfunctions ( function_list_t * p_function_list );
-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 );
@@ -125,30 +124,11 @@ void g_atexit( GVoidFunc func )
  *****************************************************************************/
 static void 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 Gtk+ and returns a score to the
- * plugin manager so that it can select the best plugin.
- *****************************************************************************/
-static int intf_Probe( probedata_t *p_data )
-{
-#ifndef WIN32
-    if( getenv( "DISPLAY" ) == NULL )
-    {
-        return( 10 );
-    }
-#endif
-
-    return( 90 );
-}
-
 /*****************************************************************************
  * intf_Open: initialize and create window
  *****************************************************************************/
index 471388fadb1c192012c51bbed749df9c88f015f5..17196e2695194887cf7674a369a7cb5275306b6e 100644 (file)
@@ -2,7 +2,7 @@
  * gtk_playlist.c : Interface for the playlist dialog
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: gtk_playlist.c,v 1.28 2002/02/14 23:29:17 sam Exp $
+ * $Id: gtk_playlist.c,v 1.29 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Pierre Baillet <oct@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
 
 #include <sys/types.h>          /* for readdir  and stat stuff */
 
+#if !defined( WIN32 )
+#   include <dirent.h>
+#endif
+
 #include <sys/stat.h>
 #include <unistd.h>
 
index d223b98b7fcee51a3cfcac55af1bbbfe7af53fbb..db6b3e14399c3eabcc9205e516f352c6a2ade71d 100644 (file)
@@ -2,7 +2,7 @@
  * idct.c : C IDCT module
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: idct.c,v 1.19 2001/12/30 07:09:55 sam Exp $
+ * $Id: idct.c,v 1.20 2002/02/15 13:32:53 sam Exp $
  *
  * Author: Gaël Hendryckx <jimmy@via.ecp.fr>
  *
@@ -59,14 +59,6 @@ MODULE_DEACTIVATE_STOP
 
 /* Following functions are local */
 
-/*****************************************************************************
- * idct_Probe: returns a preference score
- *****************************************************************************/
-static int idct_Probe( probedata_t *p_data )
-{
-    return( 50 );
-}
-
 /*****************************************************************************
  * NormScan : Unused in this IDCT
  *****************************************************************************/
index c4e1bfcbf5b1c10942f93cf381a7aae1f22db987..4f0de977f5d24642f9874ab84b7c56b1f759fc8b 100644 (file)
@@ -2,7 +2,7 @@
  * idct_decl.h : common declarations, must be included at the very end
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: idct_decl.h,v 1.1 2001/09/05 16:07:49 massiot Exp $
+ * $Id: idct_decl.h,v 1.2 2002/02/15 13:32:53 sam Exp $
  *
  * Author: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -44,7 +44,6 @@ static void IDCTAdd( dctelem_t * p_block, yuv_data_t * p_dest,
  *****************************************************************************/
 static void idct_getfunctions( function_list_t * p_function_list )
 {
-    p_function_list->pf_probe = idct_Probe;
 #define F p_function_list->functions.idct
     F.pf_idct_init = InitIDCT;
     F.pf_norm_scan = NormScan;
index d13d699706d29a0ee5bfd7f26c8a0034e72d73ed..d3b146f528230384e083173137099ae89cdbd3e9 100644 (file)
@@ -2,7 +2,7 @@
  * idctaltivec.c : Altivec IDCT module
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: idctaltivec.c,v 1.22 2001/12/30 07:09:55 sam Exp $
+ * $Id: idctaltivec.c,v 1.23 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -62,14 +62,6 @@ MODULE_DEACTIVATE_STOP
 
 /* Following functions are local */
 
-/*****************************************************************************
- * idct_Probe: return a preference score
- *****************************************************************************/
-static int idct_Probe( probedata_t *p_data )
-{
-    return( 200 );
-}
-
 /*****************************************************************************
  * NormScan : This IDCT uses reordered coeffs, so we patch the scan table
  *****************************************************************************/
@@ -726,7 +718,6 @@ void idct_block_add_altivec (vector_s16_t * block, unsigned char * dest,
  *****************************************************************************/
 static void idct_getfunctions( function_list_t * p_function_list )
 {
-    p_function_list->pf_probe = idct_Probe;
 #define F p_function_list->functions.idct
     F.pf_idct_init = InitIDCT;
     F.pf_norm_scan = NormScan;
index d67765662d15ed7b589d78dd6a9877eeaf2087f0..d243599a3ef7839b5b1db5469ff08bae8f438730 100644 (file)
@@ -2,7 +2,7 @@
  * idctclassic.c : Classic IDCT module
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: idctclassic.c,v 1.19 2001/12/30 07:09:55 sam Exp $
+ * $Id: idctclassic.c,v 1.20 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
  *
@@ -61,14 +61,6 @@ MODULE_DEACTIVATE_STOP
 
 /* Following functions are local */
 
-/*****************************************************************************
- * idct_Probe: returns a preference score
- *****************************************************************************/
-static int idct_Probe( probedata_t *p_data )
-{
-    return( 100 );
-}
-
 /*****************************************************************************
  * NormScan : Unused in this IDCT
  *****************************************************************************/
index a32e8beaed959b6cb161669eae78561a4e868896..6f04a398139ba3242fe0f9a28094f66b3eb3e2f8 100644 (file)
@@ -2,7 +2,7 @@
  * idctmmx.c : MMX IDCT module
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: idctmmx.c,v 1.22 2001/12/30 07:09:55 sam Exp $
+ * $Id: idctmmx.c,v 1.23 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *          Michel Lespinasse <walken@zoy.org>
@@ -66,14 +66,6 @@ MODULE_DEACTIVATE_STOP
 
 /* Following functions are local */
 
-/*****************************************************************************
- * idct_Probe: return a preference score
- *****************************************************************************/
-static int idct_Probe( probedata_t *p_data )
-{
-    return( 150 );
-}
-
 /*****************************************************************************
  * NormScan : This IDCT uses reordered coeffs, so we patch the scan table
  *****************************************************************************/
index b29dfa3ca7786efb873862305b84d908be08b0f8..83cdbf739d09f1fbcf53c777044ef705a034517d 100644 (file)
@@ -2,7 +2,7 @@
  * idctmmxext.c : MMX EXT IDCT module
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: idctmmxext.c,v 1.19 2001/12/30 07:09:55 sam Exp $
+ * $Id: idctmmxext.c,v 1.20 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *          Michel Lespinasse <walken@zoy.org>
@@ -66,14 +66,6 @@ MODULE_DEACTIVATE_STOP
 
 /* Following functions are local */
 
-/*****************************************************************************
- * idct_Probe: return a preference score
- *****************************************************************************/
-static int idct_Probe( probedata_t *p_data )
-{
-    return( 200 );
-}
-
 /*****************************************************************************
  * NormScan : This IDCT uses reordered coeffs, so we patch the scan table
  *****************************************************************************/
index 83d21ae30001bf363dbe34f9d5f59990fcce8570..acbaa4019aa43169cf797ca2a7af869c953f4f97 100644 (file)
@@ -2,7 +2,7 @@
  * imdct.c : IMDCT module
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: imdct.c,v 1.7 2001/12/30 07:09:55 sam Exp $
+ * $Id: imdct.c,v 1.8 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
  *
@@ -36,7 +36,6 @@
  * Local and extern prototypes.
  *****************************************************************************/
 static void imdct_getfunctions( function_list_t * p_function_list );
-static int  imdct_Probe       ( probedata_t *p_data );
 
 /*****************************************************************************
  * Build configuration tree.
@@ -66,7 +65,6 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static void imdct_getfunctions( function_list_t * p_function_list )
 {
-    p_function_list->pf_probe = imdct_Probe;
 #define F p_function_list->functions.imdct
     F.pf_imdct_init    = _M( imdct_init );
     F.pf_imdct_256     = _M( imdct_do_256 );
@@ -76,11 +74,3 @@ static void imdct_getfunctions( function_list_t * p_function_list )
 #undef F
 }
 
-/*****************************************************************************
- * imdct_Probe: returns a preference score
- *****************************************************************************/
-static int imdct_Probe( probedata_t *p_data )
-{
-    return( 50 );
-}
-
index 62cee6244475fb21288498d338bee32c8b943da8..527fc9d421bfa8e03a9b4854e4148d07934b3d55 100644 (file)
@@ -2,7 +2,7 @@
  * imdct3dn.c : accelerated 3D Now! IMDCT module
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: imdct3dn.c,v 1.9 2001/12/30 07:09:55 sam Exp $
+ * $Id: imdct3dn.c,v 1.10 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Renaud Dartus <reno@via.ecp.fr>
  *
@@ -36,7 +36,6 @@
  * Local and extern prototypes.
  *****************************************************************************/
 static void imdct_getfunctions( function_list_t * p_function_list );
-static int  imdct_Probe       ( probedata_t *p_data );
 
 /*****************************************************************************
  * Build configuration tree.
@@ -68,7 +67,6 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static void imdct_getfunctions( function_list_t * p_function_list )
 {
-    p_function_list->pf_probe = imdct_Probe;
 #define F p_function_list->functions.imdct
     F.pf_imdct_init    = _M( imdct_init );
     F.pf_imdct_256     = _M( imdct_do_256 );
@@ -78,11 +76,3 @@ static void imdct_getfunctions( function_list_t * p_function_list )
 #undef F
 }
 
-/*****************************************************************************
- * imdct_Probe: returns a preference score
- *****************************************************************************/
-static int imdct_Probe( probedata_t *p_data )
-{
-    return( 200 );
-}
-
index be86203c069235ea8335fe2607d69b6c35aceb47..3f988efd0fc988f3bbc45c8d87b82399c14c31bd 100644 (file)
@@ -2,7 +2,7 @@
  * imdctsse.c : accelerated SSE IMDCT module
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: imdctsse.c,v 1.10 2001/12/30 07:09:55 sam Exp $
+ * $Id: imdctsse.c,v 1.11 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
  *
@@ -36,7 +36,6 @@
  * Local and extern prototypes.
  *****************************************************************************/
 static void imdct_getfunctions( function_list_t * p_function_list );
-static int  imdct_Probe       ( probedata_t *p_data );
 
 /*****************************************************************************
  * Build configuration tree.
@@ -67,7 +66,6 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static void imdct_getfunctions( function_list_t * p_function_list )
 {
-    p_function_list->pf_probe = imdct_Probe;
 #define F p_function_list->functions.imdct
     F.pf_imdct_init    = _M( imdct_init );
     F.pf_imdct_256     = _M( imdct_do_256 );
@@ -77,15 +75,3 @@ static void imdct_getfunctions( function_list_t * p_function_list )
 #undef F
 }
 
-/*****************************************************************************
- * imdct_Probe: returns a preference score
- *****************************************************************************/
-static int imdct_Probe( probedata_t *p_data )
-{
-#if defined ( __MINGW32__ )
-    return 0;
-#else
-    return( 200 );
-#endif
-}
-
index f3a09cbb0730b7f8c8b32160a0e76b4cab93ee69..b881754f83ede002d0ad9a4848e2654b144d4d20 100644 (file)
@@ -2,7 +2,7 @@
  * lirc.c : lirc plugin for vlc
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: lirc.c,v 1.1 2002/02/06 02:37:18 sam Exp $
+ * $Id: lirc.c,v 1.2 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
  *
@@ -54,7 +54,6 @@ typedef struct intf_sys_s
  *****************************************************************************/
 static void intf_getfunctions( function_list_t * p_function_list );
 
-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 );
@@ -86,20 +85,11 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static void 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
- *****************************************************************************/
-static int intf_Probe( probedata_t *p_data )
-{
-    return( 1 );
-}
-
 /*****************************************************************************
  * intf_Open: initialize dummy interface
  *****************************************************************************/
index e91961bfda865c0031e0c2214c823a01e7f9f676..650b5a3a6fe9250d05e4bdc51b20c5187820aff8 100644 (file)
@@ -2,7 +2,7 @@
  * lpcm_decoder_thread.c: lpcm decoder thread
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: lpcm_adec.c,v 1.10 2002/01/21 23:57:46 massiot Exp $
+ * $Id: lpcm_adec.c,v 1.11 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Henri Fallon <henri@videolan.org>
@@ -45,7 +45,7 @@
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-static int  decoder_Probe  ( probedata_t * );
+static int  decoder_Probe  ( u8 * );
 static int  decoder_Run    ( decoder_config_t * );
        void DecodeFrame    ( lpcmdec_thread_t * );
 static int  InitThread     ( lpcmdec_thread_t * );
@@ -57,8 +57,8 @@ static void EndThread      ( lpcmdec_thread_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;
 }
 
 /*****************************************************************************
@@ -82,9 +82,9 @@ MODULE_DEACTIVATE_STOP
 /*****************************************************************************
  * decoder_Probe: probe the decoder and return score
  *****************************************************************************/
-static int decoder_Probe( probedata_t *p_data )
+static int decoder_Probe( u8 *pi_type )
 {
-    return ( p_data->i_type == LPCM_AUDIO_ES ) ? 100 : 0;
+    return ( *pi_type == LPCM_AUDIO_ES ) ? 0 : -1;
 }
 
 /*****************************************************************************
index b1f9c2c4f0cb2c67150e602104422e028ccfbdde..75a5bca5ed25ebbb067312fc0ab172f2a7c25c48 100644 (file)
@@ -2,7 +2,7 @@
  * aout_darwin.c : Darwin audio output plugin
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: aout_macosx.c,v 1.11 2002/01/28 23:08:31 stef Exp $
+ * $Id: aout_macosx.c,v 1.12 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Colin Delacroix <colin@zoy.org>
  *
@@ -43,8 +43,6 @@
 
 #include "audio_output.h"                                   /* aout_thread_t */
 
-#include "modules.h"
-
 #include <Carbon/Carbon.h>
 #include <CoreAudio/AudioHardware.h>
 
@@ -78,7 +76,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 );
@@ -105,7 +102,6 @@ static void Convert8BitIntegerTo32Float( Ptr in8BitDataPtr, Ptr p_out32BitDataPt
  *****************************************************************************/
 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;
@@ -113,15 +109,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 )
-{
-    /* This plugin always works under OS X */
-    return( 100 );
-}
-
 /*****************************************************************************
  * aout_Open: opens a HAL audio device
  *****************************************************************************/
index e1c5feaf6a324af028b4175edf220c2e7f623267..b4367b72c7097147d5734a1effe77c6b50fd583a 100644 (file)
 
 #include <videolan/vlc.h>
 
-#include "interface.h"
-
-/* OS specific */
-#import <Cocoa/Cocoa.h>
-
-
-/*****************************************************************************
- * intf_sys_t: description and status of the interface
- *****************************************************************************/
-typedef struct intf_sys_s
-{
-    NSAutoreleasePool *o_pool ;
-} intf_sys_t;
+#include "macosx.h"
 
+#include "interface.h"
+#include "intf_main.h"
 
 /*****************************************************************************
  * 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 );
@@ -59,24 +48,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 checks the interface can be run and returns a score to the
- * plugin manager so that it can select the best plugin.
- *****************************************************************************/
-static int intf_Probe( probedata_t *p_data )
-{
-    /* Under MacOS X, this plugin always works */
-    return( 100 );
-}
-
 /*****************************************************************************
  * intf_Open: initialize interface
  *****************************************************************************/
diff --git a/plugins/macosx/intf_main.h b/plugins/macosx/intf_main.h
new file mode 100644 (file)
index 0000000..5b272ce
--- /dev/null
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * intf_main.h: MacOS X interface plugin
+ *****************************************************************************
+ * Copyright (C) 2001 VideoLAN
+ *
+ * Authors: Colin Delacroix <colin@zoy.org>
+ *             Florian G. Pflug <fgp@phlo.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+/* OS specific */
+#import <Cocoa/Cocoa.h>
+
+/*****************************************************************************
+ * intf_sys_t: description and status of the interface
+ *****************************************************************************/
+typedef struct intf_sys_s
+{
+    osx_com_t osx_communication ;
+
+    NSAutoreleasePool *o_pool ;
+} intf_sys_t;
+
index 5f4ed434f02d54345c7d2827f06a2bd8ff6dddbf..576c01e20ac8ea0f494cf72a5af84cef236420be 100644 (file)
@@ -2,7 +2,7 @@
  * intf_vlc_wrapper.c : MacOS X plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: intf_vlc_wrapper.c,v 1.6 2001/12/30 07:09:55 sam Exp $
+ * $Id: intf_vlc_wrapper.c,v 1.7 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Florian G. Pflug <fgp@phlo.org>
  *
 
 #include <videolan/vlc.h>
 
+#include "macosx.h"
+
 #include "interface.h"
 #include "intf_playlist.h"
-
-#define OSX_COM_STRUCT vout_sys_s
-#define OSX_COM_TYPE vout_sys_t
-#include "macosx.h"
+#include "intf_main.h"
 
 #include "video.h"
 #include "video_output.h"
 
 #import "intf_vlc_wrapper.h"
 
-#define p_area p_main->p_intf->p_input->stream.p_selected_area
-
-@interface Intf_VlcWrapper(Private) 
-- (struct vout_thread_s*) lockVout ;
-- (void) unlockVout ;
-@end
+#define p_area p_input_bank->pp_input[0]->stream.p_selected_area
 
 @implementation Intf_VlcWrapper
 //Initialization,.....
         bool b_resize=FALSE, b_request=FALSE, b_release=FALSE;
         bool b_fullscreen=FALSE ;
 
+printf("start managing\n");
         p_main->p_intf->pf_manage( p_main->p_intf ) ;
         
-        if ((p_vout = [self lockVout])) {
-            i_width = p_vout->i_width ;
-            i_height = p_vout->i_height ;
+        if ((p_vout = p_main->p_intf->p_sys->osx_communication.p_vout)) {
+printf("doing stuff with vout\n");
+            i_width = p_vout->output.i_width ;
+            i_height = p_vout->output.i_height ;
             b_fullscreen = !!p_vout->b_fullscreen ;
             
             //Also mange the notifications for the output.
             if (p_vout->i_changes & (VOUT_SIZE_CHANGE | VOUT_FULLSCREEN_CHANGE)) b_resize = TRUE ;
-            if (p_vout->p_sys->i_changes & OSX_VOUT_INTF_REQUEST_QDPORT) b_request = TRUE ;
-            if (p_vout->p_sys->i_changes & OSX_VOUT_INTF_RELEASE_QDPORT) b_release = TRUE ;
-            
             p_vout->i_changes &= ~(VOUT_SIZE_CHANGE | VOUT_FULLSCREEN_CHANGE) ;
-            p_vout->p_sys->i_changes &= ~(OSX_VOUT_INTF_REQUEST_QDPORT | OSX_VOUT_INTF_RELEASE_QDPORT) ;
-
-            [self unlockVout] ;
         }
         
         if (b_resize) [o_delegate resizeQDPortFullscreen:b_fullscreen] ;
+
+printf("   testing...\n");
+        if (p_main->p_intf->p_sys->osx_communication.i_changes & OSX_VOUT_INTF_REQUEST_QDPORT) b_request = TRUE ;
+printf("   tested : %s\n", b_request ? "YES !!!" : "nope..." );
+        if (p_main->p_intf->p_sys->osx_communication.i_changes & OSX_VOUT_INTF_RELEASE_QDPORT) b_release = TRUE ;
+            
+        p_main->p_intf->p_sys->osx_communication.i_changes &= ~(OSX_VOUT_INTF_REQUEST_QDPORT | OSX_VOUT_INTF_RELEASE_QDPORT) ;
+
         if (b_release) [o_delegate releaseQDPort] ;
         if (b_request) [o_delegate requestQDPortFullscreen:b_fullscreen] ;
 
+printf("end managing\n\n");
         return p_main->p_intf->b_die ;
     }
 
 
 //Function for the GUI. 
     - (void) setQDPort:(CGrafPtr)p_qdport {
-        vout_thread_t *p_vout;
         
-        if ((p_vout = [self lockVout])) {
-            p_vout->p_sys->p_qdport = p_qdport ;
-            p_vout->p_sys->i_changes |= OSX_INTF_VOUT_QDPORT_CHANGE ;
-            [self unlockVout] ;
-        }
+printf("setQDPort !!\n");
+        p_main->p_intf->p_sys->osx_communication.p_qdport = p_qdport ;
+        p_main->p_intf->p_sys->osx_communication.i_changes |= OSX_INTF_VOUT_QDPORT_CHANGE ;
     }
     
     - (void) sizeChangeQDPort {
-        vout_thread_t *p_vout;
         
-        if ((p_vout = [self lockVout])) {
-            p_vout->p_sys->i_changes |= OSX_INTF_VOUT_SIZE_CHANGE ;
-            [self unlockVout] ;
-        }
+printf("sizeChangeQDPort !!\n");
+        p_main->p_intf->p_sys->osx_communication.i_changes |= OSX_INTF_VOUT_SIZE_CHANGE ;
     }    
 
     - (NSSize) videoSize {
     - (NSString *) getTimeAsString {
         static char psz_currenttime[ OFFSETTOTIME_MAX_SIZE ] ;
         
-        if (!p_main->p_intf->p_input) return [NSString stringWithCString:"00:00:00"] ;
+        if (!p_input_bank->pp_input[0]) return [NSString stringWithCString:"00:00:00"] ;
         
-        input_OffsetToTime( p_main->p_intf->p_input, psz_currenttime, p_area->i_tell ) ;        
+        input_OffsetToTime( p_input_bank->pp_input[0], psz_currenttime, p_area->i_tell ) ;        
         return [NSString stringWithCString:psz_currenttime] ;
     }
     
     - (float) getTimeAsFloat {
-        if (!p_main->p_intf->p_input) return 0.0 ;
+        if (!p_input_bank->pp_input[0]) return 0.0 ;
     
         return (float)p_area->i_tell / (float)p_area->i_size ;
     }
 
     - (void) setTimeAsFloat:(float) f_position {
-        if (!p_main->p_intf->p_input) return ;
+        if (!p_input_bank->pp_input[0]) return ;
     
-        input_Seek(p_main->p_intf->p_input, p_area->i_size * f_position) ;
+        input_Seek(p_input_bank->pp_input[0], p_area->i_size * f_position) ;
     }
     
     
     }
     
     - (bool) playlistPlayCurrent {
-        if (p_main->p_intf->p_input) {
+        if (p_input_bank->pp_input[0]) {
             switch (e_speed)
             {
                 case SPEED_SLOW:
-                    input_SetStatus(p_main->p_intf->p_input, INPUT_STATUS_SLOWER) ;
+                    input_SetStatus(p_input_bank->pp_input[0], INPUT_STATUS_SLOWER) ;
                     break ;
                 case SPEED_NORMAL:
-                    input_SetStatus(p_main->p_intf->p_input, INPUT_STATUS_PLAY) ;
+                    input_SetStatus(p_input_bank->pp_input[0], INPUT_STATUS_PLAY) ;
                     break ;
                 case SPEED_FAST:
-                    input_SetStatus(p_main->p_intf->p_input, INPUT_STATUS_FASTER) ;
+                    input_SetStatus(p_input_bank->pp_input[0], INPUT_STATUS_FASTER) ;
                     break ;
             }
             p_main->p_playlist->b_stopped = 0 ;
     }
 
     - (void) playlistPause {
-        if (p_main->p_intf->p_input)
-            input_SetStatus(p_main->p_intf->p_input, INPUT_STATUS_PAUSE) ;
+        if (p_input_bank->pp_input[0])
+            input_SetStatus(p_input_bank->pp_input[0], INPUT_STATUS_PAUSE) ;
     }
     
     - (void) playlistStop {
-        if (p_main->p_intf->p_input) p_main->p_intf->p_input->b_eof = 1 ;
+        if (p_input_bank->pp_input[0]) p_input_bank->pp_input[0]->b_eof = 1 ;
         vlc_mutex_lock(&p_main->p_playlist->change_lock) ;
             p_main->p_playlist->i_index-- ;
             p_main->p_playlist->b_stopped = 1 ;
                 intf_PlaylistDelete(p_main->p_playlist, i) ;
         vlc_mutex_unlock(&p_main->p_playlist->change_lock) ;        
     }
-    
-
-
-
-// Private Functions. This are just some utilities for other functions
-    - (struct vout_thread_s*) lockVout {
-        vlc_mutex_lock(&p_vout_bank->lock) ;
-        if (p_vout_bank->i_count) {
-            vlc_mutex_lock(&p_vout_bank->pp_vout[0]->change_lock) ;
-            return p_vout_bank->pp_vout[0] ;
-        }
-        else
-        {
-            vlc_mutex_unlock(&p_vout_bank->lock) ;
-            return NULL ;
-        }
-    }
-    
-    - (void) unlockVout {
-        vlc_mutex_unlock(&p_vout_bank->pp_vout[0]->change_lock) ;
-        vlc_mutex_unlock(&p_vout_bank->lock) ;
-    }
 @end
index ca0d9784316f65d1ebbf49286fcdbdf21155fa44..24d2a677530ead78a4074d83ecd60e0652d7d53a 100644 (file)
@@ -2,7 +2,7 @@
  * macosx.h : MacOS X plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: macosx.h,v 1.3 2001/11/29 10:20:56 massiot Exp $
+ * $Id: macosx.h,v 1.4 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Florian G. Pflug <fgp@phlo.org>
  *
 #define OSX_VOUT_INTF_REQUEST_QDPORT   0x0004
 #define OSX_VOUT_INTF_RELEASE_QDPORT   0x0008
 
-/* This struct is included as the _FIRST_ member in vout_sys_t */
-/* That way the interface can cast the vout_sys_t to osx_com_t */
-/* and doesn't need the definition of vout_sys_t */
+/* This struct is included as the _FIRST_ member in intf_sys_t */
+/* That way the video output can cast the intf_sys_t to osx_com_t */
+/* and doesn't need the definition of intf_sys_t */
 #ifndef OSX_COM_TYPE
     #define OSX_COM_TYPE osx_com_t
     #define OSX_COM_STRUCT osx_com_s
 #endif
 typedef struct OSX_COM_STRUCT {
     unsigned int i_changes ;
-    
     CGrafPtr p_qdport ;
+
+    struct vout_thread_s *p_vout;
 } OSX_COM_TYPE ;
+
index 10ef8e4aba1cd31780b565731c383839e87f780a..752ce4fd9a301ac83cb3ce75c22183a4ebe11400 100644 (file)
@@ -35,6 +35,8 @@
 #include "video.h"
 #include "video_output.h"
 
+#define OSX_COM_STRUCT intf_sys_s
+#define OSX_COM_TYPE intf_sys_t
 #include "macosx.h"
 
 #include <QuickTime/QuickTime.h>
  * This structure is part of the video output thread descriptor.
  * It describes the MacOS X specific properties of an output thread.
  *****************************************************************************/
-typedef unsigned int yuv2_data_t ;
 typedef struct vout_sys_s
 {
-    osx_com_t osx_communication ;
-
+    /* QT sequence information */
     ImageDescriptionHandle h_img_descr ;
     ImageSequence i_seq ;   
     unsigned int c_codec ;
     MatrixRecordPtr p_matrix ;
-    
-    yuv2_data_t *p_yuv2 ;
-    unsigned i_yuv2_size ;
-    PlanarPixmapInfoYUV420 s_ppiy420 ;
+
 } vout_sys_t;
 
+typedef struct picture_sys_s
+{
+    void *p_info;
+    unsigned int i_size;
+
+    /* When using I420 output */
+    PlanarPixmapInfoYUV420 pixmap_i420 ;
+
+} picture_sys_t;
+
+#define MAX_DIRECTBUFFERS 10
 
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-static int  vout_Probe     ( probedata_t *p_data );
-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_Display   ( struct vout_thread_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_Display   ( vout_thread_t *, picture_t * );
+static void vout_Render    ( vout_thread_t *, picture_t * );
 
 /* OS Specific */
-static void fillout_PPIYUV420( picture_t *p_y420, PlanarPixmapInfoYUV420 *p_ppiy420 ) ;
-static void fillout_ImageDescription(ImageDescriptionHandle h_descr, unsigned int i_with, unsigned int i_height, unsigned int c_codec) ;
+static int  CreateQTSequence ( vout_thread_t *p_vout ) ;
+static void DestroyQTSequence( vout_thread_t *p_vout ) ;
+
+static int  NewPicture     ( vout_thread_t *, picture_t * );
+static void FreePicture    ( vout_thread_t *, picture_t * );
+
+static void fillout_ImageDescription(ImageDescriptionHandle h_descr,
+                        unsigned int i_with, unsigned int i_height,
+                        unsigned int c_codec) ;
 static void fillout_ScalingMatrix( vout_thread_t *p_vout ) ;
-static OSErr new_QTSequence(ImageSequence *i_seq, CGrafPtr p_port, ImageDescriptionHandle h_descr, MatrixRecordPtr p_matrix) ;
-static int create_QTSequenceBestCodec( vout_thread_t *p_vout ) ;
-static void dispose_QTSequence( vout_thread_t *p_vout ) ;
-static void convert_Y420_to_YUV2( picture_t *p_y420, yuv2_data_t *p_yuv2 ) ;
 
 /*****************************************************************************
  * Functions exported as capabilities. They are declared as static so that
@@ -87,22 +98,13 @@ static void convert_Y420_to_YUV2( picture_t *p_y420, yuv2_data_t *p_yuv2 ) ;
  *****************************************************************************/
 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;
     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;
-}
-
-/*****************************************************************************
- * intf_Probe: return a score
- *****************************************************************************/
-static int vout_Probe( probedata_t *p_data )
-{
-    return( 100 );
 }
 
 /*****************************************************************************
@@ -118,10 +120,10 @@ static int vout_Create( vout_thread_t *p_vout )
         intf_ErrMsg( "error: %s", strerror( ENOMEM ) );
         return( 1 );
     }
+    p_main->p_intf->p_sys->i_changes = 0;
+    p_main->p_intf->p_sys->p_vout = p_vout;
     p_vout->p_sys->h_img_descr = (ImageDescriptionHandle)NewHandleClear( sizeof( ImageDescription ) ) ;
     p_vout->p_sys->p_matrix = (MatrixRecordPtr)malloc( sizeof( MatrixRecord ) ) ;
-    p_vout->p_sys->c_codec = 'NONE' ;
-
     EnterMovies() ;
 
     return( 0 );
@@ -132,11 +134,63 @@ static int vout_Create( vout_thread_t *p_vout )
  *****************************************************************************/
 static int vout_Init( vout_thread_t *p_vout )
 {
-    p_vout->b_need_render = 0 ;
-    p_vout->i_bytes_per_line = p_vout->i_width ;
-    p_vout->p_sys->c_codec = 'NONE' ;
-    p_vout->p_sys->osx_communication.i_changes |= OSX_VOUT_INTF_REQUEST_QDPORT ;
-    
+    int i_index;
+    picture_t *p_pic;
+
+    I_OUTPUTPICTURES = 0;
+
+    /* Since we can arbitrary scale, stick to the coordinates and aspect. */
+    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;
+
+    CreateQTSequence( p_vout ) ;
+
+    switch( p_vout->p_sys->c_codec )
+    {
+        case 'yuv2':
+            p_vout->output.i_chroma = FOURCC_YUY2;
+            break;
+        case 'y420':
+            p_vout->output.i_chroma = FOURCC_I420;
+            break;
+        case 'NONE':
+            intf_ErrMsg( "vout error: no QT codec found" );
+            return 0;
+        default:
+            intf_ErrMsg( "vout error: unknown QT codec" );
+            return 0;
+    }
+
+    /* Try to initialize up to MAX_DIRECTBUFFERS direct buffers */
+    while( I_OUTPUTPICTURES < MAX_DIRECTBUFFERS )
+    {
+        p_pic = NULL;
+
+        /* Find an empty picture slot */
+        for( i_index = 0 ; i_index < VOUT_MAX_PICTURES ; i_index++ )
+        {
+            if( p_vout->p_picture[ i_index ].i_status == FREE_PICTURE )
+            {
+                p_pic = p_vout->p_picture + i_index;
+                break;
+            }
+        }
+
+        /* Allocate the picture */
+        if( p_pic == NULL || NewPicture( p_vout, p_pic ) )
+        {
+            break;
+        }
+
+        p_pic->i_status = DESTROYED_PICTURE;
+        p_pic->i_type   = DIRECT_PICTURE;
+
+        PP_OUTPUTPICTURE[ I_OUTPUTPICTURES ] = p_pic;
+
+        I_OUTPUTPICTURES++;
+    }
+
     return 0 ;
 }
 
@@ -145,8 +199,18 @@ static int vout_Init( vout_thread_t *p_vout )
  *****************************************************************************/
 static void vout_End( vout_thread_t *p_vout )
 {
-    dispose_QTSequence( p_vout ) ;
-    p_vout->p_sys->osx_communication.i_changes |= OSX_VOUT_INTF_RELEASE_QDPORT ;
+    int i_index;
+
+    DestroyQTSequence( p_vout ) ;
+    p_main->p_intf->p_sys->p_vout = NULL;
+    p_main->p_intf->p_sys->i_changes |= OSX_VOUT_INTF_RELEASE_QDPORT ;
+
+    /* Free the direct buffers we allocated */
+    for( i_index = I_OUTPUTPICTURES ; i_index ; )
+    {
+        i_index--;
+        FreePicture( p_vout, PP_OUTPUTPICTURE[ i_index ] );
+    }
 }
 
 /*****************************************************************************
@@ -167,73 +231,138 @@ static void vout_Destroy( vout_thread_t *p_vout )
  *****************************************************************************/
 static int vout_Manage( vout_thread_t *p_vout )
 {    
-      if ( p_vout->p_sys->osx_communication.i_changes & OSX_INTF_VOUT_QDPORT_CHANGE ) {
-          dispose_QTSequence( p_vout ) ;
-          create_QTSequenceBestCodec( p_vout ) ;
-      }
-      else if ( p_vout->p_sys->osx_communication.i_changes & OSX_INTF_VOUT_SIZE_CHANGE ) {
-          if ( p_vout->p_sys->c_codec != 'NONE' ) {
-              fillout_ScalingMatrix( p_vout ) ;
-              SetDSequenceMatrix( p_vout->p_sys->i_seq, p_vout->p_sys->p_matrix ) ;
-          }
-      }
-
-      p_vout->p_sys->osx_communication.i_changes &= ~( 
-          OSX_INTF_VOUT_QDPORT_CHANGE |
-          OSX_INTF_VOUT_SIZE_CHANGE
-      ) ;
+    if( p_main->p_intf->p_sys->i_changes
+         & OSX_INTF_VOUT_QDPORT_CHANGE )
+    {
+        intf_ErrMsg( "vout error: this change is unhandled yet !" );
+        return 1;
+    }
+    else if( p_main->p_intf->p_sys->i_changes
+              & OSX_INTF_VOUT_SIZE_CHANGE )
+    {
+        if( p_vout->p_sys->c_codec != 'NONE' )
+        {
+            fillout_ScalingMatrix( p_vout ) ;
+            SetDSequenceMatrix( p_vout->p_sys->i_seq,
+                                p_vout->p_sys->p_matrix ) ;
+        }
+    }
+
+    /* Clear flags */
+    p_main->p_intf->p_sys->i_changes &= ~( 
+        OSX_INTF_VOUT_QDPORT_CHANGE |
+        OSX_INTF_VOUT_SIZE_CHANGE
+    ) ;
 
     return 0 ;
 }
 
 
 /*****************************************************************************
- * vout_OSX_Display: displays previously rendered output
+ * vout_Render: renders previously calculated output
+ *****************************************************************************/
+void vout_Render( vout_thread_t *p_vout, picture_t *p_pic )
+{
+    ;
+}
+
+ /*****************************************************************************
+ * vout_Display: displays previously rendered output
  *****************************************************************************
  * This function send the currently rendered image to image, waits until
  * it is displayed and switch the two rendering buffers, preparing next frame.
  *****************************************************************************/
-void vout_Display( vout_thread_t *p_vout )
+void vout_Display( vout_thread_t *p_vout, picture_t *p_pic )
 {
     CodecFlags out_flags ;
 
     switch (p_vout->p_sys->c_codec)
     {
         case 'yuv2':
-            convert_Y420_to_YUV2(p_vout->p_rendered_pic, p_vout->p_sys->p_yuv2) ;
-            DecompressSequenceFrameS(
-               p_vout->p_sys->i_seq,
-               (void *)p_vout->p_sys->p_yuv2,
-               p_vout->p_sys->i_yuv2_size,
-               codecFlagUseScreenBuffer,
-               &out_flags,
-               nil
-            ) ;
-            break ;
         case 'y420':
-            fillout_PPIYUV420(p_vout->p_rendered_pic, &p_vout->p_sys->s_ppiy420) ;
             DecompressSequenceFrameS(
                p_vout->p_sys->i_seq,
-               (void *)&p_vout->p_sys->s_ppiy420,
-               sizeof(PlanarPixmapInfoYUV420),
+               p_pic->p_sys->p_info,
+               p_pic->p_sys->i_size,
                codecFlagUseScreenBuffer,
                &out_flags,
                nil
-            ) ;            
+            ) ;
             break ;
-       default:
-           intf_WarnMsg( 1, "vout_macosx: vout_Display called, but no codec available" ) ;
+        default:
+            intf_WarnMsg( 1, "vout_macosx: vout_Display called, but no codec available" ) ;
+            break;
+    }
+}
+
+static int CreateQTSequence( vout_thread_t *p_vout )
+{
+    p_vout->p_sys->c_codec = 'NONE' ;
+    p_main->p_intf->p_sys->i_changes |= OSX_VOUT_INTF_REQUEST_QDPORT ;
+    
+    while ( p_main->p_intf->p_sys->p_qdport == nil
+             && !p_vout->b_die )
+    {
+printf("WAITING for QD port ...\n");
+        if( p_main->p_intf->p_sys->i_changes
+             & OSX_INTF_VOUT_QDPORT_CHANGE )
+        {
+            p_main->p_intf->p_sys->i_changes &= ~( OSX_INTF_VOUT_QDPORT_CHANGE ) ;
+            intf_ErrMsg( "got a QDPORT_CHANGE" );
+            break;
+        }
+        msleep( 300000 );
     }
+
+    if ( p_main->p_intf->p_sys->p_qdport == nil)
+    {
+printf("BLAAAAAAAAAAH\n");
+        p_vout->p_sys->c_codec = 'NONE' ;
+        return 1 ;
+    }
+
+    SetPort( p_main->p_intf->p_sys->p_qdport ) ;
+    fillout_ScalingMatrix( p_vout ) ;
+
+    fillout_ImageDescription( p_vout->p_sys->h_img_descr,
+                              p_vout->output.i_width, p_vout->output.i_height,
+                              'y420' ) ;
+
+    if( !DecompressSequenceBeginS( &p_vout->p_sys->i_seq,
+            p_vout->p_sys->h_img_descr, NULL, 0,
+            p_main->p_intf->p_sys->p_qdport,
+            NULL, //device to display (is set implicit via the qdPort)
+            NULL, //src-rect
+            p_vout->p_sys->p_matrix, //matrix
+            0, //just do plain copying
+            NULL, //no mask region
+            codecFlagUseScreenBuffer, codecLosslessQuality,
+            (DecompressorComponent) bestSpeedCodec) )
+    {
+printf("OK !!!\n");
+        p_vout->p_sys->c_codec = 'y420' ;
+        return 0 ;
+    }
+
+#if 0
+    /* For yuv2 */
+    {
+        p_vout->p_sys->c_codec = 'yuv2' ;
+    }
+#endif
+   
+printf("FUXK..\n");
+    p_vout->p_sys->c_codec = 'NONE' ;
+    return 1 ;
 }
 
-static void fillout_PPIYUV420( picture_t *p_y420, PlanarPixmapInfoYUV420 *p_ppiy420 )
+static void DestroyQTSequence( vout_thread_t *p_vout )
 {
-    p_ppiy420->componentInfoY.offset = (void *)p_y420->p_y - (void *)p_ppiy420 ;
-    p_ppiy420->componentInfoY.rowBytes = p_y420->i_width ;
-    p_ppiy420->componentInfoCb.offset = (void *)p_y420->p_u - (void *)p_ppiy420 ;
-    p_ppiy420->componentInfoCb.rowBytes = p_y420->i_width / 2;
-    p_ppiy420->componentInfoCr.offset = (void *)p_y420->p_v - (void *)p_ppiy420 ;
-    p_ppiy420->componentInfoCr.rowBytes = p_y420->i_width / 2;
+    if (p_vout->p_sys->c_codec == 'NONE')
+       return ;
+       
+    CDSequenceEnd( p_vout->p_sys->i_seq ) ;
+    p_vout->p_sys->c_codec = 'NONE' ;
 }
 
 
@@ -266,7 +395,7 @@ static void fillout_ImageDescription(ImageDescriptionHandle h_descr, unsigned in
             p_descr->depth = 24 ;
             break ;
         case 'y420':
-            p_descr->dataSize=i_width * i_height * 1.5 ;
+            p_descr->dataSize=i_width * i_height * 3 / 2 ;
             p_descr->depth = 12 ;
             break ;
     }
@@ -280,98 +409,115 @@ static void fillout_ScalingMatrix( vout_thread_t *p_vout)
        Fixed factor_x ;
        Fixed factor_y ;
                
-       GetPortBounds( p_vout->p_sys->osx_communication.p_qdport, &s_rect ) ;
+       GetPortBounds( p_main->p_intf->p_sys->p_qdport, &s_rect ) ;
 //     if (((s_rect.right - s_rect.left) / ((float) p_vout->i_width)) < ((s_rect.bottom - s_rect.top) / ((float) p_vout->i_height)))
-               factor_x = FixDiv(Long2Fix(s_rect.right - s_rect.left), Long2Fix(p_vout->i_width)) ;
+               factor_x = FixDiv(Long2Fix(s_rect.right - s_rect.left), Long2Fix(p_vout->output.i_width)) ;
 //     else
-               factor_y = FixDiv(Long2Fix(s_rect.bottom - s_rect.top), Long2Fix(p_vout->i_height)) ;
+               factor_y = FixDiv(Long2Fix(s_rect.bottom - s_rect.top), Long2Fix(p_vout->output.i_height)) ;
        
        SetIdentityMatrix(p_vout->p_sys->p_matrix) ;
        ScaleMatrix( p_vout->p_sys->p_matrix, factor_x, factor_y, Long2Fix(0), Long2Fix(0) ) ;
 }
 
-static OSErr new_QTSequence( ImageSequence *i_seq, CGrafPtr p_qdport, ImageDescriptionHandle h_descr, MatrixRecordPtr p_matrix )
+/*****************************************************************************
+ * NewPicture: allocate a picture
+ *****************************************************************************
+ * Returns 0 on success, -1 otherwise
+ *****************************************************************************/
+static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
 {
-    return DecompressSequenceBeginS(
-        i_seq, 
-        h_descr,
-        NULL,
-        0,
-        p_qdport,
-        NULL, //device to display (is set implicit via the qdPort)
-        NULL, //src-rect
-        p_matrix, //matrix
-        0, //just do plain copying
-        NULL, //no mask region
-        codecFlagUseScreenBuffer,
-        codecLosslessQuality,
-        (DecompressorComponent) bestSpeedCodec
-    ) ;
-}
+    /* We know the chroma, allocate a buffer which will be used
+     * directly by the decoder */
+    p_pic->p_sys = malloc( sizeof( picture_sys_t ) );
 
-static int create_QTSequenceBestCodec( vout_thread_t *p_vout )
-{
-    if ( p_vout->p_sys->osx_communication.p_qdport == nil)
+    if( p_pic->p_sys == NULL )
     {
-        p_vout->p_sys->c_codec = 'NONE' ;
-        return 1 ;
+        return -1;
     }
 
-    SetPort( p_vout->p_sys->osx_communication.p_qdport ) ;
-    fillout_ScalingMatrix( p_vout ) ;
-    fillout_ImageDescription(
-        p_vout->p_sys->h_img_descr,
-        p_vout->i_width,
-        p_vout->i_height,
-        'y420'
-    ) ;
-    if ( !new_QTSequence(
-            &p_vout->p_sys->i_seq,
-            p_vout->p_sys->osx_communication.p_qdport,
-            p_vout->p_sys->h_img_descr,
-            p_vout->p_sys->p_matrix
-        ) )
+    switch( p_vout->output.i_chroma )
     {
-        p_vout->p_sys->c_codec = 'y420' ;
-        return 0 ;
+        case FOURCC_I420:
+
+            p_pic->p_sys->p_info = (void *)&p_pic->p_sys->pixmap_i420 ;
+            p_pic->p_sys->i_size = sizeof(PlanarPixmapInfoYUV420) ;
+
+            p_pic->Y_PIXELS = memalign( 16, p_vout->output.i_width
+                                           * p_vout->output.i_height * 3 / 2 );
+            p_pic->p[Y_PLANE].i_lines = p_vout->output.i_height;
+            p_pic->p[Y_PLANE].i_pitch = p_vout->output.i_width;
+            p_pic->p[Y_PLANE].i_pixel_bytes = 1;
+            p_pic->p[Y_PLANE].b_margin = 0;
+
+            p_pic->U_PIXELS = p_pic->Y_PIXELS + p_vout->output.i_width
+                                                 * p_vout->output.i_height;
+            p_pic->p[U_PLANE].i_lines = p_vout->output.i_height / 2;
+            p_pic->p[U_PLANE].i_pitch = p_vout->output.i_width / 2;
+            p_pic->p[U_PLANE].i_pixel_bytes = 1;
+            p_pic->p[U_PLANE].b_margin = 0;
+
+            p_pic->V_PIXELS = p_pic->U_PIXELS + p_vout->output.i_width
+                                                 * p_vout->output.i_height / 4;
+            p_pic->p[V_PLANE].i_lines = p_vout->output.i_height / 2;
+            p_pic->p[V_PLANE].i_pitch = p_vout->output.i_width / 2;
+            p_pic->p[V_PLANE].i_pixel_bytes = 1;
+            p_pic->p[V_PLANE].b_margin = 0;
+
+            p_pic->i_planes = 3;
+
+#define P p_pic->p_sys->pixmap_i420
+            P.componentInfoY.offset = (void *)p_pic->Y_PIXELS
+                                       - p_pic->p_sys->p_info;
+            P.componentInfoCb.offset = (void *)p_pic->U_PIXELS
+                                        - p_pic->p_sys->p_info;
+            P.componentInfoCr.offset = (void *)p_pic->V_PIXELS
+                                        - p_pic->p_sys->p_info;
+
+            P.componentInfoY.rowBytes = p_vout->output.i_width ;
+            P.componentInfoCb.rowBytes = p_vout->output.i_width / 2 ;
+            P.componentInfoCr.rowBytes = p_vout->output.i_width / 2 ;
+#undef P
+
+            break;
+
+        case FOURCC_YUY2:
+
+            /* XXX: TODO */
+            free( p_pic->p_sys );
+            intf_ErrMsg( "vout error: YUV2 not supported yet" );
+            p_pic->i_planes = 0;
+            break;
+
+        default:
+            /* Unknown chroma, tell the guy to get lost */
+            free( p_pic->p_sys );
+            intf_ErrMsg( "vout error: never heard of chroma 0x%.8x (%4.4s)",
+                         p_vout->output.i_chroma,
+                         (char*)&p_vout->output.i_chroma );
+            p_pic->i_planes = 0;
+            return -1;
     }
-   
-    p_vout->p_sys->c_codec = 'NONE' ;
-    return 1 ;
+
+    return 0;
 }
 
-static void dispose_QTSequence( vout_thread_t *p_vout )
+/*****************************************************************************
+ * FreePicture: destroy a picture allocated with NewPicture
+ *****************************************************************************/
+static void FreePicture( vout_thread_t *p_vout, picture_t *p_pic )
 {
-    if (p_vout->p_sys->c_codec == 'NONE')
-       return ;
-       
-    CDSequenceEnd( p_vout->p_sys->i_seq ) ;
     switch (p_vout->p_sys->c_codec)
     {
         case 'yuv2':
-            free( (void *)p_vout->p_sys->p_yuv2 ) ;
-            p_vout->p_sys->i_yuv2_size = 0 ;
+            free( p_pic->p_sys->p_info ) ;
+            p_pic->p_sys->i_size = 0 ;
+            break ;
+        case 'y420':
             break ;
         default:
            break ;            
     }
-    p_vout->p_sys->c_codec = 'NONE' ;
-}
 
-static void convert_Y420_to_YUV2( picture_t *p_y420, yuv2_data_t *p_yuv2 )
-{
-    unsigned int width = p_y420->i_width, height = p_y420->i_height ;
-    unsigned int x, y ;
-    
-    for( x=0; x < height; x++ )
-    {
-        for( y=0; y < (width/2); y++ )
-        {
-            p_yuv2[(width/2)*x + y] =
-                (p_y420->p_y[width*x + 2*y]) << 24 |
-                ((p_y420->p_u[(width/2)*(x/2) + y] ^ 0x80) << 16) |
-                (p_y420->p_y[width*x + 2*y + 1] << 8) |
-                (p_y420->p_v[(width/2)*(x/2) + y] ^ 0x80) ;   
-        }
-    }
+    free( p_pic->p_sys );
 }
+
index d4c659db9192cdb7bc0197a174113a876595370b..413806ca2123c82fa1fcc567d1d4bdc6c12311c1 100644 (file)
@@ -45,7 +45,7 @@
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-static int  decoder_Probe  ( probedata_t * );
+static int  decoder_Probe  ( u8 * );
 static int  decoder_Run    ( decoder_config_t * );
 static int  InitThread     ( mad_adec_thread_t * p_mad_adec );
 static void EndThread      ( mad_adec_thread_t * p_mad_adec );
@@ -55,8 +55,8 @@ static void EndThread      ( mad_adec_thread_t * p_mad_adec );
  *****************************************************************************/
 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;
 }
 
 /*****************************************************************************
@@ -84,16 +84,14 @@ 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 )
 {
-    if( p_data->i_type == MPEG1_AUDIO_ES || p_data->i_type == MPEG2_AUDIO_ES )
+    if( *pi_type == MPEG1_AUDIO_ES || *pi_type == MPEG2_AUDIO_ES )
     {
-        return( 50 );
-    }
-    else
-    {
-        return( 0 );
+        return 0;
     }
+
+    return -1;
 }
 
 /*****************************************************************************
index d573327bde14cbe5d6e9aafe741563b9b24dd652..ff1ae1f49a87cc78a45b4e3ebb7872088165256c 100644 (file)
@@ -2,7 +2,7 @@
  * memcpy.c : classic memcpy module
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: memcpy.c,v 1.4 2002/01/04 14:01:34 sam Exp $
+ * $Id: memcpy.c,v 1.5 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -50,7 +50,6 @@
  * Local and extern prototypes.
  *****************************************************************************/
 static void memcpy_getfunctions( function_list_t * p_function_list );
-static int  memcpy_Probe       ( probedata_t *p_data );
 #ifndef MODULE_NAME_IS_memcpy
 void *      _M( fast_memcpy )  ( void * to, const void * from, size_t len );
 #endif
@@ -106,19 +105,10 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static void memcpy_getfunctions( function_list_t * p_function_list )
 {
-    p_function_list->pf_probe = memcpy_Probe;
 #ifdef MODULE_NAME_IS_memcpy
-    p_function_list->functions.memcpy.fast_memcpy = memcpy;
+    p_function_list->functions.memcpy.pf_memcpy = memcpy;
 #else
-    p_function_list->functions.memcpy.fast_memcpy = _M( fast_memcpy );
+    p_function_list->functions.memcpy.pf_memcpy = _M( fast_memcpy );
 #endif
 }
 
-/*****************************************************************************
- * memcpy_Probe: returns a preference score
- *****************************************************************************/
-static int memcpy_Probe( probedata_t *p_data )
-{
-    return( 1 );
-}
-
index ac5d78b2f383b36caca88ecae8d5e78216d13e83..64c9dcdf49ac3a2987f59c5ea414650813da8c84 100644 (file)
@@ -2,7 +2,7 @@
  * mga.c : Matrox Graphic Array plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: mga.c,v 1.15 2002/01/07 02:12:29 sam Exp $
+ * $Id: mga.c,v 1.16 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *          Samuel Hocevar <sam@zoy.org>
@@ -47,7 +47,6 @@
  *****************************************************************************/
 static void vout_getfunctions( function_list_t * p_function_list );
 
-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 * );
@@ -146,7 +145,6 @@ typedef struct picture_sys_s
  *****************************************************************************/
 static void 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;
@@ -156,24 +154,6 @@ static void vout_getfunctions( function_list_t * p_function_list )
     p_function_list->functions.vout.pf_display    = vout_Display;
 }
 
-/*****************************************************************************
- * intf_Probe: return a score
- *****************************************************************************/
-static int vout_Probe( probedata_t *p_data )
-{
-    int i_fd;
-
-    i_fd = open( "/dev/mga_vid", O_RDWR );
-    if( i_fd == -1 )
-    {
-        return 0;
-    }
-
-    close( i_fd );
-
-    return 10;
-}
-
 /*****************************************************************************
  * vout_Create: allocates dummy video thread output method
  *****************************************************************************
index ac96293395052c556311bb82189a72a0ecc28ed6..ba151102d06dde0b77892d0c020662006c95a5a1 100644 (file)
@@ -2,7 +2,7 @@
  * xmga.c : X11 MGA plugin for vlc
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: xmga.c,v 1.3 2002/01/13 15:07:55 gbazin Exp $
+ * $Id: xmga.c,v 1.4 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -65,7 +65,6 @@
  *****************************************************************************/
 static void vout_getfunctions( function_list_t * );
 
-static int  vout_Probe     ( probedata_t * );
 static int  vout_Create    ( vout_thread_t * );
 static void vout_Destroy   ( vout_thread_t * );
 static void vout_Render    ( vout_thread_t *, picture_t * );
@@ -240,7 +239,6 @@ static __inline__ void vout_Seek( off_t i_seek )
  *****************************************************************************/
 static void 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;
@@ -250,62 +248,6 @@ static void vout_getfunctions( function_list_t * p_function_list )
     p_function_list->functions.vout.pf_display    = vout_Display;
 }
 
-/*****************************************************************************
- * 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 )
-{
-    Display *p_display;                                   /* display pointer */
-    char    *psz_display;
-#ifdef MODULE_NAME_IS_xvideo
-    int      i_xvport, i_dummy;
-#endif
-
-    /* Open display, unsing 'vlc_display' or DISPLAY environment variable */
-    psz_display = XDisplayName( main_GetPszVariable(VOUT_DISPLAY_VAR, NULL) );
-    p_display = XOpenDisplay( psz_display );
-    if( p_display == NULL )                                         /* error */
-    {
-        intf_WarnMsg( 3, "vout: cannot open display %s", psz_display );
-        return( 0 );
-    }
-
-#ifdef MODULE_NAME_IS_xvideo
-    /* Check that there is an available XVideo port for this format */
-    i_xvport = XVideoGetPort( p_display, p_data->vout.i_chroma, &i_dummy );
-    if( i_xvport < 0 )
-    {
-        /* It failed, but it's not completely lost ! We try to open an
-         * XVideo port for a YUY2 picture */
-        i_xvport = XVideoGetPort( p_display, FOURCC_YUY2, &i_dummy );
-        if( i_xvport < 0 )
-        {
-            /* It failed, but it's not completely lost ! We try to open an
-             * XVideo port for a simple 16bpp RGB picture */
-            i_xvport = XVideoGetPort( p_display, FOURCC_RV16, &i_dummy );
-            if( i_xvport < 0 )
-            {
-                XCloseDisplay( p_display );
-                return( 0 );
-            }
-        }
-    }
-    XVideoReleasePort( p_display, i_xvport );
-#endif
-
-    /* Clean-up everyting */
-    XCloseDisplay( p_display );
-
-#ifdef MODULE_NAME_IS_xvideo 
-    return( 150 );
-#else
-    return( 50 );
-#endif
-}
-
 /*****************************************************************************
  * vout_Create: allocate X11 video thread output method
  *****************************************************************************
index d4ab84a7ad396045e1c206ecf8fb544264596161..0a79c340e2ac10ff43f7a1b4b6536b5a333d82ed 100644 (file)
@@ -2,7 +2,7 @@
  * motion.c : C motion compensation module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: motion.c,v 1.13 2001/12/30 07:09:55 sam Exp $
+ * $Id: motion.c,v 1.14 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *          Michel Lespinasse <walken@zoy.org>
@@ -55,14 +55,6 @@ MODULE_ACTIVATE_STOP
 MODULE_DEACTIVATE_START
 MODULE_DEACTIVATE_STOP
 
-/*****************************************************************************
- * motion_Probe: tests probe the CPU and return a score
- *****************************************************************************/
-static int motion_Probe( probedata_t *p_data )
-{
-    return( 50 );
-}
-
 /*****************************************************************************
  * Simple motion compensation in C
  *****************************************************************************/
@@ -166,8 +158,6 @@ static void motion_getfunctions( function_list_t * p_function_list )
         }
     };
 
-    p_function_list->pf_probe = motion_Probe;
-
 #define list p_function_list->functions.motion
     memcpy( list.ppppf_motion, ppppf_motion, sizeof( void * ) * 16 );
 #undef list
index 7ee77c6836c38c87a240766fa0dd9e6584a2d2ad..5bb68a5531f53ee91fd297fbf44c1a8f35619fc0 100644 (file)
@@ -2,7 +2,7 @@
  * motion3dnow.c : 3DNow! motion compensation module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: motion3dnow.c,v 1.6 2001/12/30 07:09:55 sam Exp $
+ * $Id: motion3dnow.c,v 1.7 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *          Michel Lespinasse <walken@zoy.org>
@@ -59,14 +59,6 @@ MODULE_ACTIVATE_STOP
 MODULE_DEACTIVATE_START
 MODULE_DEACTIVATE_STOP
 
-/*****************************************************************************
- * motion_Probe: tests probe the CPU and return a score
- *****************************************************************************/
-static int motion_Probe( probedata_t *p_data )
-{
-    return( 250 );
-}
-
 /*****************************************************************************
  * Motion compensation in 3DNow (OK I know this does MMXEXT too and it's ugly)
  *****************************************************************************/
@@ -597,8 +589,6 @@ static void motion_getfunctions( function_list_t * p_function_list )
         }
     };
 
-    p_function_list->pf_probe = motion_Probe;
-
 #define list p_function_list->functions.motion
     memcpy( list.ppppf_motion, ppppf_motion, sizeof( void * ) * 16 );
 #undef list
index 688dc4374bcc94abeb1d503895ac8db659cd1fef..a3176ee68226439071bf871d8193e1f0eaecc4f0 100644 (file)
@@ -2,7 +2,7 @@
  * motionaltivec.c : Altivec motion compensation module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: motionaltivec.c,v 1.9 2001/12/30 07:09:55 sam Exp $
+ * $Id: motionaltivec.c,v 1.10 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Michel Lespinasse <walken@zoy.org>
  *          Paul Mackerras <paulus@linuxcare.com.au>
@@ -59,14 +59,6 @@ MODULE_ACTIVATE_STOP
 MODULE_DEACTIVATE_START
 MODULE_DEACTIVATE_STOP
 
-/*****************************************************************************
- * motion_Probe: tests probe the CPU and return a score
- *****************************************************************************/
-static int motion_Probe( probedata_t *p_data )
-{
-    return( 150 );
-}
-
 /*****************************************************************************
  * Motion compensation in Altivec
  *****************************************************************************/
@@ -2096,8 +2088,6 @@ static void motion_getfunctions( function_list_t * p_function_list )
         }
     };
 
-    p_function_list->pf_probe = motion_Probe;
-
 #define list p_function_list->functions.motion
     memcpy( list.ppppf_motion, ppppf_motion, sizeof( void * ) * 16 );
 #undef list
index 5a02d701ffb09a0d52151c77569073acdd57be3e..eb1474650879a8c18f1785d04de731858e60c336 100644 (file)
@@ -2,7 +2,7 @@
  * motionmmx.c : MMX motion compensation module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: motionmmx.c,v 1.14 2001/12/30 07:09:55 sam Exp $
+ * $Id: motionmmx.c,v 1.15 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *          Michel Lespinasse <walken@zoy.org>
@@ -58,14 +58,6 @@ MODULE_ACTIVATE_STOP
 MODULE_DEACTIVATE_START
 MODULE_DEACTIVATE_STOP
 
-/*****************************************************************************
- * motion_Probe: tests probe the CPU and return a score
- *****************************************************************************/
-static int motion_Probe( probedata_t *p_data )
-{
-    return( 150 );
-}
-
 /*****************************************************************************
  * Motion compensation in MMX
  *****************************************************************************/
@@ -580,8 +572,6 @@ static void motion_getfunctions( function_list_t * p_function_list )
         }
     };
 
-    p_function_list->pf_probe = motion_Probe;
-
 #define list p_function_list->functions.motion
     memcpy( list.ppppf_motion, ppppf_motion, sizeof( void * ) * 16 );
 #undef list
index 962ec2c12a4f49fb374445a457f08a92ee3c9bfd..fde439825b9b7a3942ba48e39a9feb06bf0ffba1 100644 (file)
@@ -2,7 +2,7 @@
  * motionmmxext.c : MMX EXT motion compensation module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: motionmmxext.c,v 1.15 2001/12/30 07:09:55 sam Exp $
+ * $Id: motionmmxext.c,v 1.16 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *          Michel Lespinasse <walken@zoy.org>
@@ -58,14 +58,6 @@ MODULE_ACTIVATE_STOP
 MODULE_DEACTIVATE_START
 MODULE_DEACTIVATE_STOP
 
-/*****************************************************************************
- * motion_Probe: tests probe the CPU and return a score
- *****************************************************************************/
-static int motion_Probe( probedata_t *p_data )
-{
-    return( 200 );
-}
-
 /*****************************************************************************
  * Motion compensation in MMXEXT (OK I know this does 3DNow too and it's ugly)
  *****************************************************************************/
@@ -572,8 +564,6 @@ static void motion_getfunctions( function_list_t * p_function_list )
         }
     };
 
-    p_function_list->pf_probe = motion_Probe;
-
 #define list p_function_list->functions.motion
     memcpy( list.ppppf_motion, ppppf_motion, sizeof( void * ) * 16 );
 #undef list
index 8764c9ba699bf8588406b338e2492812b38b086d..e42a42beb4f155514da5d93bbcdbff04ca7d2072 100644 (file)
@@ -2,7 +2,7 @@
  * mpeg_adec.c: MPEG audio decoder thread
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: mpeg_adec.c,v 1.17 2002/01/23 12:02:12 asmax Exp $
+ * $Id: mpeg_adec.c,v 1.18 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Michel Lespinasse <walken@via.ecp.fr>
@@ -45,7 +45,7 @@
 /*****************************************************************************
  * Local Prototypes
  *****************************************************************************/
-static int   decoder_Probe ( probedata_t * );
+static int   decoder_Probe ( u8 * );
 static int   decoder_Run   ( decoder_config_t * );
 static void  EndThread     ( adec_thread_t * );
 static void  DecodeThread  ( adec_thread_t * );
@@ -55,8 +55,8 @@ static void  DecodeThread  ( adec_thread_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;
 }
 
 /*****************************************************************************
@@ -82,10 +82,10 @@ MODULE_DEACTIVATE_STOP
 /*****************************************************************************
  * decoder_Probe: probe the decoder and return score
  *****************************************************************************/
-static int decoder_Probe( probedata_t *p_data )
+static int decoder_Probe( u8 *pi_type )
 {
-    return( ( p_data->i_type == MPEG1_AUDIO_ES
-               || p_data->i_type == MPEG2_AUDIO_ES ) ? 100 : 0 );
+    return( ( *pi_type == MPEG1_AUDIO_ES
+               || *pi_type == MPEG2_AUDIO_ES ) ? 0 : -1 );
 }
 
 /*****************************************************************************
index b43964c0cb2a4dd1417bc1d8abcbf0de3b135251..c28f59c3c55b6a6029b79612d7354ccfa5121b64 100644 (file)
@@ -2,7 +2,7 @@
  * input_es.c: Elementary Stream demux and packet management
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: input_es.c,v 1.12 2002/01/21 23:57:46 massiot Exp $
+ * $Id: input_es.c,v 1.13 2002/02/15 13:32:53 sam Exp $
  *
  * Author: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -61,7 +61,7 @@
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-static int  ESProbe     ( probedata_t * );
+static int  ESProbe     ( struct input_thread_s * );
 static int  ESRead      ( struct input_thread_s *, data_packet_t ** );
 static void ESInit          ( struct input_thread_s * );
 static void ESEnd           ( struct input_thread_s * );
@@ -91,7 +91,7 @@ DECLARE_BUFFERS_TOIO( FLAGS, ES_PACKET_SIZE );
 void _M( input_getfunctions )( function_list_t * p_function_list )
 {
 #define input p_function_list->functions.input
-    p_function_list->pf_probe = ESProbe;
+    input.pf_probe            = ESProbe;
     input.pf_init             = ESInit;
     input.pf_open             = NULL;
     input.pf_close            = NULL;
@@ -116,11 +116,9 @@ void _M( input_getfunctions )( function_list_t * p_function_list )
 /*****************************************************************************
  * ESProbe: verifies that the stream is a ES stream
  *****************************************************************************/
-static int ESProbe( probedata_t *p_data )
+static int ESProbe( input_thread_t *p_input )
 {
-    int i_score = 5;
-
-    return( i_score );
+    return 0;
 }
 
 /*****************************************************************************
index 757485733bab45d76d55e1fdba398fcb40f61be3..bbded57610fb8c57b4d4cc6fa6f9300218c905d6 100644 (file)
@@ -2,7 +2,7 @@
  * input_ps.c: PS demux and packet management
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: input_ps.c,v 1.11 2001/12/30 07:09:55 sam Exp $
+ * $Id: input_ps.c,v 1.12 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Cyril Deguet <asmax@via.ecp.fr>
@@ -72,7 +72,7 @@ static __inline__ off_t fseeko( FILE *p_file, off_t i_offset, int i_pos )
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-static int  PSProbe         ( probedata_t * );
+static int  PSProbe         ( struct input_thread_s * );
 static int  PSRead          ( struct input_thread_s *, data_packet_t ** );
 static void PSInit          ( struct input_thread_s * );
 static void PSEnd           ( struct input_thread_s * );
@@ -100,7 +100,7 @@ DECLARE_BUFFERS_DELETEPES( FLAGS, NB_LIFO, 300 );
 void _M( input_getfunctions )( function_list_t * p_function_list )
 {
 #define input p_function_list->functions.input
-    p_function_list->pf_probe = PSProbe;
+    input.pf_probe            = PSProbe;
     input.pf_init             = PSInit;
     input.pf_open             = NULL;
     input.pf_close            = NULL;
@@ -126,23 +126,20 @@ void _M( input_getfunctions )( function_list_t * p_function_list )
 /*****************************************************************************
  * PSProbe: verifies that the stream is a PS stream
  *****************************************************************************/
-static int PSProbe( probedata_t *p_data )
+static int PSProbe( input_thread_t *p_input )
 {
-    input_thread_t * p_input = (input_thread_t *)p_data;
-
     char * psz_name = p_input->p_source;
-    int i_score = 10;
 
     if( ( strlen(psz_name) > 5 ) && (!strncasecmp( psz_name, "file:", 5 )
                                       || !strncasecmp( psz_name, "http:", 5 )) )
     {
         /* If the user specified "file:" or "http:" then it's probably a
          * PS file */
-        i_score = 100;
-        psz_name += 5;
+        return 0;
     }
 
-    return( i_score );
+    /* Oh, we load it anyway */
+    return 0;
 }
 
 /*****************************************************************************
index 5bc57cd81d8b4f136fbce72259e2b612710675fc..27230cc703a3988092bc29a8991c86192c75ee99 100644 (file)
@@ -2,7 +2,7 @@
  * input_ts.c: TS demux and netlist management
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: input_ts.c,v 1.12 2002/01/09 23:32:40 stef Exp $
+ * $Id: input_ts.c,v 1.13 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Henri Fallon <henri@videolan.org>
  *
@@ -73,7 +73,7 @@
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-static int  TSProbe     ( probedata_t * );
+static int  TSProbe     ( struct input_thread_s * );
 static void TSInit      ( struct input_thread_s * );
 static void TSEnd       ( struct input_thread_s * );
 static int  TSRead      ( struct input_thread_s *, data_packet_t ** );
@@ -99,7 +99,7 @@ DECLARE_BUFFERS_TOIO( FLAGS, TS_PACKET_SIZE );
 void _M( input_getfunctions )( function_list_t * p_function_list )
 {
 #define input p_function_list->functions.input
-    p_function_list->pf_probe = TSProbe;
+    input.pf_probe            = TSProbe;
     input.pf_init             = TSInit;
     input.pf_open             = NULL;
     input.pf_close            = NULL;
@@ -121,18 +121,15 @@ void _M( input_getfunctions )( function_list_t * p_function_list )
 /*****************************************************************************
  * TSProbe: verifies that the stream is a TS stream
  *****************************************************************************/
-static int TSProbe( probedata_t * p_data )
+static int TSProbe( input_thread_t * p_input )
 {
-    input_thread_t * p_input = (input_thread_t *)p_data;
-
     char * psz_name = p_input->p_source;
-    int i_score = 0;
 
     if( ( strlen(psz_name) >= 10 && !strncasecmp( psz_name, "udpstream:", 10 ) )
             || ( strlen(psz_name) >= 4 && !strncasecmp( psz_name, "udp:", 4 ) ) )
     {
         /* If the user specified "udp:" then it's probably a network stream */
-        return( 999 );
+        return 0;
     }
 
     if( ( strlen(psz_name) > 5 ) && !strncasecmp( psz_name, "file:", 5 ) )
@@ -145,10 +142,10 @@ static int TSProbe( probedata_t * p_data )
                     !strncasecmp( psz_name+strlen(psz_name)-3, ".ts", 3) )
     {
         /* If it is a ".ts" file it's probably a TS file ... */
-        return( 900 );
+        return 0;
     }
 
-    return( i_score );
+    return -1;
 }
 
 /*****************************************************************************
index af8fbce8bbfbe0bf426fcbc362b3ca1f865a0a6a..a4644abd7470f73b0a5bf18b7e0481ebb9c9abfc 100644 (file)
@@ -2,7 +2,7 @@
  * mpeg_es.c : Elementary Stream input module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: mpeg_es.c,v 1.2 2001/12/30 07:09:55 sam Exp $
+ * $Id: mpeg_es.c,v 1.3 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -42,7 +42,7 @@ MODULE_CONFIG_STOP
 
 MODULE_INIT_START
     SET_DESCRIPTION( "ISO 13818-1 MPEG Elementary Stream input" )
-    ADD_CAPABILITY( INPUT, 50 )
+    ADD_CAPABILITY( INPUT, 5 )
     ADD_SHORTCUT( "es" )
 MODULE_INIT_STOP
 
index a043865b9afe55b6438c704585fecd4e121754d9..3216d443a97f8c028b9fd6321c35a498958c7285 100644 (file)
@@ -2,7 +2,7 @@
  * mpeg_ps.c : Program Stream input module for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: mpeg_ps.c,v 1.2 2001/12/30 07:09:55 sam Exp $
+ * $Id: mpeg_ps.c,v 1.3 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -42,7 +42,7 @@ MODULE_CONFIG_STOP
 
 MODULE_INIT_START
     SET_DESCRIPTION( "ISO 13818-1 MPEG Program Stream input" )
-    ADD_CAPABILITY( INPUT, 100 )
+    ADD_CAPABILITY( INPUT, 10 )
     ADD_SHORTCUT( "ps" )
 MODULE_INIT_STOP
 
index 3a61ab34ea3951cb445f9dfe9afe9bcd425c9abd..70093a9d95735f07d8782a0fdb8e158531ef141a 100644 (file)
@@ -2,7 +2,7 @@
  * video_parser.c : video parser thread
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: video_parser.c,v 1.12 2002/01/21 23:57:46 massiot Exp $
+ * $Id: video_parser.c,v 1.13 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
@@ -53,7 +53,7 @@
 /*
  * Local prototypes
  */
-static int      decoder_Probe     ( probedata_t * );
+static int      decoder_Probe     ( u8 * );
 static int      decoder_Run       ( decoder_config_t * );
 static int      InitThread        ( vpar_thread_t * );
 static void     EndThread         ( vpar_thread_t * );
@@ -64,8 +64,8 @@ static void     BitstreamCallback ( bit_stream_t *, boolean_t );
  *****************************************************************************/
 void _M( vdec_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;
 }
 
 /*****************************************************************************
@@ -93,10 +93,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( ( p_data->i_type == MPEG1_VIDEO_ES
-               || p_data->i_type == MPEG2_VIDEO_ES ) ? 50 : 0 );
+    return( ( *pi_type == MPEG1_VIDEO_ES
+               || *pi_type == MPEG2_VIDEO_ES ) ? 0 : -1 );
 }
 
 /*****************************************************************************
index 2874c94a1daa2217e4d4db32bbd1ae1ac29e76eb..07d2017b2e30a6639561a55b5f32a1c03cbdc605 100644 (file)
@@ -45,7 +45,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 );
@@ -59,7 +58,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;
@@ -67,39 +65,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 make its choice.
- *****************************************************************************/
-static int aout_Probe( probedata_t *p_data )
-{
-    int i_ret;
-    aout_sys_t adev;
-
-    /* open audio device */
-    if( ( i_ret = snd_pcm_open_preferred( &adev.p_pcm_handle,
-                                          &adev.i_card, &adev.i_device,
-                                          SND_PCM_OPEN_PLAYBACK ) ) < 0 )
-    {
-        intf_WarnMsg( 2, "aout error: unable to open audio device (%s)",
-                      snd_strerror( i_ret ) );
-        return( 0 );
-    }
-
-    /* close audio device */
-    if( ( i_ret = snd_pcm_close( adev.p_pcm_handle ) ) < 0 )
-    {
-        intf_WarnMsg( 2, "aout error: unable to close audio device (%s)",
-                      snd_strerror( i_ret ) );
-        return( 0 );
-    }
-
-    /* return score */
-    return( 50 );
-}    
-
 /*****************************************************************************
  * aout_Open : creates a handle and opens an alsa device
  *****************************************************************************
@@ -126,6 +91,7 @@ static int aout_Open( aout_thread_t *p_aout )
     {
         intf_ErrMsg( "aout error: unable to open audio device (%s)",
                       snd_strerror( i_ret ) );
+        free( p_aout->p_sys );
         return( 1 );
     }
 
@@ -136,6 +102,7 @@ static int aout_Open( aout_thread_t *p_aout )
         intf_ErrMsg( "aout error: unable to disable mmap (%s)",
                      snd_strerror( i_ret ) );
         aout_Close( p_aout );
+        free( p_aout->p_sys );
         return( 1 );
     }
 
index 8975cf291126525025d3ff44c99b11d9e0774d7d..5d524fa9c41003422398983160b8bc4d87543836 100644 (file)
@@ -89,7 +89,6 @@ typedef struct vout_sys_s
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-static int  vout_Probe     ( probedata_t *p_data );
 static int  vout_Create    ( struct vout_thread_s * );
 static int  vout_Init      ( struct vout_thread_s * );
 static void vout_End       ( struct vout_thread_s * );
@@ -107,7 +106,6 @@ static int  QNXDestroyWnd  ( struct vout_thread_s * );
  *****************************************************************************/
 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;
@@ -117,17 +115,6 @@ void _M( vout_getfunctions )( function_list_t * p_function_list )
     p_function_list->functions.vout.pf_setpalette = NULL;
 }
 
-/*****************************************************************************
- * 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: allocate QNX video thread output method
  *****************************************************************************
index 0b59f6d7780d2b2b647eefeda33c340cd105dc98..3fe52898009b42bb4d923df699def715140d94d5 100644 (file)
@@ -2,7 +2,7 @@
  * intf_qt.cpp: Qt interface
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: intf_qt.cpp,v 1.11 2002/01/07 02:12:29 sam Exp $
+ * $Id: intf_qt.cpp,v 1.12 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -146,7 +146,6 @@ typedef struct intf_sys_s
 /*****************************************************************************
  * 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 );
@@ -160,7 +159,6 @@ extern "C"
 
 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;
@@ -168,17 +166,6 @@ void _M( intf_getfunctions )( function_list_t * p_function_list )
 
 }
 
-/*****************************************************************************
- * intf_Probe: probe the interface and return a score
- *****************************************************************************
- * This function tries to initialize Qt 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( 80 );
-}
-
 /*****************************************************************************
  * intf_Open: initialize and create window
  *****************************************************************************/
index 8387ad95089517a16c8d64bc4d47c8669bc99c41..6bdbf95972b17897131f38de971f58d6850791c8 100644 (file)
@@ -2,7 +2,7 @@
  * aout_sdl.c : audio sdl functions library
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: aout_sdl.c,v 1.24 2002/01/28 23:08:31 stef Exp $
+ * $Id: aout_sdl.c,v 1.25 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -61,7 +61,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 );
@@ -77,7 +76,6 @@ static void    aout_SDLCallback ( void *userdata, Uint8 *stream, int len );
  *****************************************************************************/
 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;
@@ -85,54 +83,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
- *****************************************************************************
- * This function tries to initialize SDL audio and returns a score to the
- * plugin manager so that it can select the best plugin.
- *****************************************************************************/
-static int aout_Probe( probedata_t *p_data )
-{
-#if 0
-    SDL_AudioSpec desired, obtained;
-#endif
-
-    if( SDL_WasInit( SDL_INIT_AUDIO ) != 0 )
-    {
-        return( 0 );
-    }
-
-#if 0
-    /* Start AudioSDL */
-    if( SDL_Init(SDL_INIT_AUDIO | SDL_INIT_NOPARACHUTE) != 0 )
-    {
-        intf_DbgMsg( "aout: SDL_Init failed (%s)", SDL_GetError() );
-        return( 0 );
-    }
-
-    desired.freq       = 11025;                                 /* frequency */
-    desired.format     = AUDIO_U8;                        /* unsigned 8 bits */
-    desired.channels   = 2;                                          /* mono */
-    desired.callback   = aout_SDLCallback;    /* callback function mandatory */
-    desired.userdata   = NULL;                     /* null parm for callback */
-    desired.samples    = 4096;
-
-    /* If we were unable to open the device, there is no way we can use
-     * the plugin. Return a score of 0. */
-    if( SDL_OpenAudio( &desired, &obtained ) < 0 )
-    {
-        intf_DbgMsg( "aout: SDL_OpenAudio failed (%s)", SDL_GetError() );
-        return( 0 );
-    }
-
-    /* Otherwise, there are good chances we can use this plugin, return 100. */
-    intf_DbgMsg( "aout: SDL_OpenAudio successfully run" );
-    SDL_CloseAudio();
-#endif
-
-    return( 40 );
-}
-
 /*****************************************************************************
  * aout_Open: open the audio device
  *****************************************************************************
@@ -146,7 +96,7 @@ static int aout_Open( aout_thread_t *p_aout )
 
     if( SDL_WasInit( SDL_INIT_AUDIO ) != 0 )
     {
-        return( 0 );
+        return( 1 );
     }
 
     /* Allocate structure */
index 5be925da6436f27d4e69cef08ddd407404279598..50f206b817eb49a85e4bdd9cbbd4f6005de04bb2 100644 (file)
@@ -2,7 +2,7 @@
  * vout_sdl.c: SDL video output display method
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: vout_sdl.c,v 1.80 2002/01/12 01:25:57 sam Exp $
+ * $Id: vout_sdl.c,v 1.81 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Pierre Baillet <oct@zoy.org>
@@ -120,7 +120,6 @@ static __inline__ void vout_Seek( off_t i_seek )
 /*****************************************************************************
  * Local prototypes.
  *****************************************************************************/
-static int  vout_Probe      ( probedata_t *p_data );
 static int  vout_Create     ( struct vout_thread_s * );
 static int  vout_Init       ( struct vout_thread_s * );
 static void vout_End        ( struct vout_thread_s * );
@@ -139,7 +138,6 @@ static int  SDLNewPicture       ( vout_thread_t *p_vout, picture_t *p_pic );
  *****************************************************************************/
 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;
@@ -149,22 +147,6 @@ void _M( vout_getfunctions )( function_list_t * p_function_list )
     p_function_list->functions.vout.pf_display    = vout_Display;
 }
 
-/*****************************************************************************
- * 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 )
-{
-    if( SDL_WasInit( SDL_INIT_VIDEO ) != 0 )
-    {
-        return( 0 );
-    }
-
-    return( 100 );
-}
-
 /*****************************************************************************
  * vout_Create: allocate SDL video thread output method
  *****************************************************************************
index 42e334655aa3904bb55776ed7e35d9c9acce2086..f2847da14d28834984ae2083b92176ce320e4b2d 100644 (file)
@@ -2,7 +2,7 @@
  * spu_decoder.c : spu decoder thread
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: spu_decoder.c,v 1.8 2002/01/21 23:57:46 massiot Exp $
+ * $Id: spu_decoder.c,v 1.9 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -48,7 +48,7 @@
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-static int  decoder_Probe ( probedata_t * );
+static int  decoder_Probe ( u8 * );
 static int  decoder_Run   ( decoder_config_t * );
 static int  InitThread    ( spudec_thread_t * );
 static void EndThread     ( spudec_thread_t * );
@@ -63,8 +63,8 @@ static int  ParseRLE             ( spudec_thread_t *, subpicture_t *, u8 * );
  *****************************************************************************/
 void _M( spudec_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 chose.
  *****************************************************************************/
-static int decoder_Probe( probedata_t *p_data )
+static int decoder_Probe( u8 *pi_type )
 {
-    return ( p_data->i_type == DVD_SPU_ES ) ? 50 : 0;
+    return ( *pi_type == DVD_SPU_ES ) ? 0 : -1;
 }
 
 /*****************************************************************************
index a9b2cc968c123c3d75038096193b721cbf84d2a8..28b1a9f23d7b6f26a9e930f236a9bc91fc3131c6 100644 (file)
@@ -2,7 +2,7 @@
  * ncurses.c : NCurses plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: ncurses.c,v 1.10 2002/01/04 14:01:34 sam Exp $
+ * $Id: ncurses.c,v 1.11 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *      
@@ -42,7 +42,6 @@
  * Local prototypes.
  *****************************************************************************/
 static void intf_getfunctions ( function_list_t * p_function_list );
-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 );
@@ -85,23 +84,11 @@ typedef struct intf_sys_s
  *****************************************************************************/
 static void 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 ncurses 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( 40 );
-}
-
 /*****************************************************************************
  * intf_Open: initialize and create window
  *****************************************************************************/
index 2043dc4e3cc4b502719b280aec50b52036e059f0..3a43d5ff538c81764000608dfe804c6c1a588913 100644 (file)
@@ -2,7 +2,7 @@
  * rc.c : remote control stdin/stdout plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: rc.c,v 1.9 2002/01/07 02:12:29 sam Exp $
+ * $Id: rc.c,v 1.10 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Peter Surda <shurdeek@panorama.sth.ac.at>
  *
@@ -64,7 +64,6 @@ typedef struct intf_sys_s
  * Local prototypes.
  *****************************************************************************/
 static void intf_getfunctions ( function_list_t * p_function_list );
-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 );
@@ -94,23 +93,11 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 static void 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 rc 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( 20 );
-}
-
 /*****************************************************************************
  * intf_Open: initialize and create stuff
  *****************************************************************************/
index 895dce71ac2591d4bb75524b31a2ade16410130a..2d7b8b3bf6d75e1ba1244287cd99511dd38c96da 100644 (file)
@@ -70,7 +70,7 @@
  * Local prototypes
  *****************************************************************************/
 /* called from outside */
-static int  VCDProbe        ( probedata_t *p_data );
+static int  VCDProbe        ( struct input_thread_s * );
 static void VCDInit         ( struct input_thread_s * );
 static int  VCDRead         ( struct input_thread_s *, data_packet_t ** );
 static int  VCDSetArea      ( struct input_thread_s *, struct input_area_s * );
@@ -102,7 +102,7 @@ DECLARE_BUFFERS_DELETEPES( FLAGS, NB_LIFO, 1000 );
 void _M( input_getfunctions )( function_list_t * p_function_list )
 {
 #define input p_function_list->functions.input
-    p_function_list->pf_probe = VCDProbe;
+    input.pf_probe            = VCDProbe;
     input.pf_init             = VCDInit;
     input.pf_open             = VCDOpen;
     input.pf_close            = VCDClose;
@@ -128,21 +128,17 @@ void _M( input_getfunctions )( function_list_t * p_function_list )
 /*****************************************************************************
  * VCDProbe: verifies that the stream is a PS stream
  *****************************************************************************/
-static int VCDProbe( probedata_t *p_data )
+static int VCDProbe( input_thread_t * p_input )
 {
-    input_thread_t * p_input = (input_thread_t *)p_data;
-
     char * psz_name = p_input->p_source;
-    int i_score = 0;
 
     if( ( strlen(psz_name) > 4 ) && !strncasecmp( psz_name, "vcd:", 4 ) )
     {
         /* If the user specified "vcd:" then it's probably a VCD */
-        i_score = 100;
-        psz_name += 4;
+        return 0;
     }
 
-    return( i_score );
+    return -1;
 }
 
 /*****************************************************************************
index 617fef5b9457c9134991c6f81a4bca5b80344c99..0794bb291f30fe765f3ab5783029cc1165deb23a 100644 (file)
@@ -2,7 +2,7 @@
  * vcd.c : VCD input module for vlc
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: vcd.c,v 1.4 2001/12/30 07:09:56 sam Exp $
+ * $Id: vcd.c,v 1.5 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  *****************************************************************************/
 void _M( input_getfunctions )( function_list_t * p_function_list );
 
-/*****************************************************************************
- * Local prototypes.
- *****************************************************************************/
-
 /*****************************************************************************
  * Build configuration tree.
  *****************************************************************************/
index 1d09d833956bb874218382003485359e92ef9d72..9c6fa865602897c943a0de2222472a7eaeeaa951 100644 (file)
@@ -2,7 +2,7 @@
  * aout_waveout.c: Windows waveOut audio output method
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: aout_waveout.c,v 1.2 2002/01/28 23:08:31 stef Exp $
+ * $Id: aout_waveout.c,v 1.3 2002/02/15 13:32:53 sam Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -63,7 +63,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 );
@@ -80,7 +79,6 @@ static int     OpenWaveOutDevice( 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,39 +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
- *****************************************************************************
- * This function tries to probe for a waveOut sound  device and returns a
- * score to the plugin manager so it can select the best plugin.
- *****************************************************************************/
-static int aout_Probe( probedata_t *p_data )
-{
-    HWAVEOUT h_waveout;
-    WAVEFORMATEX waveformat;
-    MMRESULT result;
-
-    /* Set a common sound format */
-    waveformat.wFormatTag       = WAVE_FORMAT_PCM;
-    waveformat.nChannels        = 2;
-    waveformat.nSamplesPerSec   = 44100;
-    waveformat.wBitsPerSample   = 16;
-    waveformat.nBlockAlign      = waveformat.wBitsPerSample / 8 * 2;
-    waveformat.nAvgBytesPerSec  = waveformat.nSamplesPerSec *
-                                      waveformat.nBlockAlign;
-
-    /* Open the device */
-    result = waveOutOpen( &h_waveout, WAVE_MAPPER, &waveformat,
-                          0 /*callback*/, 0 /*callback data*/, CALLBACK_NULL );
-    if( result != MMSYSERR_NOERROR )
-    {
-        return( 0 );
-    }
-    waveOutClose( h_waveout );
-
-    return( 150 );
-}
-
 /*****************************************************************************
  * aout_Open: open the audio device
  *****************************************************************************
index 3c18807c4b233f81b12f0fe964b33e2c948237c6..cd2d01dc22341e606dab05995b8513a086e09b15 100644 (file)
@@ -2,7 +2,7 @@
  * xcommon.c: Functions common to the X11 and XVideo plugins
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: xcommon.c,v 1.15 2002/01/28 16:51:22 sam Exp $
+ * $Id: xcommon.c,v 1.16 2002/02/15 13:32:54 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -85,7 +85,6 @@
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-static int  vout_Probe     ( probedata_t * );
 static int  vout_Create    ( vout_thread_t * );
 static void vout_Destroy   ( vout_thread_t * );
 static void vout_Render    ( vout_thread_t *, picture_t * );
@@ -257,7 +256,6 @@ static __inline__ void vout_Seek( off_t i_seek )
  *****************************************************************************/
 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;
@@ -267,62 +265,6 @@ void _M( vout_getfunctions )( function_list_t * p_function_list )
     p_function_list->functions.vout.pf_display    = vout_Display;
 }
 
-/*****************************************************************************
- * 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 )
-{
-    Display *p_display;                                   /* display pointer */
-    char    *psz_display;
-#ifdef MODULE_NAME_IS_xvideo
-    int      i_xvport, i_dummy;
-#endif
-
-    /* Open display, unsing 'vlc_display' or DISPLAY environment variable */
-    psz_display = XDisplayName( main_GetPszVariable(VOUT_DISPLAY_VAR, NULL) );
-    p_display = XOpenDisplay( psz_display );
-    if( p_display == NULL )                                         /* error */
-    {
-        intf_WarnMsg( 3, "vout: cannot open display %s", psz_display );
-        return( 0 );
-    }
-
-#ifdef MODULE_NAME_IS_xvideo
-    /* Check that there is an available XVideo port for this format */
-    i_xvport = XVideoGetPort( p_display, p_data->vout.i_chroma, &i_dummy );
-    if( i_xvport < 0 )
-    {
-        /* It failed, but it's not completely lost ! We try to open an
-         * XVideo port for a YUY2 picture */
-        i_xvport = XVideoGetPort( p_display, FOURCC_YUY2, &i_dummy );
-        if( i_xvport < 0 )
-        {
-            /* It failed, but it's not completely lost ! We try to open an
-             * XVideo port for a simple 16bpp RGB picture */
-            i_xvport = XVideoGetPort( p_display, FOURCC_RV16, &i_dummy );
-            if( i_xvport < 0 )
-            {
-                XCloseDisplay( p_display );
-                return( 0 );
-            }
-        }
-    }
-    XVideoReleasePort( p_display, i_xvport );
-#endif
-
-    /* Clean-up everyting */
-    XCloseDisplay( p_display );
-
-#ifdef MODULE_NAME_IS_xvideo 
-    return( 150 );
-#else
-    return( 50 );
-#endif
-}
-
 /*****************************************************************************
  * vout_Create: allocate X11 video thread output method
  *****************************************************************************
index b2a722c5fd4397d5f719a99e76e073dd7a119614..3b635ac953a756c39d5dc0cdca0785eac5ab3428 100644 (file)
@@ -2,7 +2,7 @@
  * aout_ext-dec.c : exported fifo management functions
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: aout_ext-dec.c,v 1.11 2002/01/21 23:57:46 massiot Exp $
+ * $Id: aout_ext-dec.c,v 1.12 2002/02/15 13:32:54 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Cyril Deguet <asmax@via.ecp.fr>
@@ -44,8 +44,9 @@ aout_fifo_t * aout_CreateFifo( int i_type, int i_channels, long l_rate,
     aout_thread_t *p_aout;
     int i_fifo;
 
-    intf_WarnMsg( 3, "aout_CreateFifo: type == %d, channels == %d, rate == %d, units == %d, frame_size == %d, buffer == %x",
-                  i_type, i_channels, l_rate, l_units, l_frame_size, p_buffer );
+    intf_WarnMsg( 3, "aout info: fifo type %d, %d channels, rate %d, "
+                     "%d units, frame size %d",
+                     i_type, i_channels, l_rate, l_units, l_frame_size );
 
     /* Spawn an audio output if there is none */
     vlc_mutex_lock( &p_aout_bank->lock );
index ca4149bda7645b3eb42c46fb805acf8ca749d5fe..ba20bc4e59f1cff175967a859e5b81dac822177b 100644 (file)
@@ -2,7 +2,7 @@
  * audio_output.c : audio output thread
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: audio_output.c,v 1.75 2002/01/28 23:08:31 stef Exp $
+ * $Id: audio_output.c,v 1.76 2002/02/15 13:32:54 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Cyril Deguet <asmax@via.ecp.fr>
@@ -97,9 +97,8 @@ aout_thread_t *aout_CreateThread( int *pi_status, int i_channels, long l_rate )
     p_aout->i_channels = 1 + main_GetIntVariable( AOUT_STEREO_VAR,
                                                   i_channels - 1 );
 
-    intf_WarnMsg( 3, "aout_CreateThread: channels == %d, rate == %d",
-                         p_aout->i_channels,
-                         p_aout->l_rate );
+    intf_WarnMsg( 3, "aout info: thread created, channels %d, rate %d",
+                  p_aout->i_channels, p_aout->l_rate );
     
     /* Maybe we should pass this setting in argument */
     p_aout->i_format = AOUT_FORMAT_DEFAULT;
@@ -125,7 +124,7 @@ aout_thread_t *aout_CreateThread( int *pi_status, int i_channels, long l_rate )
     /* Choose the best module */
     p_aout->p_module = module_Need( MODULE_CAPABILITY_AOUT,
                            main_GetPszVariable( AOUT_METHOD_VAR, NULL ), 
-                           NULL );
+                           (void *)p_aout );
 
     if( p_aout->p_module == NULL )
     {
@@ -145,13 +144,6 @@ aout_thread_t *aout_CreateThread( int *pi_status, int i_channels, long l_rate )
     /*
      * Initialize audio device
      */
-    if ( p_aout->pf_open( p_aout ) )
-    {
-        module_Unneed( p_aout->p_module );
-        free( p_aout );
-        return( NULL );
-    }
-
     if ( p_aout->pf_setformat( p_aout ) )
     {
         p_aout->pf_close( p_aout );
index a5eb4eea1bed5f40782ddbc8e89931d54e973912..d0e3a6ee2ac0e03873f603456546981b7e3dbbd3 100644 (file)
@@ -4,7 +4,7 @@
  * decoders.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: input.c,v 1.173 2002/01/21 23:57:46 massiot Exp $
+ * $Id: input.c,v 1.174 2002/02/15 13:32:54 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -453,7 +453,7 @@ static int InitThread( input_thread_t * p_input )
     /* Find appropriate module. */
     p_input->p_input_module = module_Need( MODULE_CAPABILITY_INPUT,
                                  main_GetPszVariable( INPUT_METHOD_VAR, NULL ),
-                                 (probedata_t *)p_input );
+                                 (void *)p_input );
 
     if( p_input->p_input_module == NULL )
     {
@@ -463,6 +463,7 @@ static int InitThread( input_thread_t * p_input )
     }
 
 #define f p_input->p_input_module->p_functions->input.functions.input
+    p_input->pf_probe         = f.pf_probe;
     p_input->pf_init          = f.pf_init;
     p_input->pf_end           = f.pf_end;
     p_input->pf_read          = f.pf_read;
index f46911849eca81ca9fa010704571529b354d67b0..5c80238acefb939679086a024614bb7a794dcd29 100644 (file)
@@ -2,7 +2,7 @@
  * input_dec.c: Functions for the management of decoders
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: input_dec.c,v 1.25 2002/02/05 21:46:41 gbazin Exp $
+ * $Id: input_dec.c,v 1.26 2002/02/15 13:32:54 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -45,13 +45,9 @@ static void DeleteDecoderConfig( decoder_config_t * p_config );
 vlc_thread_t input_RunDecoder( input_thread_t * p_input,
                                es_descriptor_t * p_es )
 {
-    probedata_t probedata;
     vlc_thread_t thread_id;
     char * psz_plugin = NULL;
 
-    /* Get a suitable module */
-    probedata.i_type = p_es->i_type;
-
     if( p_es->i_type == MPEG1_AUDIO_ES || p_es->i_type == MPEG2_AUDIO_ES )
     {
         psz_plugin = main_GetPszVariable( ADEC_MPEG_VAR, NULL );
@@ -61,7 +57,9 @@ vlc_thread_t input_RunDecoder( input_thread_t * p_input,
         psz_plugin = main_GetPszVariable( ADEC_AC3_VAR, NULL );
     }
 
-    p_es->p_module = module_Need( MODULE_CAPABILITY_DECODER, psz_plugin, &probedata );
+    /* Get a suitable module */
+    p_es->p_module = module_Need( MODULE_CAPABILITY_DECODER, psz_plugin,
+                                  (void *)&p_es->i_type );
     if( p_es->p_module == NULL )
     {
         intf_ErrMsg( "input error: no suitable decoder module for type 0x%x",
index dc78d91f749e0a23b2c8f9d2324aac018f30a9a3..f3ce089f652c2d0423aee514ed528d9b0f3af68d 100644 (file)
@@ -4,7 +4,7 @@
  * interface, such as command line.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: interface.c,v 1.87 2002/01/09 02:01:14 sam Exp $
+ * $Id: interface.c,v 1.88 2002/02/15 13:32:54 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
@@ -72,7 +72,7 @@ intf_thread_t* intf_Create( void )
     /* Choose the best module */
     p_intf->p_module = module_Need( MODULE_CAPABILITY_INTF,
                            main_GetPszVariable( INTF_METHOD_VAR, NULL ),
-                           NULL );
+                           (void *)p_intf );
 
     if( p_intf->p_module == NULL )
     {
@@ -96,14 +96,6 @@ intf_thread_t* intf_Create( void )
     p_intf->b_menu        = 0;
     p_intf->b_menu_change = 0;
 
-    if( p_intf->pf_open( p_intf ) )
-    {
-        intf_ErrMsg("intf error: cannot create interface");
-        module_Unneed( p_intf->p_module );
-        free( p_intf );
-        return( NULL );
-    }
-
     /* Initialize mutexes */
     vlc_mutex_init( &p_intf->change_lock );
 
index be0a77dbae594c7e550543ddd516699cd10fb2c5..4953e511aa2771a950bab9ad625fc350c1f33c75 100644 (file)
@@ -4,7 +4,7 @@
  * and spawn threads.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: main.c,v 1.150 2002/02/14 23:29:17 sam Exp $
+ * $Id: main.c,v 1.151 2002/02/15 13:32:54 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -405,11 +405,18 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
     /*
      * Choose the best memcpy module
      */
-    if( module_NeedMemcpy( &p_main->memcpy ) )
+    p_main->p_memcpy_module = module_Need( MODULE_CAPABILITY_MEMCPY, NULL,
+                                           NULL );
+    if( p_main->p_memcpy_module == NULL )
     {
         intf_ErrMsg( "intf error: no suitable memcpy module, "
                      "using libc default" );
-        p_main->memcpy.pf_memcpy = memcpy;
+        p_main->pf_memcpy = memcpy;
+    }
+    else
+    {
+        p_main->pf_memcpy = p_main->p_memcpy_module->p_functions
+                                  ->memcpy.functions.memcpy.pf_memcpy;
     }
 
     /*
@@ -420,8 +427,8 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
         network_ChannelCreate() )
     {
         /* On error during Channels initialization, switch off channels */
-        intf_Msg( "Channels initialization failed : "
-                  "Channel management is deactivated" );
+        intf_ErrMsg( "intf error: channels initialization failed, " 
+                                 "deactivating channels" );
         main_PutIntVariable( INPUT_NETWORK_CHANNEL_VAR, 0 );
     }
 
@@ -475,9 +482,9 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
     /*
      * Free memcpy module if it was allocated
      */
-    if( p_main->memcpy.p_module != NULL )
+    if( p_main->p_memcpy_module != NULL )
     {
-        module_UnneedMemcpy( &p_main->memcpy );
+        module_Unneed( p_main->p_memcpy_module );
     }
 
     /*
index c307de8077954812cc3d2c8fa5b4aaeebf1a9951..12fb201c598d624582042f3a5d297dbe40270305 100644 (file)
@@ -2,7 +2,7 @@
  * modules.c : Built-in and plugin modules management functions
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules.c,v 1.51 2002/02/04 09:58:59 sam Exp $
+ * $Id: modules.c,v 1.52 2002/02/15 13:32:54 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Ethan C. Baldridge <BaldridgeE@cadmus.com>
@@ -224,49 +224,12 @@ void module_ManageBank( void )
     return;
 }
 
-int module_NeedMemcpy( memcpy_module_t *p_memcpy )
-{
-    p_memcpy->p_module = module_Need( MODULE_CAPABILITY_MEMCPY, NULL, NULL );
-
-    if( p_memcpy->p_module == NULL )
-    {
-        return -1;
-    }
-
-    p_memcpy->pf_memcpy = p_memcpy->p_module->p_functions->memcpy.functions.memcpy.fast_memcpy;
-
-    return 0;
-}
-
-void module_UnneedMemcpy( memcpy_module_t *p_memcpy )
-{
-    module_Unneed( p_memcpy->p_module );
-}
-
-#if 0
-int module_NeedIntf( intf_module_t *p_intf )
-{
-    p_intf->p_module = module_Need( MODULE_CAPABILITY_INTF, NULL );
-
-    if( p_intf->p_module == NULL )
-    {
-        return -1;
-    }
-
-    p_intf->pf_open = p_intf->p_module->p_functions->intf.functions.intf.pf_open;
-    p_intf->pf_run = p_intf->p_module->p_functions->intf.functions.intf.pf_run;
-    p_intf->pf_close = p_intf->p_module->p_functions->intf.functions.intf.pf_close;
-
-    return 0;
-}
-#endif
-
 /*****************************************************************************
  * module_Need: return the best module function, given a capability list.
  *****************************************************************************
  * This function returns the module that best fits the asked capabilities.
  *****************************************************************************/
-module_t * module_Need( int i_capability, char *psz_name, probedata_t *p_data )
+module_t * module_Need( int i_capability, char *psz_name, void *p_data )
 {
     typedef struct module_list_s
     {
@@ -275,8 +238,7 @@ module_t * module_Need( int i_capability, char *psz_name, probedata_t *p_data )
     } module_list_t;
     struct module_list_s *p_list, *p_first;
 
-    int i_score = 0;
-    int i_index = 0;
+    int i_ret, i_index = 0;
 
     module_t *p_module;
     char     *psz_realname = NULL;
@@ -354,6 +316,9 @@ module_t * module_Need( int i_capability, char *psz_name, probedata_t *p_data )
         /* Store this new module */
         p_list[ i_index ].p_module = p_module;
 
+        /* Lock it */
+        LockModule( p_module );
+
         if( i_index == 0 )
         {
             p_list[ i_index ].p_next = NULL;
@@ -375,8 +340,7 @@ module_t * module_Need( int i_capability, char *psz_name, probedata_t *p_data )
             else
             {
                 while( p_newlist->p_next != NULL
-                        && p_newlist->p_next
-                             ->p_module->pi_score[i_capability]
+                        && p_newlist->p_next->p_module->pi_score[i_capability]
                             >= p_module->pi_score[i_capability] )
                 {
                     p_newlist = p_newlist->p_next;
@@ -390,31 +354,92 @@ module_t * module_Need( int i_capability, char *psz_name, probedata_t *p_data )
         i_index++;
     }
 
+    /* We can release the global lock, module refcount were incremented */
+    vlc_mutex_unlock( &p_module_bank->lock );
+
     /* Parse the linked list and use the first successful module */
     while( p_first != NULL )
     {
-        LockModule( p_first->p_module );
-
         /* Test the requested capability */
-        i_score += ((function_list_t *)p_first->p_module->p_functions)
-                                        [i_capability].pf_probe( p_data );
+        switch( i_capability )
+        {
+            case MODULE_CAPABILITY_INPUT:
+                i_ret = p_first->p_module->p_functions->input.functions.
+                              input.pf_probe( (input_thread_t *)p_data );
+                break;
+
+            case MODULE_CAPABILITY_DECODER:
+                i_ret = p_first->p_module->p_functions->dec.functions.
+                              dec.pf_probe( (u8 *)p_data );
+                break;
+
+            case MODULE_CAPABILITY_INTF:
+                i_ret = p_first->p_module->p_functions->intf.functions.
+                              intf.pf_open( (intf_thread_t *)p_data );
+                break;
+
+            case MODULE_CAPABILITY_AOUT:
+                i_ret = p_first->p_module->p_functions->aout.functions.
+                              aout.pf_open( (aout_thread_t *)p_data );
+                break;
+
+            case MODULE_CAPABILITY_VOUT:
+                i_ret = p_first->p_module->p_functions->vout.functions.
+                              vout.pf_create( (vout_thread_t *)p_data );
+                break;
+
+            case MODULE_CAPABILITY_CHROMA:
+                i_ret = p_first->p_module->p_functions->chroma.functions.
+                              chroma.pf_init( (vout_thread_t *)p_data );
+                break;
+
+            case MODULE_CAPABILITY_IDCT:
+            case MODULE_CAPABILITY_IMDCT:
+            case MODULE_CAPABILITY_MOTION:
+            case MODULE_CAPABILITY_DOWNMIX:
+            case MODULE_CAPABILITY_MEMCPY:
+                /* This one always works */
+                i_ret = 0;
+                break;
+
+            default:
+                intf_ErrMsg( "module error: if you can read this, sam fucked up something very bad... fuck him with a chainsaw on vlc-devel" );
+                i_ret = -1;
+                break;
+        }
 
         /* If the high score was broken, we have a new champion */
-        if( i_score )
+        if( i_ret == 0 )
         {
             break;
         }
+        else
+        {
+            UnlockModule( p_first->p_module );
+        }
 
-        UnlockModule( p_first->p_module );
+        p_first = p_first->p_next;
+    }
 
+    /* Store the locked module value */
+    if( p_first != NULL )
+    {
+        p_module = p_first->p_module;
         p_first = p_first->p_next;
     }
+    else
+    {
+        p_module = NULL;
+    }
 
-    p_module = (p_first == NULL) ? NULL : p_first->p_module;
-    free( p_list );
+    /* Unlock the remaining modules */
+    while( p_first != NULL )
+    {
+        UnlockModule( p_first->p_module );
+        p_first = p_first->p_next;
+    }
 
-    /* We can release the global lock, module refcount was incremented */
-    vlc_mutex_unlock( &p_module_bank->lock );
+    free( p_list );
 
     if( p_module != NULL )
     {
@@ -433,7 +458,7 @@ module_t * module_Need( int i_capability, char *psz_name, probedata_t *p_data )
         free( psz_realname );
     }
 
-    /* Don't forget that the module is still locked if bestmodule != NULL */
+    /* Don't forget that the module is still locked */
     return( p_module );
 }
 
index 688a6680d27641ffe0538af61f5e7d7f2ef9e45f..0645d8e211782602b6c780cf7c62ac59d8aa39a1 100644 (file)
@@ -5,7 +5,7 @@
  * thread, and destroy a previously oppened video output thread.
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: video_output.c,v 1.157 2002/01/13 15:07:55 gbazin Exp $
+ * $Id: video_output.c,v 1.158 2002/02/15 13:32:54 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
@@ -95,7 +95,6 @@ vout_thread_t * vout_CreateThread   ( int *pi_status,
     int             i_status;                               /* thread status */
     int             i_index;                                /* loop variable */
     char          * psz_plugin;
-    probedata_t     data;
 
     /* Allocate descriptor */
     p_vout = (vout_thread_t *) malloc( sizeof(vout_thread_t) );
@@ -113,27 +112,6 @@ vout_thread_t * vout_CreateThread   ( int *pi_status,
         psz_plugin = main_GetPszVariable( VOUT_METHOD_VAR, "" );
     }
 
-    data.vout.i_chroma = i_chroma;
-    p_vout->p_module
-        = module_Need( MODULE_CAPABILITY_VOUT, psz_plugin, &data );
-
-    if( p_vout->p_module == NULL )
-    {
-        intf_ErrMsg( "vout error: no suitable vout module" );
-        free( p_vout );
-        return( NULL );
-    }
-
-#define f p_vout->p_module->p_functions->vout.functions.vout
-    p_vout->pf_create     = f.pf_create;
-    p_vout->pf_init       = f.pf_init;
-    p_vout->pf_end        = f.pf_end;
-    p_vout->pf_destroy    = f.pf_destroy;
-    p_vout->pf_manage     = f.pf_manage;
-    p_vout->pf_render     = f.pf_render;
-    p_vout->pf_display    = f.pf_display;
-#undef f
-
     /* Initialize thread properties - thread id and locks will be initialized
      * later */
     p_vout->b_die               = 0;
@@ -179,6 +157,26 @@ vout_thread_t * vout_CreateThread   ( int *pi_status,
     if( main_GetIntVariable( VOUT_FULLSCREEN_VAR, VOUT_FULLSCREEN_DEFAULT ) )
         p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE;
 
+    p_vout->p_module
+        = module_Need( MODULE_CAPABILITY_VOUT, psz_plugin, (void *)p_vout );
+
+    if( p_vout->p_module == NULL )
+    {
+        intf_ErrMsg( "vout error: no suitable vout module" );
+        free( p_vout );
+        return( NULL );
+    }
+
+#define f p_vout->p_module->p_functions->vout.functions.vout
+    p_vout->pf_create     = f.pf_create;
+    p_vout->pf_init       = f.pf_init;
+    p_vout->pf_end        = f.pf_end;
+    p_vout->pf_destroy    = f.pf_destroy;
+    p_vout->pf_manage     = f.pf_manage;
+    p_vout->pf_render     = f.pf_render;
+    p_vout->pf_display    = f.pf_display;
+#undef f
+
     /* Create thread and set locks */
     vlc_mutex_init( &p_vout->picture_lock );
     vlc_mutex_init( &p_vout->subpicture_lock );
@@ -251,7 +249,6 @@ void vout_DestroyThread( vout_thread_t *p_vout, int *pi_status )
 static int InitThread( vout_thread_t *p_vout )
 {
     int i, i_pgcd;
-    probedata_t data;
 
     /* Update status */
     *p_vout->pi_status = THREAD_START;
@@ -328,10 +325,8 @@ static int InitThread( vout_thread_t *p_vout )
         p_vout->b_direct = 0;
 
         /* Choose the best module */
-        data.chroma.p_render = &p_vout->render;
-        data.chroma.p_output = &p_vout->output;
         p_vout->chroma.p_module
-            = module_Need( MODULE_CAPABILITY_CHROMA, NULL, &data );
+            = module_Need( MODULE_CAPABILITY_CHROMA, NULL, (void *)p_vout );
 
         if( p_vout->chroma.p_module == NULL )
         {
@@ -404,14 +399,6 @@ static void RunThread( vout_thread_t *p_vout)
 
     subpicture_t *  p_subpic;                          /* subpicture pointer */
 
-    /* Create and initialize system-dependant method - this function issues its
-     * own error messages */
-    if( p_vout->pf_create( p_vout ) )
-    {
-        DestroyThread( p_vout, THREAD_ERROR );
-        return;
-    }
-
     /*
      * Initialize thread
      */
index f96cabbe266837c1cdfb5cba28ac0407d535c958..1aa97fa8f83a79690807dad4be39c65c75dff42a 100644 (file)
@@ -2,7 +2,7 @@
  * vout_pictures.c : picture management functions
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: vout_pictures.c,v 1.14 2002/02/13 22:10:40 sam Exp $
+ * $Id: vout_pictures.c,v 1.15 2002/02/15 13:32:54 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -367,15 +367,15 @@ picture_t * vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_pic,
 
     /* Picture is not in a direct buffer, and needs to be converted to
      * another size/chroma. Then the subtitles need to be rendered as
-     * well. */
-
-    /* This usually means software YUV, or hardware YUV with a
+     * well. This usually means software YUV, or hardware YUV with a
      * different chroma. */
 
-    /* We render subtitles and convert image to the first direct buffer */
-    vout_RenderSubPictures( p_vout, p_pic, p_subpic );
+    /* Convert image to the first direct buffer */
     p_vout->chroma.pf_convert( p_vout, p_pic, &p_vout->p_picture[0] );
 
+    /* Render subpictures on the first direct buffer */
+    vout_RenderSubPictures( p_vout, &p_vout->p_picture[0], p_subpic );
+
     return &p_vout->p_picture[0];
 }