Commit 94b1b1ac authored by Gildas Bazin's avatar Gildas Bazin

* ALL: Splitted the directx plugin into an audio and video module.
parent d81ece46
......@@ -1490,15 +1490,16 @@ then
if test "x${with_directx}" = "x"
then
AC_CHECK_HEADERS(ddraw.h,
[ PLUGINS="${PLUGINS} directx"
LDFLAGS_directx="${LDFLAGS_directx} -lgdi32" ])
[ PLUGINS="${PLUGINS} vout_directx aout_directx"
LDFLAGS_vout_directx="${LDFLAGS_directx} -lgdi32" ])
else
AC_MSG_CHECKING(for directX headers in ${with_directx})
if test -f ${with_directx}/ddraw.h
then
PLUGINS="${PLUGINS} directx"
LDFLAGS_directx="${LDFLAGS_directx} -lgdi32"
CPPFLAGS_directx="${CPPFLAGS_directx} -I${with_directx}"
PLUGINS="${PLUGINS} vout_directx aout_directx"
LDFLAGS_vout_directx="${LDFLAGS_directx} -lgdi32"
CPPFLAGS_vout_directx="${CPPFLAGS_vout_directx} -I${with_directx}"
CPPFLAGS_aout_directx="${CPPFLAGS_aout_directx} -I${with_directx}"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
......
SOURCES_alsa = modules/audio_output/alsa.c
SOURCES_arts = modules/audio_output/arts.c
SOURCES_aout_directx = modules/audio_output/directx.c
SOURCES_esd = modules/audio_output/esd.c
SOURCES_aout_file = modules/audio_output/file.c
SOURCES_oss = modules/audio_output/oss.c
......
......@@ -2,7 +2,7 @@
* aout.c: Windows DirectX audio output method
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: aout.c,v 1.11 2002/09/30 11:05:40 sam Exp $
* $Id: directx.c,v 1.1 2002/10/05 17:29:50 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -66,7 +66,6 @@ typedef struct notification_thread_t
* This structure is part of the audio output thread descriptor.
* It describes the direct sound specific properties of an audio device.
*****************************************************************************/
struct aout_sys_t
{
LPDIRECTSOUND p_dsobject; /* main Direct Sound object */
......@@ -91,10 +90,10 @@ struct aout_sys_t
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
int E_(OpenAudio) ( vlc_object_t * );
void E_(CloseAudio) ( vlc_object_t * );
static int OpenAudio ( vlc_object_t * );
static void CloseAudio ( vlc_object_t * );
static void Play ( aout_instance_t * );
static void Play ( aout_instance_t * );
/* local functions */
static int DirectxCreateSecondaryBuffer ( aout_instance_t * );
......@@ -102,12 +101,22 @@ static void DirectxDestroySecondaryBuffer( aout_instance_t * );
static int DirectxInitDSound ( aout_instance_t * );
static void DirectSoundThread ( notification_thread_t * );
/*****************************************************************************
* Module descriptor
*****************************************************************************/
vlc_module_begin();
set_description( _("DirectX audio module") );
set_capability( "audio output", 100 );
add_shortcut( "directx" );
set_callbacks( OpenAudio, CloseAudio );
vlc_module_end();
/*****************************************************************************
* OpenAudio: open the audio device
*****************************************************************************
* This function opens and setups Direct Sound.
*****************************************************************************/
int E_(OpenAudio) ( vlc_object_t *p_this )
static int OpenAudio( vlc_object_t *p_this )
{
aout_instance_t * p_aout = (aout_instance_t *)p_this;
HRESULT dsresult;
......@@ -219,7 +228,7 @@ int E_(OpenAudio) ( vlc_object_t *p_this )
return 0;
error:
E_(CloseAudio)( VLC_OBJECT(p_aout) );
CloseAudio( VLC_OBJECT(p_aout) );
return 1;
}
......@@ -233,7 +242,7 @@ static void Play( aout_instance_t *p_aout )
/*****************************************************************************
* CloseAudio: close the audio device
*****************************************************************************/
void E_(CloseAudio) ( vlc_object_t *p_this )
static void CloseAudio( vlc_object_t *p_this )
{
aout_instance_t * p_aout = (aout_instance_t *)p_this;
......
SOURCES_directx = \
SOURCES_vout_directx = \
modules/video_output/directx/directx.c \
modules/video_output/directx/vout.c \
modules/video_output/directx/events.c \
modules/video_output/directx/aout.c
modules/video_output/directx/events.c
noinst_HEADERS += \
modules/video_output/directx/vout.h
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment