Changeset e13aed00cf01eefa9285cb030486ee0118ea0425
- Timestamp:
- 07/30/00 03:59:50 (8 years ago)
- git-parent:
- Files:
-
- Makefile.in (modified) (1 diff)
- README (modified) (1 diff)
- include/config.h.in (modified) (1 diff)
- include/main.h (modified) (1 diff)
- include/plugins.h (modified) (1 diff)
- include/plugins_export.h (deleted)
- include/tests.h (added)
- plugins/beos/aout_beos.cpp (modified) (4 diffs)
- plugins/beos/beos.cpp (modified) (3 diffs)
- plugins/beos/intf_beos.cpp (modified) (3 diffs)
- plugins/beos/vout_beos.cpp (modified) (6 diffs)
- plugins/dsp/aout_dsp.c (modified) (12 diffs)
- plugins/dsp/dsp.c (modified) (6 diffs)
- plugins/dummy/aout_dummy.c (modified) (8 diffs)
- plugins/dummy/dummy.c (modified) (4 diffs)
- plugins/dummy/intf_dummy.c (modified) (3 diffs)
- plugins/dummy/vout_dummy.c (modified) (6 diffs)
- plugins/esd/aout_esd.c (modified) (9 diffs)
- plugins/esd/esd.c (modified) (4 diffs)
- plugins/fb/fb.c (modified) (6 diffs)
- plugins/fb/intf_fb.c (modified) (3 diffs)
- plugins/fb/vout_fb.c (modified) (9 diffs)
- plugins/ggi/ggi.c (modified) (4 diffs)
- plugins/ggi/intf_ggi.c (modified) (3 diffs)
- plugins/ggi/vout_ggi.c (modified) (7 diffs)
- plugins/glide/glide.c (modified) (4 diffs)
- plugins/glide/intf_glide.c (modified) (3 diffs)
- plugins/glide/vout_glide.c (modified) (7 diffs)
- plugins/gnome/gnome.c (modified) (5 diffs)
- plugins/gnome/intf_gnome.c (modified) (3 diffs)
- plugins/gnome/vout_gnome.c (modified) (12 diffs)
- plugins/mga/intf_mga.c (modified) (3 diffs)
- plugins/mga/mga.c (modified) (3 diffs)
- plugins/mga/vout_mga.c (modified) (9 diffs)
- plugins/x11/intf_x11.c (modified) (3 diffs)
- plugins/x11/vout_x11.c (modified) (11 diffs)
- plugins/x11/x11.c (modified) (5 diffs)
- plugins/yuv/video_yuv.c (modified) (3 diffs)
- plugins/yuv/video_yuv16.c (modified) (1 diff)
- plugins/yuv/yuv.c (modified) (4 diffs)
- plugins/yuvmmx/video_yuv.c (modified) (3 diffs)
- plugins/yuvmmx/yuvmmx.c (modified) (4 diffs)
- src/audio_output/audio_output.c (modified) (2 diffs)
- src/interface/interface.c (modified) (2 diffs)
- src/interface/main.c (modified) (11 diffs)
- src/misc/plugins.c (modified) (3 diffs)
- src/misc/tests.c (added)
- src/video_output/video_output.c (modified) (2 diffs)
- src/video_parser/vpar_synchro.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Makefile.in
rab70628 re13aed0 212 212 213 213 misc_obj = misc/mtime.o \ 214 misc/tests.o \ 214 215 misc/rsc_files.o \ 215 216 misc/netutils.o \ README
r57e189e re13aed0 46 46 47 47 You can also try the OpenDVD site at http://www.opendvd.org/ or the 48 the LiVi dproject at http://www.linuxvideo.org/. They have lots of48 the LiViD project at http://www.linuxvideo.org/. They have lots of 49 49 information, too. 50 50 include/config.h.in
r69da262 re13aed0 273 273 #define VOUT_METHOD_VAR "vlc_vout" 274 274 275 /* Environment variable containing the YUV method */ 276 #define YUV_METHOD_VAR "vlc_yuv" 277 275 278 /* The fallback method */ 276 279 #define VOUT_DEFAULT_METHOD "x11" include/main.h
r57e189e re13aed0 39 39 char ** ppsz_argv; /* command line arguments */ 40 40 char ** ppsz_env; /* environment variables */ 41 char * psz_arg0; /* program name (whithout path) */ 41 42 42 43 /* Generic settings */ include/plugins.h
r57e189e re13aed0 44 44 void * intf_GetPlugin; 45 45 void * yuv_GetPlugin; 46 47 int i_score; 46 48 } plugin_info_t; 47 49 plugins/beos/aout_beos.cpp
r3cbfc06 re13aed0 76 76 77 77 /***************************************************************************** 78 * aout_ SysOpen: opens a BPushGameSound79 *****************************************************************************/ 80 int aout_ SysOpen( aout_thread_t *p_aout )78 * aout_BeOpen: opens a BPushGameSound 79 *****************************************************************************/ 80 int aout_BeOpen( aout_thread_t *p_aout ) 81 81 { 82 82 /* Allocate structure */ … … 137 137 } 138 138 /***************************************************************************** 139 * aout_ SysReset: resets the dsp140 *****************************************************************************/ 141 int aout_ SysReset( aout_thread_t *p_aout )142 { 143 return( 0 ); 144 } 145 146 /***************************************************************************** 147 * aout_ SysSetFormat: sets the dsp output format148 *****************************************************************************/ 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 mode156 *****************************************************************************/ 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 rate164 *****************************************************************************/ 165 int aout_ SysSetRate( aout_thread_t *p_aout )166 { 167 return( 0 ); 168 } 169 170 /***************************************************************************** 171 * aout_ SysGetBufInfo: buffer status query172 *****************************************************************************/ 173 long aout_ SysGetBufInfo( aout_thread_t *p_aout, long l_buffer_limit )139 * aout_BeReset: resets the dsp 140 *****************************************************************************/ 141 int aout_BeReset( aout_thread_t *p_aout ) 142 { 143 return( 0 ); 144 } 145 146 /***************************************************************************** 147 * aout_BeSetFormat: sets the dsp output format 148 *****************************************************************************/ 149 int 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 *****************************************************************************/ 157 int 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 *****************************************************************************/ 165 int aout_BeSetRate( aout_thread_t *p_aout ) 166 { 167 return( 0 ); 168 } 169 170 /***************************************************************************** 171 * aout_BeGetBufInfo: buffer status query 172 *****************************************************************************/ 173 long aout_BeGetBufInfo( aout_thread_t *p_aout, long l_buffer_limit ) 174 174 { 175 175 … … 190 190 191 191 /***************************************************************************** 192 * aout_ SysPlaySamples: plays a sound samples buffer192 * aout_BePlaySamples: plays a sound samples buffer 193 193 ***************************************************************************** 194 194 * This function writes a buffer of i_length bytes in the dsp 195 195 *****************************************************************************/ 196 void aout_ SysPlaySamples( aout_thread_t *p_aout, byte_t *buffer, int i_size )196 void aout_BePlaySamples( aout_thread_t *p_aout, byte_t *buffer, int i_size ) 197 197 { 198 198 long i_newbuf_pos; … … 224 224 225 225 /***************************************************************************** 226 * aout_ SysClose: closes the dsp audio device227 *****************************************************************************/ 228 void aout_ SysClose( aout_thread_t *p_aout )226 * aout_BeClose: closes the dsp audio device 227 *****************************************************************************/ 228 void aout_BeClose( aout_thread_t *p_aout ) 229 229 { 230 230 p_aout->p_sys->p_sound->UnlockCyclic(); plugins/beos/beos.cpp
rab70628 re13aed0 41 41 #include "video_output.h" 42 42 43 #include "plugins_export.h"44 45 43 /***************************************************************************** 46 44 * Exported prototypes 47 45 *****************************************************************************/ 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 ); 46 static void aout_GetPlugin( p_aout_thread_t p_aout ); 47 static void vout_GetPlugin( p_vout_thread_t p_vout ); 48 static void intf_GetPlugin( p_intf_thread_t p_intf ); 49 50 /* Audio output */ 51 int aout_BeOpen ( aout_thread_t *p_aout ); 52 int aout_BeReset ( aout_thread_t *p_aout ); 53 int aout_BeSetFormat ( aout_thread_t *p_aout ); 54 int aout_BeSetChannels ( aout_thread_t *p_aout ); 55 int aout_BeSetRate ( aout_thread_t *p_aout ); 56 long aout_BeGetBufInfo ( aout_thread_t *p_aout, long l_buffer_info ); 57 void aout_BePlaySamples ( aout_thread_t *p_aout, byte_t *buffer, 58 int i_size ); 59 void aout_BeClose ( aout_thread_t *p_aout ); 60 61 /* Video output */ 62 int vout_BeCreate ( vout_thread_t *p_vout, char *psz_display, 63 int i_root_window, void *p_data ); 64 int vout_BeInit ( p_vout_thread_t p_vout ); 65 void vout_BeEnd ( p_vout_thread_t p_vout ); 66 void vout_BeDestroy ( p_vout_thread_t p_vout ); 67 int vout_BeManage ( p_vout_thread_t p_vout ); 68 void vout_BeDisplay ( p_vout_thread_t p_vout ); 69 void vout_BeSetPalette ( p_vout_thread_t p_vout, 70 u16 *red, u16 *green, u16 *blue, u16 *transp ); 71 72 /* Interface */ 73 int intf_BeCreate ( p_intf_thread_t p_intf ); 74 void intf_BeDestroy ( p_intf_thread_t p_intf ); 75 void intf_BeManage ( p_intf_thread_t p_intf ); 51 76 52 77 /***************************************************************************** … … 66 91 p_info->yuv_GetPlugin = NULL; 67 92 93 /* the beos plugin always works under BeOS :) */ 94 p_info->i_score = 0x800; 95 68 96 return( p_info ); 69 }70 71 /*****************************************************************************72 * Test: tests if the plugin can be launched73 *****************************************************************************/74 int Test( void )75 {76 /* the BeOS plugin always works under BeOS :) */77 return( 1 );78 97 } 79 98 … … 82 101 *****************************************************************************/ 83 102 84 void aout_GetPlugin( p_aout_thread_t p_aout )103 static void aout_GetPlugin( p_aout_thread_t p_aout ) 85 104 { 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; 94 113 } 95 114 96 void vout_GetPlugin( p_vout_thread_t p_vout )115 static void vout_GetPlugin( p_vout_thread_t p_vout ) 97 116 { 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; 104 123 } 105 124 106 void intf_GetPlugin( p_intf_thread_t p_intf )125 static void intf_GetPlugin( p_intf_thread_t p_intf ) 107 126 { 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; 111 130 } 112 131 plugins/beos/intf_beos.cpp
r3cbfc06 re13aed0 126 126 127 127 /***************************************************************************** 128 * intf_ SysCreate: initialize dummy interface129 *****************************************************************************/ 130 int intf_ SysCreate( intf_thread_t *p_intf )128 * intf_BeCreate: initialize dummy interface 129 *****************************************************************************/ 130 int intf_BeCreate( intf_thread_t *p_intf ) 131 131 { 132 132 /* Allocate instance and initialize some members */ … … 163 163 164 164 /***************************************************************************** 165 * intf_ SysDestroy: destroy dummy interface166 *****************************************************************************/ 167 void intf_ SysDestroy( intf_thread_t *p_intf )165 * intf_BeDestroy: destroy dummy interface 166 *****************************************************************************/ 167 void intf_BeDestroy( intf_thread_t *p_intf ) 168 168 { 169 169 /* Close input thread, if any (blocking) */ … … 189 189 190 190 /***************************************************************************** 191 * intf_ SysManage: event loop192 *****************************************************************************/ 193 void intf_ SysManage( intf_thread_t *p_intf )191 * intf_BeManage: event loop 192 *****************************************************************************/ 193 void intf_BeManage( intf_thread_t *p_intf ) 194 194 { 195 195 if( p_intf->p_sys->i_key != -1 ) plugins/beos/vout_beos.cpp
r3cbfc06 re13aed0 341 341 342 342 /***************************************************************************** 343 * vout_ SysCreate: allocates dummy video thread output method343 * vout_BeCreate: allocates dummy video thread output method 344 344 ***************************************************************************** 345 345 * This function allocates and initializes a dummy vout method. 346 346 *****************************************************************************/ 347 int vout_ SysCreate( vout_thread_t *p_vout, char *psz_display,347 int vout_BeCreate( vout_thread_t *p_vout, char *psz_display, 348 348 int i_root_window, void *p_data ) 349 349 { … … 372 372 373 373 /***************************************************************************** 374 * vout_ SysInit: initialize dummy video thread output method375 *****************************************************************************/ 376 int vout_ SysInit( vout_thread_t *p_vout )374 * vout_BeInit: initialize dummy video thread output method 375 *****************************************************************************/ 376 int vout_BeInit( vout_thread_t *p_vout ) 377 377 { 378 378 VideoWindow * p_win = p_vout->p_sys->p_window; … … 407 407 408 408 /***************************************************************************** 409 * vout_ SysEnd: terminate dummy video thread output method410 *****************************************************************************/ 411 void vout_ SysEnd( vout_thread_t *p_vout )409 * vout_BeEnd: terminate dummy video thread output method 410 *****************************************************************************/ 411 void vout_BeEnd( vout_thread_t *p_vout ) 412 412 { 413 413 VideoWindow * p_win = p_vout->p_sys->p_window; … … 423 423 424 424 /***************************************************************************** 425 * vout_ SysDestroy: destroy dummy video thread output method425 * vout_BeDestroy: destroy dummy video thread output method 426 426 ***************************************************************************** 427 427 * Terminate an output method created by DummyCreateOutputMethod 428 428 *****************************************************************************/ 429 void vout_ SysDestroy( vout_thread_t *p_vout )429 void vout_BeDestroy( vout_thread_t *p_vout ) 430 430 { 431 431 BeosCloseDisplay( p_vout ); … … 435 435 436 436 /***************************************************************************** 437 * vout_ SysManage: handle dummy events437 * vout_BeManage: handle dummy events 438 438 ***************************************************************************** 439 439 * This function should be called regularly by video output thread. It manages 440 440 * console events. It returns a non null value on error. 441 441 *****************************************************************************/ 442 int vout_ SysManage( vout_thread_t *p_vout )442 int vout_BeManage( vout_thread_t *p_vout ) 443 443 { 444 444 if( p_vout->i_changes & VOUT_SIZE_CHANGE ) … … 469 469 470 470 /***************************************************************************** 471 * vout_ SysDisplay: displays previously rendered output471 * vout_BeDisplay: displays previously rendered output 472 472 ***************************************************************************** 473 473 * This function send the currently rendered image to dummy image, waits until 474 474 * it is displayed and switch the two rendering buffers, preparing next frame. 475 475 *****************************************************************************/ 476 void vout_ SysDisplay( vout_thread_t *p_vout )476 void vout_BeDisplay( vout_thread_t *p_vout ) 477 477 { 478 478 VideoWindow * p_win = p_vout->p_sys->p_window; plugins/dsp/aout_dsp.c
r3cbfc06 re13aed0 23 23 /* TODO: 24 24 * 25 * - an aout_ sysGetFormats() function25 * - an aout_DspGetFormats() function 26 26 * - dsp inline/static 27 27 * - make this library portable (see mpg123) 28 * - macroify aout_ sysPlaySamples &/| aout_sysGetBufInfo ?28 * - macroify aout_DspPlaySamples &/| aout_DspGetBufInfo ? 29 29 * 30 30 */ … … 75 75 76 76 /***************************************************************************** 77 * aout_ SysOpen: opens the audio device (the digital sound processor)77 * aout_DspOpen: opens the audio device (the digital sound processor) 78 78 ***************************************************************************** 79 79 * - This function opens the dsp as an usual non-blocking write-only file, and 80 80 * modifies the p_aout->p_sys->i_fd with the file's descriptor. 81 81 *****************************************************************************/ 82 int aout_ SysOpen( aout_thread_t *p_aout )82 int aout_DspOpen( aout_thread_t *p_aout ) 83 83 { 84 84 /* Allocate structure */ … … 107 107 108 108 /***************************************************************************** 109 * aout_ SysReset: resets the dsp110 *****************************************************************************/ 111 int aout_ SysReset( aout_thread_t *p_aout )109 * aout_DspReset: resets the dsp 110 *****************************************************************************/ 111 int aout_DspReset( aout_thread_t *p_aout ) 112 112 { 113 113 if ( ioctl( p_aout->i_fd, SNDCTL_DSP_RESET, NULL ) < 0 ) … … 121 121 122 122 /***************************************************************************** 123 * aout_ SysSetFormat: sets the dsp output format123 * aout_DspSetFormat: sets the dsp output format 124 124 ***************************************************************************** 125 125 * This functions tries to initialize the dsp output format with the value … … 127 127 * default value returned by ioctl is set. 128 128 *****************************************************************************/ 129 int aout_ SysSetFormat( aout_thread_t *p_aout )129 int aout_DspSetFormat( aout_thread_t *p_aout ) 130 130 { 131 131 int i_format; … … 148 148 149 149 /***************************************************************************** 150 * aout_ SysSetChannels: sets the dsp's stereo or mono mode150 * aout_DspSetChannels: sets the dsp's stereo or mono mode 151 151 ***************************************************************************** 152 152 * This function acts just like the previous one... 153 153 *****************************************************************************/ 154 int aout_ SysSetChannels( aout_thread_t *p_aout )154 int aout_DspSetChannels( aout_thread_t *p_aout ) 155 155 { 156 156 boolean_t b_stereo = p_aout->b_stereo; … … 173 173 174 174 /***************************************************************************** 175 * aout_ SysSetRate: sets the dsp's audio output rate175 * aout_DspSetRate: sets the dsp's audio output rate 176 176 ***************************************************************************** 177 177 * This function tries to initialize the dsp with the rate contained in the … … 179 179 * the value returned by ioctl... 180 180 *****************************************************************************/ 181 int aout_ SysSetRate( aout_thread_t *p_aout )181 int aout_DspSetRate( aout_thread_t *p_aout ) 182 182 { 183 183 long l_rate; … … 200 200 201 201 /***************************************************************************** 202 * aout_ SysGetBufInfo: buffer status query202 * aout_DspGetBufInfo: buffer status query 203 203 ***************************************************************************** 204 204 * This function fills in the audio_buf_info structure : … … 210 210 * Note! 'bytes' could be more than fragments*fragsize 211 211 *****************************************************************************/ 212 long aout_ SysGetBufInfo( aout_thread_t *p_aout, long l_buffer_limit )212 long aout_DspGetBufInfo( aout_thread_t *p_aout, long l_buffer_limit ) 213 213 { 214 214 ioctl( p_aout->i_fd, SNDCTL_DSP_GETOSPACE, &p_aout->p_sys->audio_buf ); … … 221 221 222 222 /***************************************************************************** 223 * aout_ SysPlaySamples: plays a sound samples buffer223 * aout_DspPlaySamples: plays a sound samples buffer 224 224 ***************************************************************************** 225 225 * This function writes a buffer of i_length bytes in the dsp 226 226 *****************************************************************************/ 227 void aout_ SysPlaySamples( aout_thread_t *p_aout, byte_t *buffer, int i_size )227 void aout_DspPlaySamples( aout_thread_t *p_aout, byte_t *buffer, int i_size ) 228 228 { 229 229 if( p_aout->b_active ) … … 234 234 235 235 /***************************************************************************** 236 * aout_ SysClose: closes the dsp audio device237 *****************************************************************************/ 238 void aout_ SysClose( aout_thread_t *p_aout )236 * aout_DspClose: closes the dsp audio device 237 *****************************************************************************/ 238 void aout_DspClose( aout_thread_t *p_aout ) 239 239 { 240 240 close( p_aout->i_fd ); plugins/dsp/dsp.c
r57e189e re13aed0 26 26 #include "defs.h" 27 27 28 #include <sys/types.h> 29 #include <sys/stat.h> 30 #include <fcntl.h> 28 31 #include <stdlib.h> /* malloc(), free() */ 32 #include <unistd.h> /* close() */ 29 33 30 34 #include "config.h" … … 32 36 #include "threads.h" 33 37 #include "mtime.h" 38 #include "tests.h" 34 39 #include "plugins.h" 35 40 … … 39 44 #include "video_output.h" 40 45 41 #include " plugins_export.h"46 #include "main.h" 42 47 43 48 /***************************************************************************** 44 49 * Exported prototypes 45 50 *****************************************************************************/ 46 void aout_GetPlugin( p_aout_thread_t p_aout ); 51 static void aout_GetPlugin( p_aout_thread_t p_aout ); 52 53 /* Audio output */ 54 int aout_DspOpen ( aout_thread_t *p_aout ); 55 int aout_DspReset ( aout_thread_t *p_aout ); 56 int aout_DspSetFormat ( aout_thread_t *p_aout ); 57 int aout_DspSetChannels ( aout_thread_t *p_aout ); 58 int aout_DspSetRate ( aout_thread_t *p_aout ); 59 long aout_DspGetBufInfo ( aout_thread_t *p_aout, long l_buffer_info ); 60 void aout_DspPlaySamples ( aout_thread_t *p_aout, byte_t *buffer, 61 int i_size ); 62 void aout_DspClose ( aout_thread_t *p_aout ); 47 63 48 64 /***************************************************************************** … … 51 67 plugin_info_t * GetConfig( void ) 52 68 { 69 int i_fd; 53 70 plugin_info_t * p_info = (plugin_info_t *) malloc( sizeof(plugin_info_t) ); 54 71 … … 62 79 p_info->yuv_GetPlugin = NULL; 63 80 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 64 99 return( p_info ); 65 }66 67 /*****************************************************************************68 * Test: tests if the plugin can be launched69 *****************************************************************************/70 int Test( void )71 {72 /* TODO: check if suitable */73 return( 1 );74 100 } 75 101 … … 78 104 *****************************************************************************/ 79 105 80 void aout_GetPlugin( p_aout_thread_t p_aout )106 static void aout_GetPlugin( p_aout_thread_t p_aout ) 81 107 { 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; 90 116 } 91 117 plugins/dummy/aout_dummy.c
r3cbfc06 re13aed0 49 49 50 50 /***************************************************************************** 51 * aout_ SysOpen: opens a dummy audio device51 * aout_DummyOpen: opens a dummy audio device 52 52 *****************************************************************************/ 53 int aout_ SysOpen( aout_thread_t *p_aout )53 int aout_DummyOpen( aout_thread_t *p_aout ) 54 54 { 55 55 /* Initialize some variables */ … … 62 62 63 63 /***************************************************************************** 64 * aout_ SysReset: fake reset64 * aout_DummyReset: fake reset 65 65 *****************************************************************************/ 66 int aout_ SysReset( aout_thread_t *p_aout )66 int aout_DummyReset( aout_thread_t *p_aout ) 67 67 { 68 68 return( 0 ); … … 70 70 71 71 /***************************************************************************** 72 * aout_ SysSetFormat: pretends to set the dsp output format72 * aout_DummySetFormat: pretends to set the dsp output format 73 73 *****************************************************************************/ 74 int aout_ SysSetFormat( aout_thread_t *p_aout )74 int aout_DummySetFormat( aout_thread_t *p_aout ) 75 75 { 76 76 return( 0 ); … … 78 78 79 79 /***************************************************************************** 80 * aout_ SysSetChannels: pretends to set stereo or mono mode80 * aout_DummySetChannels: pretends to set stereo or mono mode 81 81 *****************************************************************************/ 82 int aout_ SysSetChannels( aout_thread_t *p_aout )82 int aout_DummySetChannels( aout_thread_t *p_aout ) 83 83 { 84 84 return( 0 ); … … 86 86 87 87 /***************************************************************************** 88 * aout_ SysSetRate: pretends to set audio output rate88 * aout_DummySetRate: pretends to set audio output rate 89 89 *****************************************************************************/ 90 int aout_ SysSetRate( aout_thread_t *p_aout )90 int aout_DummySetRate( aout_thread_t *p_aout ) 91 91 { 92 92 return( 0 ); … … 94 94 95 95 /***************************************************************************** 96 * aout_ SysGetBufInfo: returns available bytes in buffer96 * aout_DummyGetBufInfo: returns available bytes in buffer 97 97 *****************************************************************************/ 98 long aout_ SysGetBufInfo( aout_thread_t *p_aout, long l_buffer_limit )98 long aout_DummyGetBufInfo( aout_thread_t *p_aout, long l_buffer_limit ) 99 99 { 100 100 return( 2 * l_buffer_limit ); /* value big enough to sleep */ … … 102 102 103 103 /***************************************************************************** 104 * aout_ SysPlaySamples: pretends to play a sound104 * aout_DummyPlaySamples: pretends to play a sound 105 105 *****************************************************************************/ 106 void aout_ SysPlaySamples( aout_thread_t *p_aout, byte_t *buffer, int i_size )106 void aout_DummyPlaySamples( aout_thread_t *p_aout, byte_t *buffer, int i_size ) 107 107 { 108 108 ; … … 110 110 111 111 /***************************************************************************** 112 * aout_ SysClose: closes the dummy audio device112 * aout_DummyClose: closes the dummy audio device 113 113 *****************************************************************************/ 114 void aout_ SysClose( aout_thread_t *p_aout )114 void aout_DummyClose( aout_thread_t *p_aout ) 115 115 { 116 116 ; plugins/dummy/dummy.c
r57e189e re13aed0 32 32 #include "threads.h" 33 33 #include "mtime.h" 34 #include "tests.h" 34 35 #include "plugins.h" 35 36 … … 39 40 #include "video_output.h" 40 41 41 #include "plugins_export.h"42 43 42 /***************************************************************************** 44 43 * Exported prototypes 45 44 *****************************************************************************/ 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 ); 45 static void aout_GetPlugin( p_aout_thread_t p_aout ); 46 static void vout_GetPlugin( p_vout_thread_t p_vout ); 47 static void intf_GetPlugin( p_intf_thread_t p_intf ); 48 49 /* Audio output */ 50 int aout_DummyOpen ( aout_thread_t *p_aout ); 51 int aout_DummyReset ( aout_thread_t *p_aout ); 52 int aout_DummySetFormat ( aout_thread_t *p_aout ); 53 int aout_DummySetChannels ( aout_thread_t *p_aout ); 54 int aout_DummySetRate ( aout_thread_t *p_aout ); 55 long aout_DummyGetBufInfo ( aout_thread_t *p_aout, long l_buffer_info ); 56 void aout_DummyPlaySamples ( aout_thread_t *p_aout, byte_t *buffer, 57 int i_size ); 58 void aout_DummyClose ( aout_thread_t *p_aout ); 59 60 /* Video output */ 61 int vout_DummyCreate ( vout_thread_t *p_vout, char *psz_display, 62 int i_root_window, void *p_data ); 63 int vout_DummyInit ( p_vout_thread_t p_vout ); 64 void vout_DummyEnd ( p_vout_thread_t p_vout ); 65 void vout_DummyDestroy ( p_vout_thread_t p_vout ); 66 int vout_DummyManage ( p_vout_thread_t p_vout ); 67 void vout_DummyDisplay ( p_vout_thread_t p_vout ); 68 void vout_DummySetPalette ( p_vout_thread_t p_vout, 69 u16 *red, u16 *green, u16 *blue, u16 *transp ); 70 71 /* Interface */ 72 int intf_DummyCreate ( p_intf_thread_t p_intf ); 73 void intf_DummyDestroy ( p_intf_thread_t p_intf ); 74 void intf_DummyManage ( p_intf_thread_t p_intf ); 49 75 50 76 /***************************************************************************** … … 64 90 p_info->yuv_GetPlugin = NULL; 65 91 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 66 108 return( p_info ); 67 }68 69 /*****************************************************************************70 * Test: tests if the plugin can be launched71 *****************************************************************************/72 int Test( void )73 {74 /* the dummy plugin always works */75 return( 1 );76 109 } 77 110 … … 80 113 *****************************************************************************/ 81 114 82 void aout_GetPlugin( p_aout_thread_t p_aout )115 static void aout_GetPlugin( p_aout_thread_t p_aout ) 83 116 { 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; 92 125 } 93 126 94 void vout_GetPlugin( p_vout_thread_t p_vout )127 static void vout_GetPlugin( p_vout_thread_t p_vout ) 95 128 { 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->
