Changeset e13aed00cf01eefa9285cb030486ee0118ea0425

Show
Ignore:
Timestamp:
07/30/00 03:59:50 (8 years ago)
Author:
Sam Hocevar <sam@videolan.org>
git-committer:
Sam Hocevar <sam@videolan.org> 964922390 +0000
git-parent:

[4af2fd109ed63515a163452f8acdeb9bbe7194ea]

git-author:
Sam Hocevar <sam@videolan.org> 964922390 +0000
Message:

. autod�tection des plugins
. les aliases "gvlc" "fbvlc" "ggivlc" fonctionne comme il faut

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Makefile.in

    rab70628 re13aed0  
    212212 
    213213misc_obj =          misc/mtime.o \ 
     214                        misc/tests.o \ 
    214215                        misc/rsc_files.o \ 
    215216                        misc/netutils.o \ 
  • README

    r57e189e re13aed0  
    4646 
    4747You can also try the OpenDVD site at http://www.opendvd.org/ or the 
    48 the LiVid project at http://www.linuxvideo.org/. They have lots of 
     48the LiViD project at http://www.linuxvideo.org/. They have lots of 
    4949information, too. 
    5050 
  • include/config.h.in

    r69da262 re13aed0  
    273273#define VOUT_METHOD_VAR                 "vlc_vout" 
    274274 
     275/* Environment variable containing the YUV method */ 
     276#define YUV_METHOD_VAR                  "vlc_yuv" 
     277 
    275278/* The fallback method */ 
    276279#define VOUT_DEFAULT_METHOD             "x11" 
  • include/main.h

    r57e189e re13aed0  
    3939    char **                ppsz_argv;              /* command line arguments */ 
    4040    char **                ppsz_env;                /* environment variables */ 
     41    char *                 psz_arg0;         /* program name (whithout path) */ 
    4142 
    4243    /* Generic settings */ 
  • include/plugins.h

    r57e189e re13aed0  
    4444    void *      intf_GetPlugin; 
    4545    void *      yuv_GetPlugin; 
     46 
     47    int         i_score; 
    4648} plugin_info_t; 
    4749 
  • plugins/beos/aout_beos.cpp

    r3cbfc06 re13aed0  
    7676 
    7777/***************************************************************************** 
    78  * aout_SysOpen: opens a BPushGameSound 
    79  *****************************************************************************/ 
    80 int aout_SysOpen( aout_thread_t *p_aout ) 
     78 * aout_BeOpen: opens a BPushGameSound 
     79 *****************************************************************************/ 
     80int aout_BeOpen( aout_thread_t *p_aout ) 
    8181{ 
    8282    /* Allocate structure */ 
     
    137137} 
    138138/***************************************************************************** 
    139  * aout_SysReset: resets the dsp 
    140  *****************************************************************************/ 
    141 int aout_SysReset( aout_thread_t *p_aout ) 
    142 { 
    143     return( 0 ); 
    144 } 
    145  
    146 /***************************************************************************** 
    147  * aout_SysSetFormat: sets the dsp output format 
    148  *****************************************************************************/ 
    149 int aout_SysSetFormat( aout_thread_t *p_aout ) 
    150 { 
    151     return( 0 ); 
    152 } 
    153  
    154 /***************************************************************************** 
    155  * aout_SysSetChannels: sets the dsp's stereo or mono mode 
    156  *****************************************************************************/ 
    157 int aout_SysSetChannels( aout_thread_t *p_aout ) 
    158 { 
    159     return( 0 ); 
    160 } 
    161  
    162 /***************************************************************************** 
    163  * aout_SysSetRate: sets the dsp's audio output rate 
    164  *****************************************************************************/ 
    165 int aout_SysSetRate( aout_thread_t *p_aout ) 
    166 { 
    167     return( 0 ); 
    168 } 
    169  
    170 /***************************************************************************** 
    171  * aout_SysGetBufInfo: buffer status query 
    172  *****************************************************************************/ 
    173 long aout_SysGetBufInfo( aout_thread_t *p_aout, long l_buffer_limit ) 
     139 * aout_BeReset: resets the dsp 
     140 *****************************************************************************/ 
     141int aout_BeReset( aout_thread_t *p_aout ) 
     142{ 
     143    return( 0 ); 
     144} 
     145 
     146/***************************************************************************** 
     147 * aout_BeSetFormat: sets the dsp output format 
     148 *****************************************************************************/ 
     149int aout_BeSetFormat( aout_thread_t *p_aout ) 
     150{ 
     151    return( 0 ); 
     152} 
     153 
     154/***************************************************************************** 
     155 * aout_BeSetChannels: sets the dsp's stereo or mono mode 
     156 *****************************************************************************/ 
     157int aout_BeSetChannels( aout_thread_t *p_aout ) 
     158{ 
     159    return( 0 ); 
     160} 
     161 
     162/***************************************************************************** 
     163 * aout_BeSetRate: sets the dsp's audio output rate 
     164 *****************************************************************************/ 
     165int aout_BeSetRate( aout_thread_t *p_aout ) 
     166{ 
     167    return( 0 ); 
     168} 
     169 
     170/***************************************************************************** 
     171 * aout_BeGetBufInfo: buffer status query 
     172 *****************************************************************************/ 
     173long aout_BeGetBufInfo( aout_thread_t *p_aout, long l_buffer_limit ) 
    174174{ 
    175175 
     
    190190 
    191191/***************************************************************************** 
    192  * aout_SysPlaySamples: plays a sound samples buffer 
     192 * aout_BePlaySamples: plays a sound samples buffer 
    193193 ***************************************************************************** 
    194194 * This function writes a buffer of i_length bytes in the dsp 
    195195 *****************************************************************************/ 
    196 void aout_SysPlaySamples( aout_thread_t *p_aout, byte_t *buffer, int i_size ) 
     196void aout_BePlaySamples( aout_thread_t *p_aout, byte_t *buffer, int i_size ) 
    197197{ 
    198198    long i_newbuf_pos; 
     
    224224 
    225225/***************************************************************************** 
    226  * aout_SysClose: closes the dsp audio device 
    227  *****************************************************************************/ 
    228 void aout_SysClose( aout_thread_t *p_aout ) 
     226 * aout_BeClose: closes the dsp audio device 
     227 *****************************************************************************/ 
     228void aout_BeClose( aout_thread_t *p_aout ) 
    229229{ 
    230230    p_aout->p_sys->p_sound->UnlockCyclic(); 
  • plugins/beos/beos.cpp

    rab70628 re13aed0  
    4141#include "video_output.h" 
    4242 
    43 #include "plugins_export.h" 
    44  
    4543/***************************************************************************** 
    4644 * Exported prototypes 
    4745 *****************************************************************************/ 
    48 void aout_GetPlugin( p_aout_thread_t p_aout ); 
    49 void vout_GetPlugin( p_vout_thread_t p_vout ); 
    50 void intf_GetPlugin( p_intf_thread_t p_intf ); 
     46static void aout_GetPlugin( p_aout_thread_t p_aout ); 
     47static void vout_GetPlugin( p_vout_thread_t p_vout ); 
     48static void intf_GetPlugin( p_intf_thread_t p_intf ); 
     49 
     50/* Audio output */ 
     51int     aout_BeOpen         ( aout_thread_t *p_aout ); 
     52int     aout_BeReset        ( aout_thread_t *p_aout ); 
     53int     aout_BeSetFormat    ( aout_thread_t *p_aout ); 
     54int     aout_BeSetChannels  ( aout_thread_t *p_aout ); 
     55int     aout_BeSetRate      ( aout_thread_t *p_aout ); 
     56long    aout_BeGetBufInfo   ( aout_thread_t *p_aout, long l_buffer_info ); 
     57void    aout_BePlaySamples  ( aout_thread_t *p_aout, byte_t *buffer, 
     58                              int i_size ); 
     59void    aout_BeClose        ( aout_thread_t *p_aout ); 
     60 
     61/* Video output */ 
     62int     vout_BeCreate       ( vout_thread_t *p_vout, char *psz_display, 
     63                              int i_root_window, void *p_data ); 
     64int     vout_BeInit         ( p_vout_thread_t p_vout ); 
     65void    vout_BeEnd          ( p_vout_thread_t p_vout ); 
     66void    vout_BeDestroy      ( p_vout_thread_t p_vout ); 
     67int     vout_BeManage       ( p_vout_thread_t p_vout ); 
     68void    vout_BeDisplay      ( p_vout_thread_t p_vout ); 
     69void    vout_BeSetPalette   ( p_vout_thread_t p_vout, 
     70                              u16 *red, u16 *green, u16 *blue, u16 *transp ); 
     71 
     72/* Interface */ 
     73int     intf_BeCreate       ( p_intf_thread_t p_intf ); 
     74void    intf_BeDestroy      ( p_intf_thread_t p_intf ); 
     75void    intf_BeManage       ( p_intf_thread_t p_intf ); 
    5176 
    5277/***************************************************************************** 
     
    6691    p_info->yuv_GetPlugin = NULL; 
    6792 
     93    /* the beos plugin always works under BeOS :) */ 
     94    p_info->i_score = 0x800; 
     95 
    6896    return( p_info ); 
    69 } 
    70  
    71 /***************************************************************************** 
    72  * Test: tests if the plugin can be launched 
    73  *****************************************************************************/ 
    74 int Test( void ) 
    75 { 
    76     /* the BeOS plugin always works under BeOS :) */ 
    77     return( 1 ); 
    7897} 
    7998 
     
    82101 *****************************************************************************/ 
    83102 
    84 void aout_GetPlugin( p_aout_thread_t p_aout ) 
     103static void aout_GetPlugin( p_aout_thread_t p_aout ) 
    85104{ 
    86     p_aout->p_sys_open        = aout_SysOpen; 
    87     p_aout->p_sys_reset       = aout_SysReset; 
    88     p_aout->p_sys_setformat   = aout_SysSetFormat; 
    89     p_aout->p_sys_setchannels = aout_SysSetChannels; 
    90     p_aout->p_sys_setrate     = aout_SysSetRate; 
    91     p_aout->p_sys_getbufinfo  = aout_SysGetBufInfo; 
    92     p_aout->p_sys_playsamples = aout_SysPlaySamples; 
    93     p_aout->p_sys_close       = aout_SysClose; 
     105    p_aout->p_sys_open        = aout_BeOpen; 
     106    p_aout->p_sys_reset       = aout_BeReset; 
     107    p_aout->p_sys_setformat   = aout_BeSetFormat; 
     108    p_aout->p_sys_setchannels = aout_BeSetChannels; 
     109    p_aout->p_sys_setrate     = aout_BeSetRate; 
     110    p_aout->p_sys_getbufinfo  = aout_BeGetBufInfo; 
     111    p_aout->p_sys_playsamples = aout_BePlaySamples; 
     112    p_aout->p_sys_close       = aout_BeClose; 
    94113} 
    95114 
    96 void vout_GetPlugin( p_vout_thread_t p_vout ) 
     115static void vout_GetPlugin( p_vout_thread_t p_vout ) 
    97116{ 
    98     p_vout->p_sys_create  = vout_SysCreate; 
    99     p_vout->p_sys_init    = vout_SysInit; 
    100     p_vout->p_sys_end     = vout_SysEnd; 
    101     p_vout->p_sys_destroy = vout_SysDestroy; 
    102     p_vout->p_sys_manage  = vout_SysManage; 
    103     p_vout->p_sys_display = vout_SysDisplay; 
     117    p_vout->p_sys_create  = vout_BeCreate; 
     118    p_vout->p_sys_init    = vout_BeInit; 
     119    p_vout->p_sys_end     = vout_BeEnd; 
     120    p_vout->p_sys_destroy = vout_BeDestroy; 
     121    p_vout->p_sys_manage  = vout_BeManage; 
     122    p_vout->p_sys_display = vout_BeDisplay; 
    104123} 
    105124 
    106 void intf_GetPlugin( p_intf_thread_t p_intf ) 
     125static void intf_GetPlugin( p_intf_thread_t p_intf ) 
    107126{ 
    108     p_intf->p_sys_create  = intf_SysCreate; 
    109     p_intf->p_sys_destroy = intf_SysDestroy; 
    110     p_intf->p_sys_manage  = intf_SysManage; 
     127    p_intf->p_sys_create  = intf_BeCreate; 
     128    p_intf->p_sys_destroy = intf_BeDestroy; 
     129    p_intf->p_sys_manage  = intf_BeManage; 
    111130} 
    112131 
  • plugins/beos/intf_beos.cpp

    r3cbfc06 re13aed0  
    126126 
    127127/***************************************************************************** 
    128  * intf_SysCreate: initialize dummy interface 
    129  *****************************************************************************/ 
    130 int intf_SysCreate( intf_thread_t *p_intf ) 
     128 * intf_BeCreate: initialize dummy interface 
     129 *****************************************************************************/ 
     130int intf_BeCreate( intf_thread_t *p_intf ) 
    131131{ 
    132132    /* Allocate instance and initialize some members */ 
     
    163163 
    164164/***************************************************************************** 
    165  * intf_SysDestroy: destroy dummy interface 
    166  *****************************************************************************/ 
    167 void intf_SysDestroy( intf_thread_t *p_intf ) 
     165 * intf_BeDestroy: destroy dummy interface 
     166 *****************************************************************************/ 
     167void intf_BeDestroy( intf_thread_t *p_intf ) 
    168168{ 
    169169    /* Close input thread, if any (blocking) */ 
     
    189189 
    190190/***************************************************************************** 
    191  * intf_SysManage: event loop 
    192  *****************************************************************************/ 
    193 void intf_SysManage( intf_thread_t *p_intf ) 
     191 * intf_BeManage: event loop 
     192 *****************************************************************************/ 
     193void intf_BeManage( intf_thread_t *p_intf ) 
    194194{ 
    195195    if( p_intf->p_sys->i_key != -1 ) 
  • plugins/beos/vout_beos.cpp

    r3cbfc06 re13aed0  
    341341 
    342342/***************************************************************************** 
    343  * vout_SysCreate: allocates dummy video thread output method 
     343 * vout_BeCreate: allocates dummy video thread output method 
    344344 ***************************************************************************** 
    345345 * This function allocates and initializes a dummy vout method. 
    346346 *****************************************************************************/ 
    347 int vout_SysCreate( vout_thread_t *p_vout, char *psz_display, 
     347int vout_BeCreate( vout_thread_t *p_vout, char *psz_display, 
    348348                    int i_root_window, void *p_data ) 
    349349{ 
     
    372372 
    373373/***************************************************************************** 
    374  * vout_SysInit: initialize dummy video thread output method 
    375  *****************************************************************************/ 
    376 int vout_SysInit( vout_thread_t *p_vout ) 
     374 * vout_BeInit: initialize dummy video thread output method 
     375 *****************************************************************************/ 
     376int vout_BeInit( vout_thread_t *p_vout ) 
    377377{ 
    378378    VideoWindow * p_win = p_vout->p_sys->p_window; 
     
    407407 
    408408/***************************************************************************** 
    409  * vout_SysEnd: terminate dummy video thread output method 
    410  *****************************************************************************/ 
    411 void vout_SysEnd( vout_thread_t *p_vout ) 
     409 * vout_BeEnd: terminate dummy video thread output method 
     410 *****************************************************************************/ 
     411void vout_BeEnd( vout_thread_t *p_vout ) 
    412412{ 
    413413   VideoWindow * p_win = p_vout->p_sys->p_window; 
     
    423423 
    424424/***************************************************************************** 
    425  * vout_SysDestroy: destroy dummy video thread output method 
     425 * vout_BeDestroy: destroy dummy video thread output method 
    426426 ***************************************************************************** 
    427427 * Terminate an output method created by DummyCreateOutputMethod 
    428428 *****************************************************************************/ 
    429 void vout_SysDestroy( vout_thread_t *p_vout ) 
     429void vout_BeDestroy( vout_thread_t *p_vout ) 
    430430{ 
    431431    BeosCloseDisplay( p_vout ); 
     
    435435 
    436436/***************************************************************************** 
    437  * vout_SysManage: handle dummy events 
     437 * vout_BeManage: handle dummy events 
    438438 ***************************************************************************** 
    439439 * This function should be called regularly by video output thread. It manages 
    440440 * console events. It returns a non null value on error. 
    441441 *****************************************************************************/ 
    442 int vout_SysManage( vout_thread_t *p_vout ) 
     442int vout_BeManage( vout_thread_t *p_vout ) 
    443443{ 
    444444    if( p_vout->i_changes & VOUT_SIZE_CHANGE ) 
     
    469469 
    470470/***************************************************************************** 
    471  * vout_SysDisplay: displays previously rendered output 
     471 * vout_BeDisplay: displays previously rendered output 
    472472 ***************************************************************************** 
    473473 * This function send the currently rendered image to dummy image, waits until 
    474474 * it is displayed and switch the two rendering buffers, preparing next frame. 
    475475 *****************************************************************************/ 
    476 void vout_SysDisplay( vout_thread_t *p_vout ) 
     476void vout_BeDisplay( vout_thread_t *p_vout ) 
    477477{ 
    478478    VideoWindow * p_win = p_vout->p_sys->p_window; 
  • plugins/dsp/aout_dsp.c

    r3cbfc06 re13aed0  
    2323/* TODO: 
    2424 * 
    25  * - an aout_sysGetFormats() function 
     25 * - an aout_DspGetFormats() function 
    2626 * - dsp inline/static 
    2727 * - make this library portable (see mpg123) 
    28  * - macroify aout_sysPlaySamples &/| aout_sysGetBufInfo ? 
     28 * - macroify aout_DspPlaySamples &/| aout_DspGetBufInfo ? 
    2929 * 
    3030 */ 
     
    7575 
    7676/***************************************************************************** 
    77  * aout_SysOpen: opens the audio device (the digital sound processor) 
     77 * aout_DspOpen: opens the audio device (the digital sound processor) 
    7878 ***************************************************************************** 
    7979 * - This function opens the dsp as an usual non-blocking write-only file, and 
    8080 *   modifies the p_aout->p_sys->i_fd with the file's descriptor. 
    8181 *****************************************************************************/ 
    82 int aout_SysOpen( aout_thread_t *p_aout ) 
     82int aout_DspOpen( aout_thread_t *p_aout ) 
    8383{ 
    8484    /* Allocate structure */ 
     
    107107 
    108108/***************************************************************************** 
    109  * aout_SysReset: resets the dsp 
    110  *****************************************************************************/ 
    111 int aout_SysReset( aout_thread_t *p_aout ) 
     109 * aout_DspReset: resets the dsp 
     110 *****************************************************************************/ 
     111int aout_DspReset( aout_thread_t *p_aout ) 
    112112{ 
    113113    if ( ioctl( p_aout->i_fd, SNDCTL_DSP_RESET, NULL ) < 0 ) 
     
    121121 
    122122/***************************************************************************** 
    123  * aout_SysSetFormat: sets the dsp output format 
     123 * aout_DspSetFormat: sets the dsp output format 
    124124 ***************************************************************************** 
    125125 * This functions tries to initialize the dsp output format with the value 
     
    127127 * default value returned by ioctl is set. 
    128128 *****************************************************************************/ 
    129 int aout_SysSetFormat( aout_thread_t *p_aout ) 
     129int aout_DspSetFormat( aout_thread_t *p_aout ) 
    130130{ 
    131131    int i_format; 
     
    148148 
    149149/***************************************************************************** 
    150  * aout_SysSetChannels: sets the dsp's stereo or mono mode 
     150 * aout_DspSetChannels: sets the dsp's stereo or mono mode 
    151151 ***************************************************************************** 
    152152 * This function acts just like the previous one... 
    153153 *****************************************************************************/ 
    154 int aout_SysSetChannels( aout_thread_t *p_aout ) 
     154int aout_DspSetChannels( aout_thread_t *p_aout ) 
    155155{ 
    156156    boolean_t b_stereo = p_aout->b_stereo; 
     
    173173 
    174174/***************************************************************************** 
    175  * aout_SysSetRate: sets the dsp's audio output rate 
     175 * aout_DspSetRate: sets the dsp's audio output rate 
    176176 ***************************************************************************** 
    177177 * This function tries to initialize the dsp with the rate contained in the 
     
    179179 * the value returned by ioctl... 
    180180 *****************************************************************************/ 
    181 int aout_SysSetRate( aout_thread_t *p_aout ) 
     181int aout_DspSetRate( aout_thread_t *p_aout ) 
    182182{ 
    183183    long l_rate; 
     
    200200 
    201201/***************************************************************************** 
    202  * aout_SysGetBufInfo: buffer status query 
     202 * aout_DspGetBufInfo: buffer status query 
    203203 ***************************************************************************** 
    204204 * This function fills in the audio_buf_info structure : 
     
    210210 * Note! 'bytes' could be more than fragments*fragsize 
    211211 *****************************************************************************/ 
    212 long aout_SysGetBufInfo( aout_thread_t *p_aout, long l_buffer_limit ) 
     212long aout_DspGetBufInfo( aout_thread_t *p_aout, long l_buffer_limit ) 
    213213{ 
    214214    ioctl( p_aout->i_fd, SNDCTL_DSP_GETOSPACE, &p_aout->p_sys->audio_buf ); 
     
    221221 
    222222/***************************************************************************** 
    223  * aout_SysPlaySamples: plays a sound samples buffer 
     223 * aout_DspPlaySamples: plays a sound samples buffer 
    224224 ***************************************************************************** 
    225225 * This function writes a buffer of i_length bytes in the dsp 
    226226 *****************************************************************************/ 
    227 void aout_SysPlaySamples( aout_thread_t *p_aout, byte_t *buffer, int i_size ) 
     227void aout_DspPlaySamples( aout_thread_t *p_aout, byte_t *buffer, int i_size ) 
    228228{ 
    229229    if( p_aout->b_active ) 
     
    234234 
    235235/***************************************************************************** 
    236  * aout_SysClose: closes the dsp audio device 
    237  *****************************************************************************/ 
    238 void aout_SysClose( aout_thread_t *p_aout ) 
     236 * aout_DspClose: closes the dsp audio device 
     237 *****************************************************************************/ 
     238void aout_DspClose( aout_thread_t *p_aout ) 
    239239{ 
    240240    close( p_aout->i_fd ); 
  • plugins/dsp/dsp.c

    r57e189e re13aed0  
    2626#include "defs.h" 
    2727 
     28#include <sys/types.h> 
     29#include <sys/stat.h> 
     30#include <fcntl.h> 
    2831#include <stdlib.h>                                      /* malloc(), free() */ 
     32#include <unistd.h>                                               /* close() */ 
    2933 
    3034#include "config.h" 
     
    3236#include "threads.h" 
    3337#include "mtime.h" 
     38#include "tests.h" 
    3439#include "plugins.h" 
    3540 
     
    3944#include "video_output.h" 
    4045 
    41 #include "plugins_export.h" 
     46#include "main.h" 
    4247 
    4348/***************************************************************************** 
    4449 * Exported prototypes 
    4550 *****************************************************************************/ 
    46 void aout_GetPlugin( p_aout_thread_t p_aout ); 
     51static void aout_GetPlugin( p_aout_thread_t p_aout ); 
     52 
     53/* Audio output */ 
     54int     aout_DspOpen         ( aout_thread_t *p_aout ); 
     55int     aout_DspReset        ( aout_thread_t *p_aout ); 
     56int     aout_DspSetFormat    ( aout_thread_t *p_aout ); 
     57int     aout_DspSetChannels  ( aout_thread_t *p_aout ); 
     58int     aout_DspSetRate      ( aout_thread_t *p_aout ); 
     59long    aout_DspGetBufInfo   ( aout_thread_t *p_aout, long l_buffer_info ); 
     60void    aout_DspPlaySamples  ( aout_thread_t *p_aout, byte_t *buffer, 
     61                               int i_size ); 
     62void    aout_DspClose        ( aout_thread_t *p_aout ); 
    4763 
    4864/***************************************************************************** 
     
    5167plugin_info_t * GetConfig( void ) 
    5268{ 
     69    int i_fd; 
    5370    plugin_info_t * p_info = (plugin_info_t *) malloc( sizeof(plugin_info_t) ); 
    5471 
     
    6279    p_info->yuv_GetPlugin  = NULL; 
    6380 
     81    /* Test if the device can be opened */ 
     82    if ( (i_fd = open( main_GetPszVariable( AOUT_DSP_VAR, AOUT_DSP_DEFAULT ), 
     83                       O_WRONLY )) < 0 ) 
     84    { 
     85        p_info->i_score = 0; 
     86    } 
     87    else 
     88    { 
     89        close( i_fd ); 
     90        p_info->i_score = 0x100; 
     91    } 
     92 
     93    /* If this plugin was requested, score it higher */ 
     94    if( TestMethod( AOUT_METHOD_VAR, "dsp" ) ) 
     95    { 
     96        p_info->i_score += 0x200; 
     97    } 
     98 
    6499    return( p_info ); 
    65 } 
    66  
    67 /***************************************************************************** 
    68  * Test: tests if the plugin can be launched 
    69  *****************************************************************************/ 
    70 int Test( void ) 
    71 { 
    72     /* TODO: check if suitable */ 
    73     return( 1 ); 
    74100} 
    75101 
     
    78104 *****************************************************************************/ 
    79105 
    80 void aout_GetPlugin( p_aout_thread_t p_aout ) 
     106static void aout_GetPlugin( p_aout_thread_t p_aout ) 
    81107{ 
    82     p_aout->p_sys_open        = aout_SysOpen; 
    83     p_aout->p_sys_reset       = aout_SysReset; 
    84     p_aout->p_sys_setformat   = aout_SysSetFormat; 
    85     p_aout->p_sys_setchannels = aout_SysSetChannels; 
    86     p_aout->p_sys_setrate     = aout_SysSetRate; 
    87     p_aout->p_sys_getbufinfo  = aout_SysGetBufInfo; 
    88     p_aout->p_sys_playsamples = aout_SysPlaySamples; 
    89     p_aout->p_sys_close       = aout_SysClose; 
     108    p_aout->p_sys_open        = aout_DspOpen; 
     109    p_aout->p_sys_reset       = aout_DspReset; 
     110    p_aout->p_sys_setformat   = aout_DspSetFormat; 
     111    p_aout->p_sys_setchannels = aout_DspSetChannels; 
     112    p_aout->p_sys_setrate     = aout_DspSetRate; 
     113    p_aout->p_sys_getbufinfo  = aout_DspGetBufInfo; 
     114    p_aout->p_sys_playsamples = aout_DspPlaySamples; 
     115    p_aout->p_sys_close       = aout_DspClose; 
    90116} 
    91117 
  • plugins/dummy/aout_dummy.c

    r3cbfc06 re13aed0  
    4949 
    5050/***************************************************************************** 
    51  * aout_SysOpen: opens a dummy audio device 
     51 * aout_DummyOpen: opens a dummy audio device 
    5252 *****************************************************************************/ 
    53 int aout_SysOpen( aout_thread_t *p_aout ) 
     53int aout_DummyOpen( aout_thread_t *p_aout ) 
    5454{ 
    5555    /* Initialize some variables */ 
     
    6262 
    6363/***************************************************************************** 
    64  * aout_SysReset: fake reset 
     64 * aout_DummyReset: fake reset 
    6565 *****************************************************************************/ 
    66 int aout_SysReset( aout_thread_t *p_aout ) 
     66int aout_DummyReset( aout_thread_t *p_aout ) 
    6767{ 
    6868    return( 0 ); 
     
    7070 
    7171/***************************************************************************** 
    72  * aout_SysSetFormat: pretends to set the dsp output format 
     72 * aout_DummySetFormat: pretends to set the dsp output format 
    7373 *****************************************************************************/ 
    74 int aout_SysSetFormat( aout_thread_t *p_aout ) 
     74int aout_DummySetFormat( aout_thread_t *p_aout ) 
    7575{ 
    7676    return( 0 ); 
     
    7878 
    7979/***************************************************************************** 
    80  * aout_SysSetChannels: pretends to set stereo or mono mode 
     80 * aout_DummySetChannels: pretends to set stereo or mono mode 
    8181 *****************************************************************************/ 
    82 int aout_SysSetChannels( aout_thread_t *p_aout ) 
     82int aout_DummySetChannels( aout_thread_t *p_aout ) 
    8383{ 
    8484    return( 0 ); 
     
    8686 
    8787/***************************************************************************** 
    88  * aout_SysSetRate: pretends to set audio output rate 
     88 * aout_DummySetRate: pretends to set audio output rate 
    8989 *****************************************************************************/ 
    90 int aout_SysSetRate( aout_thread_t *p_aout ) 
     90int aout_DummySetRate( aout_thread_t *p_aout ) 
    9191{ 
    9292    return( 0 ); 
     
    9494 
    9595/***************************************************************************** 
    96  * aout_SysGetBufInfo: returns available bytes in buffer 
     96 * aout_DummyGetBufInfo: returns available bytes in buffer 
    9797 *****************************************************************************/ 
    98 long aout_SysGetBufInfo( aout_thread_t *p_aout, long l_buffer_limit ) 
     98long aout_DummyGetBufInfo( aout_thread_t *p_aout, long l_buffer_limit ) 
    9999{ 
    100100    return( 2 * l_buffer_limit );               /* value big enough to sleep */ 
     
    102102 
    103103/***************************************************************************** 
    104  * aout_SysPlaySamples: pretends to play a sound 
     104 * aout_DummyPlaySamples: pretends to play a sound 
    105105 *****************************************************************************/ 
    106 void aout_SysPlaySamples( aout_thread_t *p_aout, byte_t *buffer, int i_size ) 
     106void aout_DummyPlaySamples( aout_thread_t *p_aout, byte_t *buffer, int i_size ) 
    107107{ 
    108108    ; 
     
    110110 
    111111/***************************************************************************** 
    112  * aout_SysClose: closes the dummy audio device 
     112 * aout_DummyClose: closes the dummy audio device 
    113113 *****************************************************************************/ 
    114 void aout_SysClose( aout_thread_t *p_aout ) 
     114void aout_DummyClose( aout_thread_t *p_aout ) 
    115115{ 
    116116    ; 
  • plugins/dummy/dummy.c

    r57e189e re13aed0  
    3232#include "threads.h" 
    3333#include "mtime.h" 
     34#include "tests.h" 
    3435#include "plugins.h" 
    3536 
     
    3940#include "video_output.h" 
    4041 
    41 #include "plugins_export.h" 
    42  
    4342/***************************************************************************** 
    4443 * Exported prototypes 
    4544 *****************************************************************************/ 
    46 void aout_GetPlugin( p_aout_thread_t p_aout ); 
    47 void vout_GetPlugin( p_vout_thread_t p_vout ); 
    48 void intf_GetPlugin( p_intf_thread_t p_intf ); 
     45static void aout_GetPlugin( p_aout_thread_t p_aout ); 
     46static void vout_GetPlugin( p_vout_thread_t p_vout ); 
     47static void intf_GetPlugin( p_intf_thread_t p_intf ); 
     48 
     49/* Audio output */ 
     50int     aout_DummyOpen         ( aout_thread_t *p_aout ); 
     51int     aout_DummyReset        ( aout_thread_t *p_aout ); 
     52int     aout_DummySetFormat    ( aout_thread_t *p_aout ); 
     53int     aout_DummySetChannels  ( aout_thread_t *p_aout ); 
     54int     aout_DummySetRate      ( aout_thread_t *p_aout ); 
     55long    aout_DummyGetBufInfo   ( aout_thread_t *p_aout, long l_buffer_info ); 
     56void    aout_DummyPlaySamples  ( aout_thread_t *p_aout, byte_t *buffer, 
     57                                 int i_size ); 
     58void    aout_DummyClose        ( aout_thread_t *p_aout ); 
     59 
     60/* Video output */ 
     61int     vout_DummyCreate       ( vout_thread_t *p_vout, char *psz_display, 
     62                                 int i_root_window, void *p_data ); 
     63int     vout_DummyInit         ( p_vout_thread_t p_vout ); 
     64void    vout_DummyEnd          ( p_vout_thread_t p_vout ); 
     65void    vout_DummyDestroy      ( p_vout_thread_t p_vout ); 
     66int     vout_DummyManage       ( p_vout_thread_t p_vout ); 
     67void    vout_DummyDisplay      ( p_vout_thread_t p_vout ); 
     68void    vout_DummySetPalette   ( p_vout_thread_t p_vout, 
     69                                 u16 *red, u16 *green, u16 *blue, u16 *transp ); 
     70 
     71/* Interface */ 
     72int     intf_DummyCreate       ( p_intf_thread_t p_intf ); 
     73void    intf_DummyDestroy      ( p_intf_thread_t p_intf ); 
     74void    intf_DummyManage       ( p_intf_thread_t p_intf ); 
    4975 
    5076/***************************************************************************** 
     
    6490    p_info->yuv_GetPlugin  = NULL; 
    6591 
     92    /* The dummy plugin always works, but should have low priority */ 
     93    p_info->i_score = 0x1; 
     94 
     95    /* If this plugin was requested, score it higher */ 
     96    if( TestMethod( VOUT_METHOD_VAR, "dummy" ) ) 
     97    { 
     98        p_info->i_score += 0x200; 
     99    } 
     100 
     101    /* If this plugin was requested, score it higher */ 
     102    if( TestMethod( AOUT_METHOD_VAR, "dummy" ) ) 
     103    { 
     104        p_info->i_score += 0x200; 
     105    } 
     106 
     107 
    66108    return( p_info ); 
    67 } 
    68  
    69 /***************************************************************************** 
    70  * Test: tests if the plugin can be launched 
    71  *****************************************************************************/ 
    72 int Test( void ) 
    73 { 
    74     /* the dummy plugin always works */ 
    75     return( 1 ); 
    76109} 
    77110 
     
    80113 *****************************************************************************/ 
    81114 
    82 void aout_GetPlugin( p_aout_thread_t p_aout ) 
     115static void aout_GetPlugin( p_aout_thread_t p_aout ) 
    83116{ 
    84     p_aout->p_sys_open        = aout_SysOpen; 
    85     p_aout->p_sys_reset       = aout_SysReset; 
    86     p_aout->p_sys_setformat   = aout_SysSetFormat; 
    87     p_aout->p_sys_setchannels = aout_SysSetChannels; 
    88     p_aout->p_sys_setrate     = aout_SysSetRate; 
    89     p_aout->p_sys_getbufinfo  = aout_SysGetBufInfo; 
    90     p_aout->p_sys_playsamples = aout_SysPlaySamples; 
    91     p_aout->p_sys_close       = aout_SysClose; 
     117    p_aout->p_sys_open        = aout_DummyOpen; 
     118    p_aout->p_sys_reset       = aout_DummyReset; 
     119    p_aout->p_sys_setformat   = aout_DummySetFormat; 
     120    p_aout->p_sys_setchannels = aout_DummySetChannels; 
     121    p_aout->p_sys_setrate     = aout_DummySetRate; 
     122    p_aout->p_sys_getbufinfo  = aout_DummyGetBufInfo; 
     123    p_aout->p_sys_playsamples = aout_DummyPlaySamples; 
     124    p_aout->p_sys_close       = aout_DummyClose; 
    92125} 
    93126 
    94 void vout_GetPlugin( p_vout_thread_t p_vout ) 
     127static void vout_GetPlugin( p_vout_thread_t p_vout ) 
    95128{ 
    96     p_vout->p_sys_create  = vout_SysCreate; 
    97     p_vout->p_sys_init    = vout_SysInit; 
    98     p_vout->p_sys_end     = vout_SysEnd; 
    99     p_vout->p_sys_destroy = vout_SysDestroy; 
    100     p_vout->p_sys_manage  = vout_SysManage; 
    101     p_vout->