Commit e13aed00 authored by Sam Hocevar's avatar Sam Hocevar

. autod�tection des plugins

 . les aliases "gvlc" "fbvlc" "ggivlc" fonctionne comme il faut
parent 4af2fd10
...@@ -211,6 +211,7 @@ video_decoder_obj = video_decoder/video_decoder.o \ ...@@ -211,6 +211,7 @@ video_decoder_obj = video_decoder/video_decoder.o \
video_decoder/vdec_idct.o video_decoder/vdec_idct.o
misc_obj = misc/mtime.o \ misc_obj = misc/mtime.o \
misc/tests.o \
misc/rsc_files.o \ misc/rsc_files.o \
misc/netutils.o \ misc/netutils.o \
misc/playlist.o \ misc/playlist.o \
......
...@@ -45,7 +45,7 @@ information about MPEG and DVD playing. Have a look at the documentation ...@@ -45,7 +45,7 @@ information about MPEG and DVD playing. Have a look at the documentation
section, as well as the bookmarks. section, as well as the bookmarks.
You can also try the OpenDVD site at http://www.opendvd.org/ or the You can also try the OpenDVD site at http://www.opendvd.org/ or the
the LiVid project at http://www.linuxvideo.org/. They have lots of the LiViD project at http://www.linuxvideo.org/. They have lots of
information, too. information, too.
......
...@@ -272,6 +272,9 @@ ...@@ -272,6 +272,9 @@
/* Environment variable containing the display method */ /* Environment variable containing the display method */
#define VOUT_METHOD_VAR "vlc_vout" #define VOUT_METHOD_VAR "vlc_vout"
/* Environment variable containing the YUV method */
#define YUV_METHOD_VAR "vlc_yuv"
/* The fallback method */ /* The fallback method */
#define VOUT_DEFAULT_METHOD "x11" #define VOUT_DEFAULT_METHOD "x11"
......
...@@ -38,6 +38,7 @@ typedef struct ...@@ -38,6 +38,7 @@ typedef struct
int i_argc; /* command line arguments count */ int i_argc; /* command line arguments count */
char ** ppsz_argv; /* command line arguments */ char ** ppsz_argv; /* command line arguments */
char ** ppsz_env; /* environment variables */ char ** ppsz_env; /* environment variables */
char * psz_arg0; /* program name (whithout path) */
/* Generic settings */ /* Generic settings */
boolean_t b_audio; /* is audio output allowed ? */ boolean_t b_audio; /* is audio output allowed ? */
......
...@@ -43,6 +43,8 @@ typedef struct plugin_info_s ...@@ -43,6 +43,8 @@ typedef struct plugin_info_s
void * vout_GetPlugin; void * vout_GetPlugin;
void * intf_GetPlugin; void * intf_GetPlugin;
void * yuv_GetPlugin; void * yuv_GetPlugin;
int i_score;
} plugin_info_t; } plugin_info_t;
typedef struct plugin_bank_s typedef struct plugin_bank_s
......
/***************************************************************************** /*****************************************************************************
* plugins_export.h : exporting plugins structure * tests.h: several test functions needed by the plugins
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1996, 1997, 1998, 1999, 2000 VideoLAN
* *
* Authors: * Authors:
* *
...@@ -23,36 +23,8 @@ ...@@ -23,36 +23,8 @@
/***************************************************************************** /*****************************************************************************
* Prototypes * Prototypes
*****************************************************************************/ *****************************************************************************/
int TestProgram( char * psz_program );
/* audio output */ int TestMethod( char * psz_var, char * psz_method );
int aout_SysOpen ( aout_thread_t *p_aout ); int TestVersion( char * psz_version );
int aout_SysReset ( aout_thread_t *p_aout ); int TestMMX( void );
int aout_SysSetFormat ( aout_thread_t *p_aout );
int aout_SysSetChannels ( aout_thread_t *p_aout );
int aout_SysSetRate ( aout_thread_t *p_aout );
long aout_SysGetBufInfo ( aout_thread_t *p_aout, long l_buffer_info );
void aout_SysPlaySamples ( aout_thread_t *p_aout, byte_t *buffer,
int i_size );
void aout_SysClose ( aout_thread_t *p_aout );
/* video output */
int vout_SysCreate ( vout_thread_t *p_vout, char *psz_display,
int i_root_window, void *p_data );
int vout_SysInit ( p_vout_thread_t p_vout );
void vout_SysEnd ( p_vout_thread_t p_vout );
void vout_SysDestroy ( p_vout_thread_t p_vout );
int vout_SysManage ( p_vout_thread_t p_vout );
void vout_SysDisplay ( p_vout_thread_t p_vout );
void vout_SetPalette ( p_vout_thread_t p_vout,
u16 *red, u16 *green, u16 *blue, u16 *transp );
/* interface */
int intf_SysCreate ( p_intf_thread_t p_intf );
void intf_SysDestroy ( p_intf_thread_t p_intf );
void intf_SysManage ( p_intf_thread_t p_intf );
/* YUV transformations */
int yuv_SysInit ( p_vout_thread_t p_vout );
int yuv_SysReset ( p_vout_thread_t p_vout );
void yuv_SysEnd ( p_vout_thread_t p_vout );
...@@ -75,9 +75,9 @@ extern "C" ...@@ -75,9 +75,9 @@ extern "C"
{ {
/***************************************************************************** /*****************************************************************************
* aout_SysOpen: opens a BPushGameSound * aout_BeOpen: opens a BPushGameSound
*****************************************************************************/ *****************************************************************************/
int aout_SysOpen( aout_thread_t *p_aout ) int aout_BeOpen( aout_thread_t *p_aout )
{ {
/* Allocate structure */ /* Allocate structure */
p_aout->p_sys = (aout_sys_t*) malloc( sizeof( aout_sys_t ) ); p_aout->p_sys = (aout_sys_t*) malloc( sizeof( aout_sys_t ) );
...@@ -136,41 +136,41 @@ int aout_SysOpen( aout_thread_t *p_aout ) ...@@ -136,41 +136,41 @@ int aout_SysOpen( aout_thread_t *p_aout )
return( 0 ); return( 0 );
} }
/***************************************************************************** /*****************************************************************************
* aout_SysReset: resets the dsp * aout_BeReset: resets the dsp
*****************************************************************************/ *****************************************************************************/
int aout_SysReset( aout_thread_t *p_aout ) int aout_BeReset( aout_thread_t *p_aout )
{ {
return( 0 ); return( 0 );
} }
/***************************************************************************** /*****************************************************************************
* aout_SysSetFormat: sets the dsp output format * aout_BeSetFormat: sets the dsp output format
*****************************************************************************/ *****************************************************************************/
int aout_SysSetFormat( aout_thread_t *p_aout ) int aout_BeSetFormat( aout_thread_t *p_aout )
{ {
return( 0 ); return( 0 );
} }
/***************************************************************************** /*****************************************************************************
* aout_SysSetChannels: sets the dsp's stereo or mono mode * aout_BeSetChannels: sets the dsp's stereo or mono mode
*****************************************************************************/ *****************************************************************************/
int aout_SysSetChannels( aout_thread_t *p_aout ) int aout_BeSetChannels( aout_thread_t *p_aout )
{ {
return( 0 ); return( 0 );
} }
/***************************************************************************** /*****************************************************************************
* aout_SysSetRate: sets the dsp's audio output rate * aout_BeSetRate: sets the dsp's audio output rate
*****************************************************************************/ *****************************************************************************/
int aout_SysSetRate( aout_thread_t *p_aout ) int aout_BeSetRate( aout_thread_t *p_aout )
{ {
return( 0 ); return( 0 );
} }
/***************************************************************************** /*****************************************************************************
* aout_SysGetBufInfo: buffer status query * aout_BeGetBufInfo: buffer status query
*****************************************************************************/ *****************************************************************************/
long aout_SysGetBufInfo( aout_thread_t *p_aout, long l_buffer_limit ) long aout_BeGetBufInfo( aout_thread_t *p_aout, long l_buffer_limit )
{ {
long i_hard_pos = 4 * p_aout->p_sys->p_sound->CurrentPosition(); long i_hard_pos = 4 * p_aout->p_sys->p_sound->CurrentPosition();
...@@ -189,11 +189,11 @@ long aout_SysGetBufInfo( aout_thread_t *p_aout, long l_buffer_limit ) ...@@ -189,11 +189,11 @@ long aout_SysGetBufInfo( aout_thread_t *p_aout, long l_buffer_limit )
} }
/***************************************************************************** /*****************************************************************************
* aout_SysPlaySamples: plays a sound samples buffer * aout_BePlaySamples: plays a sound samples buffer
***************************************************************************** *****************************************************************************
* This function writes a buffer of i_length bytes in the dsp * This function writes a buffer of i_length bytes in the dsp
*****************************************************************************/ *****************************************************************************/
void aout_SysPlaySamples( aout_thread_t *p_aout, byte_t *buffer, int i_size ) void aout_BePlaySamples( aout_thread_t *p_aout, byte_t *buffer, int i_size )
{ {
long i_newbuf_pos; long i_newbuf_pos;
...@@ -223,9 +223,9 @@ void aout_SysPlaySamples( aout_thread_t *p_aout, byte_t *buffer, int i_size ) ...@@ -223,9 +223,9 @@ void aout_SysPlaySamples( aout_thread_t *p_aout, byte_t *buffer, int i_size )
} }
/***************************************************************************** /*****************************************************************************
* aout_SysClose: closes the dsp audio device * aout_BeClose: closes the dsp audio device
*****************************************************************************/ *****************************************************************************/
void aout_SysClose( aout_thread_t *p_aout ) void aout_BeClose( aout_thread_t *p_aout )
{ {
p_aout->p_sys->p_sound->UnlockCyclic(); p_aout->p_sys->p_sound->UnlockCyclic();
p_aout->p_sys->p_sound->StopPlaying( ); p_aout->p_sys->p_sound->StopPlaying( );
......
...@@ -40,14 +40,39 @@ extern "C" ...@@ -40,14 +40,39 @@ extern "C"
#include "video.h" #include "video.h"
#include "video_output.h" #include "video_output.h"
#include "plugins_export.h"
/***************************************************************************** /*****************************************************************************
* Exported prototypes * Exported prototypes
*****************************************************************************/ *****************************************************************************/
void aout_GetPlugin( p_aout_thread_t p_aout ); static void aout_GetPlugin( p_aout_thread_t p_aout );
void vout_GetPlugin( p_vout_thread_t p_vout ); static void vout_GetPlugin( p_vout_thread_t p_vout );
void intf_GetPlugin( p_intf_thread_t p_intf ); static void intf_GetPlugin( p_intf_thread_t p_intf );
/* Audio output */
int aout_BeOpen ( aout_thread_t *p_aout );
int aout_BeReset ( aout_thread_t *p_aout );
int aout_BeSetFormat ( aout_thread_t *p_aout );
int aout_BeSetChannels ( aout_thread_t *p_aout );
int aout_BeSetRate ( aout_thread_t *p_aout );
long aout_BeGetBufInfo ( aout_thread_t *p_aout, long l_buffer_info );
void aout_BePlaySamples ( aout_thread_t *p_aout, byte_t *buffer,
int i_size );
void aout_BeClose ( aout_thread_t *p_aout );
/* Video output */
int vout_BeCreate ( vout_thread_t *p_vout, char *psz_display,
int i_root_window, void *p_data );
int vout_BeInit ( p_vout_thread_t p_vout );
void vout_BeEnd ( p_vout_thread_t p_vout );
void vout_BeDestroy ( p_vout_thread_t p_vout );
int vout_BeManage ( p_vout_thread_t p_vout );
void vout_BeDisplay ( p_vout_thread_t p_vout );
void vout_BeSetPalette ( p_vout_thread_t p_vout,
u16 *red, u16 *green, u16 *blue, u16 *transp );
/* Interface */
int intf_BeCreate ( p_intf_thread_t p_intf );
void intf_BeDestroy ( p_intf_thread_t p_intf );
void intf_BeManage ( p_intf_thread_t p_intf );
/***************************************************************************** /*****************************************************************************
* GetConfig: get the plugin structure and configuration * GetConfig: get the plugin structure and configuration
...@@ -65,49 +90,43 @@ plugin_info_t * GetConfig( void ) ...@@ -65,49 +90,43 @@ plugin_info_t * GetConfig( void )
p_info->intf_GetPlugin = intf_GetPlugin; p_info->intf_GetPlugin = intf_GetPlugin;
p_info->yuv_GetPlugin = NULL; p_info->yuv_GetPlugin = NULL;
return( p_info ); /* the beos plugin always works under BeOS :) */
} p_info->i_score = 0x800;
/***************************************************************************** return( p_info );
* Test: tests if the plugin can be launched
*****************************************************************************/
int Test( void )
{
/* the BeOS plugin always works under BeOS :) */
return( 1 );
} }
/***************************************************************************** /*****************************************************************************
* Following functions are only called through the p_info structure * Following functions are only called through the p_info structure
*****************************************************************************/ *****************************************************************************/
void aout_GetPlugin( p_aout_thread_t p_aout ) static void aout_GetPlugin( p_aout_thread_t p_aout )
{ {
p_aout->p_sys_open = aout_SysOpen; p_aout->p_sys_open = aout_BeOpen;
p_aout->p_sys_reset = aout_SysReset; p_aout->p_sys_reset = aout_BeReset;
p_aout->p_sys_setformat = aout_SysSetFormat; p_aout->p_sys_setformat = aout_BeSetFormat;
p_aout->p_sys_setchannels = aout_SysSetChannels; p_aout->p_sys_setchannels = aout_BeSetChannels;
p_aout->p_sys_setrate = aout_SysSetRate; p_aout->p_sys_setrate = aout_BeSetRate;
p_aout->p_sys_getbufinfo = aout_SysGetBufInfo; p_aout->p_sys_getbufinfo = aout_BeGetBufInfo;
p_aout->p_sys_playsamples = aout_SysPlaySamples; p_aout->p_sys_playsamples = aout_BePlaySamples;
p_aout->p_sys_close = aout_SysClose; p_aout->p_sys_close = aout_BeClose;
} }
void vout_GetPlugin( p_vout_thread_t p_vout ) static void vout_GetPlugin( p_vout_thread_t p_vout )
{ {
p_vout->p_sys_create = vout_SysCreate; p_vout->p_sys_create = vout_BeCreate;
p_vout->p_sys_init = vout_SysInit; p_vout->p_sys_init = vout_BeInit;
p_vout->p_sys_end = vout_SysEnd; p_vout->p_sys_end = vout_BeEnd;
p_vout->p_sys_destroy = vout_SysDestroy; p_vout->p_sys_destroy = vout_BeDestroy;
p_vout->p_sys_manage = vout_SysManage; p_vout->p_sys_manage = vout_BeManage;
p_vout->p_sys_display = vout_SysDisplay; p_vout->p_sys_display = vout_BeDisplay;
} }
void intf_GetPlugin( p_intf_thread_t p_intf ) static void intf_GetPlugin( p_intf_thread_t p_intf )
{ {
p_intf->p_sys_create = intf_SysCreate; p_intf->p_sys_create = intf_BeCreate;
p_intf->p_sys_destroy = intf_SysDestroy; p_intf->p_sys_destroy = intf_BeDestroy;
p_intf->p_sys_manage = intf_SysManage; p_intf->p_sys_manage = intf_BeManage;
} }
} /* extern "C" */ } /* extern "C" */
...@@ -125,9 +125,9 @@ extern "C" ...@@ -125,9 +125,9 @@ extern "C"
{ {
/***************************************************************************** /*****************************************************************************
* intf_SysCreate: initialize dummy interface * intf_BeCreate: initialize dummy interface
*****************************************************************************/ *****************************************************************************/
int intf_SysCreate( intf_thread_t *p_intf ) int intf_BeCreate( intf_thread_t *p_intf )
{ {
/* Allocate instance and initialize some members */ /* Allocate instance and initialize some members */
p_intf->p_sys = (intf_sys_t*) malloc( sizeof( intf_sys_t ) ); p_intf->p_sys = (intf_sys_t*) malloc( sizeof( intf_sys_t ) );
...@@ -162,9 +162,9 @@ int intf_SysCreate( intf_thread_t *p_intf ) ...@@ -162,9 +162,9 @@ int intf_SysCreate( intf_thread_t *p_intf )
} }
/***************************************************************************** /*****************************************************************************
* intf_SysDestroy: destroy dummy interface * intf_BeDestroy: destroy dummy interface
*****************************************************************************/ *****************************************************************************/
void intf_SysDestroy( intf_thread_t *p_intf ) void intf_BeDestroy( intf_thread_t *p_intf )
{ {
/* Close input thread, if any (blocking) */ /* Close input thread, if any (blocking) */
if( p_intf->p_input ) if( p_intf->p_input )
...@@ -188,9 +188,9 @@ void intf_SysDestroy( intf_thread_t *p_intf ) ...@@ -188,9 +188,9 @@ void intf_SysDestroy( intf_thread_t *p_intf )
/***************************************************************************** /*****************************************************************************
* intf_SysManage: event loop * intf_BeManage: event loop
*****************************************************************************/ *****************************************************************************/
void intf_SysManage( intf_thread_t *p_intf ) void intf_BeManage( intf_thread_t *p_intf )
{ {
if( p_intf->p_sys->i_key != -1 ) if( p_intf->p_sys->i_key != -1 )
{ {
......
...@@ -340,11 +340,11 @@ static int BeosOpenDisplay ( vout_thread_t *p_vout ); ...@@ -340,11 +340,11 @@ static int BeosOpenDisplay ( vout_thread_t *p_vout );
static void BeosCloseDisplay ( vout_thread_t *p_vout ); static void BeosCloseDisplay ( vout_thread_t *p_vout );
/***************************************************************************** /*****************************************************************************
* vout_SysCreate: allocates dummy video thread output method * vout_BeCreate: allocates dummy video thread output method
***************************************************************************** *****************************************************************************
* This function allocates and initializes a dummy vout method. * This function allocates and initializes a dummy vout method.
*****************************************************************************/ *****************************************************************************/
int vout_SysCreate( vout_thread_t *p_vout, char *psz_display, int vout_BeCreate( vout_thread_t *p_vout, char *psz_display,
int i_root_window, void *p_data ) int i_root_window, void *p_data )
{ {
/* Allocate structure */ /* Allocate structure */
...@@ -371,9 +371,9 @@ int vout_SysCreate( vout_thread_t *p_vout, char *psz_display, ...@@ -371,9 +371,9 @@ int vout_SysCreate( vout_thread_t *p_vout, char *psz_display,
} }
/***************************************************************************** /*****************************************************************************
* vout_SysInit: initialize dummy video thread output method * vout_BeInit: initialize dummy video thread output method
*****************************************************************************/ *****************************************************************************/
int vout_SysInit( vout_thread_t *p_vout ) int vout_BeInit( vout_thread_t *p_vout )
{ {
VideoWindow * p_win = p_vout->p_sys->p_window; VideoWindow * p_win = p_vout->p_sys->p_window;
u32 i_page_size; u32 i_page_size;
...@@ -406,9 +406,9 @@ int vout_SysInit( vout_thread_t *p_vout ) ...@@ -406,9 +406,9 @@ int vout_SysInit( vout_thread_t *p_vout )
} }
/***************************************************************************** /*****************************************************************************
* vout_SysEnd: terminate dummy video thread output method * vout_BeEnd: terminate dummy video thread output method
*****************************************************************************/ *****************************************************************************/
void vout_SysEnd( vout_thread_t *p_vout ) void vout_BeEnd( vout_thread_t *p_vout )
{ {
VideoWindow * p_win = p_vout->p_sys->p_window; VideoWindow * p_win = p_vout->p_sys->p_window;
...@@ -422,11 +422,11 @@ void vout_SysEnd( vout_thread_t *p_vout ) ...@@ -422,11 +422,11 @@ void vout_SysEnd( vout_thread_t *p_vout )
} }
/***************************************************************************** /*****************************************************************************
* vout_SysDestroy: destroy dummy video thread output method * vout_BeDestroy: destroy dummy video thread output method
***************************************************************************** *****************************************************************************
* Terminate an output method created by DummyCreateOutputMethod * Terminate an output method created by DummyCreateOutputMethod
*****************************************************************************/ *****************************************************************************/
void vout_SysDestroy( vout_thread_t *p_vout ) void vout_BeDestroy( vout_thread_t *p_vout )
{ {
BeosCloseDisplay( p_vout ); BeosCloseDisplay( p_vout );
...@@ -434,12 +434,12 @@ void vout_SysDestroy( vout_thread_t *p_vout ) ...@@ -434,12 +434,12 @@ void vout_SysDestroy( vout_thread_t *p_vout )
} }
/***************************************************************************** /*****************************************************************************
* vout_SysManage: handle dummy events * vout_BeManage: handle dummy events
***************************************************************************** *****************************************************************************
* This function should be called regularly by video output thread. It manages * This function should be called regularly by video output thread. It manages
* console events. It returns a non null value on error. * console events. It returns a non null value on error.
*****************************************************************************/ *****************************************************************************/
int vout_SysManage( vout_thread_t *p_vout ) int vout_BeManage( vout_thread_t *p_vout )
{ {
if( p_vout->i_changes & VOUT_SIZE_CHANGE ) if( p_vout->i_changes & VOUT_SIZE_CHANGE )
{ {
...@@ -468,12 +468,12 @@ int vout_SysManage( vout_thread_t *p_vout ) ...@@ -468,12 +468,12 @@ int vout_SysManage( vout_thread_t *p_vout )
} }
/***************************************************************************** /*****************************************************************************
* vout_SysDisplay: displays previously rendered output * vout_BeDisplay: displays previously rendered output
***************************************************************************** *****************************************************************************
* This function send the currently rendered image to dummy image, waits until * This function send the currently rendered image to dummy image, waits until
* it is displayed and switch the two rendering buffers, preparing next frame. * it is displayed and switch the two rendering buffers, preparing next frame.
*****************************************************************************/ *****************************************************************************/
void vout_SysDisplay( vout_thread_t *p_vout ) void vout_BeDisplay( vout_thread_t *p_vout )
{ {
VideoWindow * p_win = p_vout->p_sys->p_window; VideoWindow * p_win = p_vout->p_sys->p_window;
......
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
/* TODO: /* TODO:
* *
* - an aout_sysGetFormats() function * - an aout_DspGetFormats() function
* - dsp inline/static * - dsp inline/static
* - make this library portable (see mpg123) * - make this library portable (see mpg123)
* - macroify aout_sysPlaySamples &/| aout_sysGetBufInfo ? * - macroify aout_DspPlaySamples &/| aout_DspGetBufInfo ?
* *
*/ */
...@@ -74,12 +74,12 @@ typedef struct aout_sys_s ...@@ -74,12 +74,12 @@ typedef struct aout_sys_s
} aout_sys_t; } aout_sys_t;
/***************************************************************************** /*****************************************************************************
* aout_SysOpen: opens the audio device (the digital sound processor) * aout_DspOpen: opens the audio device (the digital sound processor)
***************************************************************************** *****************************************************************************
* - This function opens the dsp as an usual non-blocking write-only file, and * - This function opens the dsp as an usual non-blocking write-only file, and
* modifies the p_aout->p_sys->i_fd with the file's descriptor. * modifies the p_aout->p_sys->i_fd with the file's descriptor.
*****************************************************************************/ *****************************************************************************/
int aout_SysOpen( aout_thread_t *p_aout ) int aout_DspOpen( aout_thread_t *p_aout )
{ {
/* Allocate structure */ /* Allocate structure */
p_aout->p_sys = malloc( sizeof( aout_sys_t ) ); p_aout->p_sys = malloc( sizeof( aout_sys_t ) );
...@@ -106,9 +106,9 @@ int aout_SysOpen( aout_thread_t *p_aout ) ...@@ -106,9 +106,9 @@ int aout_SysOpen( aout_thread_t *p_aout )
} }
/***************************************************************************** /*****************************************************************************
* aout_SysReset: resets the dsp * aout_DspReset: resets the dsp
*****************************************************************************/ *****************************************************************************/
int aout_SysReset( aout_thread_t *p_aout ) int aout_DspReset( aout_thread_t *p_aout )
{ {
if ( ioctl( p_aout->i_fd, SNDCTL_DSP_RESET, NULL ) < 0 ) if ( ioctl( p_aout->i_fd, SNDCTL_DSP_RESET, NULL ) < 0 )
{ {
...@@ -120,13 +120,13 @@ int aout_SysReset( aout_thread_t *p_aout ) ...@@ -120,13 +120,13 @@ int aout_SysReset( aout_thread_t *p_aout )
} }
/***************************************************************************** /*****************************************************************************
* aout_SysSetFormat: sets the dsp output format * aout_DspSetFormat: sets the dsp output format
***************************************************************************** *****************************************************************************
* This functions tries to initialize the dsp output format with the value * This functions tries to initialize the dsp output format with the value
* contained in the dsp structure, and if this value could not be set, the * contained in the dsp structure, and if this value could not be set, the
* default value returned by ioctl is set. * default value returned by ioctl is set.
*****************************************************************************/ *****************************************************************************/
int aout_SysSetFormat( aout_thread_t *p_aout ) int aout_DspSetFormat( aout_thread_t *p_aout )
{ {
int i_format; int i_format;
...@@ -147,11 +147,11 @@ int aout_SysSetFormat( aout_thread_t *p_aout ) ...@@ -147,11 +147,11 @@ int aout_SysSetFormat( aout_thread_t *p_aout )
} }
/***************************************************************************** /*****************************************************************************
* aout_SysSetChannels: sets the dsp's stereo or mono mode * aout_DspSetChannels: sets the dsp's stereo or mono mode
***************************************************************************** *****************************************************************************
* This function acts just like the previous one... * This function acts just like the previous one...
*****************************************************************************/ *****************************************************************************/
int aout_SysSetChannels( aout_thread_t *p_aout ) int aout_DspSetChannels( aout_thread_t *p_aout )
{ {
boolean_t b_stereo = p_aout->b_stereo; boolean_t b_stereo = p_aout->b_stereo;
...@@ -172,13 +172,13 @@ int aout_SysSetChannels( aout_thread_t *p_aout ) ...@@ -172,13 +172,13 @@ int aout_SysSetChannels( aout_thread_t *p_aout )
} }
/***************************************************************************** /*****************************************************************************
* aout_SysSetRate: sets the dsp's audio output rate * aout_DspSetRate: sets the dsp's audio output rate
***************************************************************************** *****************************************************************************
* This function tries to initialize the dsp with the rate contained in the * This function tries to initialize the dsp with the rate contained in the
* dsp structure, but if the dsp doesn't support this value, the function uses * dsp structure, but if the dsp doesn't support this value, the function uses
* the value returned by ioctl... * the value returned by ioctl...
*****************************************************************************/ *****************************************************************************/
int aout_SysSetRate( aout_thread_t *p_aout ) int aout_DspSetRate( aout_thread_t *p_aout )
{ {
long l_rate; long l_rate;
...@@ -199,7 +199,7 @@ int aout_SysSetRate( aout_thread_t *p_aout ) ...@@ -199,7 +199,7 @@ int aout_SysSetRate( aout_thread_t *p_aout )
} }
/***************************************************************************** /*****************************************************************************
* aout_SysGetBufInfo: buffer status query * aout_DspGetBufInfo: buffer status query
***************************************************************************** *****************************************************************************
* This function fills in the audio_buf_info structure : * This function fills in the audio_buf_info structure :
* - int fragments : number of available fragments (partially usend ones not * - int fragments : number of available fragments (partially usend ones not
...@@ -209,7 +209,7 @@ int aout_SysSetRate( aout_thread_t *p_aout ) ...@@ -209,7 +209,7 @@ int aout_SysSetRate( aout_thread_t *p_aout )
* - int bytes : available space in bytes (includes partially used fragments) * - int bytes : available space in bytes (includes partially used fragments)
* Note! 'bytes' could be more than fragments*fragsize * Note! 'bytes' could be more than fragments*fragsize
*****************************************************************************/ *****************************************************************************/
long aout_SysGetBufInfo( aout_thread_t *p_aout, long l_buffer_limit ) long aout_DspGetBufInfo( aout_thread_t *p_aout, long l_buffer_limit )
{ {
ioctl( p_aout->i_fd, SNDCTL_DSP_GETOSPACE, &p_aout->p_sys->audio_buf ); ioctl( p_aout->i_fd, SNDCTL_DSP_GETOSPACE, &p_aout->p_sys->audio_buf );
...@@ -220,11 +220,11 @@ long aout_SysGetBufInfo( aout_thread_t *p_aout, long l_buffer_limit ) ...@@ -220,11 +220,11 @@ long aout_SysGetBufInfo( aout_thread_t *p_aout, long l_buffer_limit )
} }
/***************************************************************************** /*****************************************************************************
* aout_SysPlaySamples: plays a sound samples buffer * aout_DspPlaySamples: plays a sound samples buffer
***************************************************************************** *****************************************************************************
* This function writes a buffer of i_length bytes in the dsp * This function writes a buffer of i_length bytes in the dsp
*****************************************************************************/ *****************************************************************************/
void aout_SysPlaySamples( aout_thread_t *p_aout, byte_t *buffer, int i_size ) void aout_DspPlaySamples( aout_thread_t *p_aout, byte_t *buffer, int i_size )
{ {
if( p_aout->b_active ) if( p_aout->b_active )
{ {
...@@ -233,9 +233,9 @@ void aout_SysPlaySamples( aout_thread_t *p_aout, byte_t *buffer, int i_size ) ...@@ -233,9 +233,9 @@ void aout_SysPlaySamples( aout_thread_t *p_aout, byte_t *buffer, int i_size )
} }