sys/directdraw/: Prepare the plugin to move to good:

Original commit message from CVS:
* sys/directdraw/gstdirectdrawplugin.c:
* sys/directdraw/gstdirectdrawsink.c:
* sys/directdraw/gstdirectdrawsink.h:
Prepare the plugin to move to good:
Remove unused/untested code (rendering to an extern surface,
yuv format rendering).Use GST_(DEBUG/*)_OBJECT macros
Rename all functions from gst_directdrawsink to gst_directdraw_sink.
Add gtk doc section
Fix a bug in gst_directdraw_sink_show_frame, memcpy line by line
respecting destination surface stride.
* sys/directsound/gstdirectsoundplugin.c:
* sys/directsound/gstdirectsoundsink.c:
* sys/directsound/gstdirectsoundsink.h:
Prepare the plugin to move to good:
Rename all functions from gst_directsoundsink to gst_directsound_sink.
Add gtk doc section
* win32/common/config.h.in:
* win32/MANIFEST:
Add config.h.in
This commit is contained in:
Sébastien Moutte 2007-02-18 18:00:51 +00:00
parent bc42018514
commit f0ea2ecc06
9 changed files with 913 additions and 1036 deletions

View file

@ -1,3 +1,25 @@
2007-02-18 Sébastien Moutte <sebastien@moutte.net>
* sys/directdraw/gstdirectdrawplugin.c:
* sys/directdraw/gstdirectdrawsink.c:
* sys/directdraw/gstdirectdrawsink.h:
Prepare the plugin to move to good:
Remove unused/untested code (rendering to an extern surface,
yuv format rendering).Use GST_(DEBUG/*)_OBJECT macros
Rename all functions from gst_directdrawsink to gst_directdraw_sink.
Add gtk doc section
Fix a bug in gst_directdraw_sink_show_frame, memcpy line by line
respecting destination surface stride.
* sys/directsound/gstdirectsoundplugin.c:
* sys/directsound/gstdirectsoundsink.c:
* sys/directsound/gstdirectsoundsink.h:
Prepare the plugin to move to good:
Rename all functions from gst_directsoundsink to gst_directsound_sink.
Add gtk doc section
* win32/common/config.h.in:
* win32/MANIFEST:
Add config.h.in
2007-02-13 Stefan Kost <ensonic@users.sf.net> 2007-02-13 Stefan Kost <ensonic@users.sf.net>
* configure.ac: * configure.ac:

View file

@ -38,5 +38,5 @@ plugin_init (GstPlugin * plugin)
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR, GST_VERSION_MINOR,
"directdraw", "directdraw",
"DIRECTDRAW plugin library", "Direct Draw plugin library",
plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)

File diff suppressed because it is too large Load diff

View file

@ -33,7 +33,7 @@
#include <ddraw.h> #include <ddraw.h>
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_DIRECTDRAW_SINK (gst_directdrawsink_get_type()) #define GST_TYPE_DIRECTDRAW_SINK (gst_directdraw_sink_get_type())
#define GST_DIRECTDRAW_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DIRECTDRAW_SINK,GstDirectDrawSink)) #define GST_DIRECTDRAW_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DIRECTDRAW_SINK,GstDirectDrawSink))
#define GST_DIRECTDRAW_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DIRECTDRAW_SINK,GstDirectDrawSinkClass)) #define GST_DIRECTDRAW_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DIRECTDRAW_SINK,GstDirectDrawSinkClass))
#define GST_IS_DIRECTDRAW_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DIRECTDRAW_SINK)) #define GST_IS_DIRECTDRAW_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DIRECTDRAW_SINK))
@ -85,7 +85,6 @@ struct _GstDirectDrawSink
LPDIRECTDRAW ddraw_object; LPDIRECTDRAW ddraw_object;
LPDIRECTDRAWSURFACE primary_surface; LPDIRECTDRAWSURFACE primary_surface;
LPDIRECTDRAWSURFACE offscreen_surface; LPDIRECTDRAWSURFACE offscreen_surface;
LPDIRECTDRAWSURFACE overlays;
LPDIRECTDRAWCLIPPER clipper; LPDIRECTDRAWCLIPPER clipper;
/* last buffer displayed (used for XOverlay interface expose method) */ /* last buffer displayed (used for XOverlay interface expose method) */
@ -105,8 +104,7 @@ struct _GstDirectDrawSink
gint fps_n; gint fps_n;
gint fps_d; gint fps_d;
/*properties*/ /* properties */
LPDIRECTDRAWSURFACE extern_surface;
gboolean keep_aspect_ratio; gboolean keep_aspect_ratio;
/*pixel format */ /*pixel format */
@ -117,11 +115,6 @@ struct _GstDirectDrawSink
/* TRUE when directdraw objects are setup */ /* TRUE when directdraw objects are setup */
gboolean setup; gboolean setup;
/* overlays */
gboolean bUseOverlay;
gboolean bIsOverlayVisible;
guint color_key;
}; };
struct _GstDirectDrawSinkClass struct _GstDirectDrawSinkClass
@ -129,7 +122,7 @@ struct _GstDirectDrawSinkClass
GstVideoSinkClass parent_class; GstVideoSinkClass parent_class;
}; };
GType gst_directdrawsink_get_type (void); GType gst_direct_drawsink_get_type (void);
G_END_DECLS G_END_DECLS
#endif /* __GST_DIRECTDRAWSINK_H__ */ #endif /* __GST_DIRECTDRAWSINK_H__ */

View file

@ -39,5 +39,5 @@ plugin_init (GstPlugin * plugin)
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR, GST_VERSION_MINOR,
"directsound", "directsound",
"DIRECTSOUND plugin library", "Direct Sound plugin library",
plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)

View file

@ -19,6 +19,37 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
/**
* SECTION:element-directsound
* @short_description: output sound using Directsound API
*
* <refsect2>
* <para>
* This element lets you output sound using the DirectSound API.
* </para>
* <para>
* Note that you should almost always use generic audio conversion elements
* like audioconvert and audioresample in front of an audiosink to make sure
* your pipeline works under all circumstances (those conversion elements will
* act in passthrough-mode if no conversion is necessary).
* </para>
* <title>Example pipelines</title>
* <para>
* <programlisting>
* gst-launch-0.10 -v audiotestsrc ! audioconvert ! volume volume=0.1 ! directsoundsink
* </programlisting>
* will output a sine wave (continuous beep sound) to your sound card (with
* a very low volume as precaution).
* </para>
* <para>
* <programlisting>
* gst-launch-0.10 -v filesrc location=music.ogg ! decodebin ! audioconvert ! audioresample ! directsoundsink
* </programlisting>
* will play an Ogg/Vorbis audio file and output it.
* </para>
* </refsect2>
*/
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif #endif
@ -35,35 +66,35 @@
GST_DEBUG_CATEGORY_STATIC (directsoundsink_debug); GST_DEBUG_CATEGORY_STATIC (directsoundsink_debug);
/* elementfactory information */ /* elementfactory information */
static const GstElementDetails gst_directsoundsink_details = static const GstElementDetails gst_directsound_sink_details =
GST_ELEMENT_DETAILS ("Audio Sink (DIRECTSOUND)", GST_ELEMENT_DETAILS ("Direct Sound Audio Sink",
"Sink/Audio", "Sink/Audio",
"Output to a sound card via DIRECTSOUND", "Output to a sound card via Direct Sound",
"Sebastien Moutte <sebastien@moutte.net>"); "Sebastien Moutte <sebastien@moutte.net>");
static void gst_directsoundsink_base_init (gpointer g_class); static void gst_directsound_sink_base_init (gpointer g_class);
static void gst_directsoundsink_class_init (GstDirectSoundSinkClass * klass); static void gst_directsound_sink_class_init (GstDirectSoundSinkClass * klass);
static void gst_directsoundsink_init (GstDirectSoundSink * dsoundsink, static void gst_directsound_sink_init (GstDirectSoundSink * dsoundsink,
GstDirectSoundSinkClass * g_class); GstDirectSoundSinkClass * g_class);
static void gst_directsoundsink_dispose (GObject * object); static void gst_directsound_sink_dispose (GObject * object);
static void gst_directsoundsink_finalise (GObject * object); static void gst_directsound_sink_finalise (GObject * object);
static void gst_directsoundsink_set_property (GObject * object, static void gst_directsound_sink_set_property (GObject * object,
guint prop_id, const GValue * value, GParamSpec * pspec); guint prop_id, const GValue * value, GParamSpec * pspec);
static void gst_directsoundsink_get_property (GObject * object, static void gst_directsound_sink_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec); guint prop_id, GValue * value, GParamSpec * pspec);
static GstCaps *gst_directsoundsink_getcaps (GstBaseSink * bsink); static GstCaps *gst_directsound_sink_getcaps (GstBaseSink * bsink);
static gboolean gst_directsoundsink_prepare (GstAudioSink * asink, static gboolean gst_directsound_sink_prepare (GstAudioSink * asink,
GstRingBufferSpec * spec); GstRingBufferSpec * spec);
static gboolean gst_directsoundsink_unprepare (GstAudioSink * asink); static gboolean gst_directsound_sink_unprepare (GstAudioSink * asink);
static gboolean gst_directsoundsink_open (GstAudioSink * asink); static gboolean gst_directsound_sink_open (GstAudioSink * asink);
static gboolean gst_directsoundsink_close (GstAudioSink * asink); static gboolean gst_directsound_sink_close (GstAudioSink * asink);
static guint gst_directsoundsink_write (GstAudioSink * asink, gpointer data, static guint gst_directsound_sink_write (GstAudioSink * asink, gpointer data,
guint length); guint length);
static guint gst_directsoundsink_delay (GstAudioSink * asink); static guint gst_directsound_sink_delay (GstAudioSink * asink);
static void gst_directsoundsink_reset (GstAudioSink * asink); static void gst_directsound_sink_reset (GstAudioSink * asink);
static GstStaticPadTemplate directsoundsink_sink_factory = static GstStaticPadTemplate directsoundsink_sink_factory =
@ -71,7 +102,6 @@ static GstStaticPadTemplate directsoundsink_sink_factory =
GST_PAD_SINK, GST_PAD_SINK,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw-int, " GST_STATIC_CAPS ("audio/x-raw-int, "
"endianness = (int) { LITTLE_ENDIAN, BIG_ENDIAN }, "
"signed = (boolean) { TRUE, FALSE }, " "signed = (boolean) { TRUE, FALSE }, "
"width = (int) 16, " "width = (int) 16, "
"depth = (int) 16, " "depth = (int) 16, "
@ -95,17 +125,17 @@ _do_init (GType directsoundsink_type)
"DirectSound sink"); "DirectSound sink");
} }
GST_BOILERPLATE_FULL (GstDirectSoundSink, gst_directsoundsink, GstAudioSink, GST_BOILERPLATE_FULL (GstDirectSoundSink, gst_directsound_sink, GstAudioSink,
GST_TYPE_AUDIO_SINK, _do_init); GST_TYPE_AUDIO_SINK, _do_init);
static void static void
gst_directsoundsink_dispose (GObject * object) gst_directsound_sink_dispose (GObject * object)
{ {
G_OBJECT_CLASS (parent_class)->dispose (object); G_OBJECT_CLASS (parent_class)->dispose (object);
} }
static void static void
gst_directsoundsink_finalise (GObject * object) gst_directsound_sink_finalise (GObject * object)
{ {
GstDirectSoundSink *dsoundsink = GST_DIRECTSOUND_SINK (object); GstDirectSoundSink *dsoundsink = GST_DIRECTSOUND_SINK (object);
@ -115,18 +145,17 @@ gst_directsoundsink_finalise (GObject * object)
} }
static void static void
gst_directsoundsink_base_init (gpointer g_class) gst_directsound_sink_base_init (gpointer g_class)
{ {
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details (element_class, &gst_directsoundsink_details); gst_element_class_set_details (element_class, &gst_directsound_sink_details);
gst_element_class_add_pad_template (element_class, gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&directsoundsink_sink_factory)); gst_static_pad_template_get (&directsoundsink_sink_factory));
} }
static void static void
gst_directsoundsink_class_init (GstDirectSoundSinkClass * klass) gst_directsound_sink_class_init (GstDirectSoundSinkClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
@ -142,34 +171,34 @@ gst_directsoundsink_class_init (GstDirectSoundSinkClass * klass)
parent_class = g_type_class_peek_parent (klass); parent_class = g_type_class_peek_parent (klass);
gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_directsoundsink_dispose); gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_directsound_sink_dispose);
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_directsoundsink_finalise); gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_directsound_sink_finalise);
gobject_class->get_property = gobject_class->get_property =
GST_DEBUG_FUNCPTR (gst_directsoundsink_get_property); GST_DEBUG_FUNCPTR (gst_directsound_sink_get_property);
gobject_class->set_property = gobject_class->set_property =
GST_DEBUG_FUNCPTR (gst_directsoundsink_set_property); GST_DEBUG_FUNCPTR (gst_directsound_sink_set_property);
gstbasesink_class->get_caps = GST_DEBUG_FUNCPTR (gst_directsoundsink_getcaps); gstbasesink_class->get_caps =
GST_DEBUG_FUNCPTR (gst_directsound_sink_getcaps);
gstaudiosink_class->prepare = GST_DEBUG_FUNCPTR (gst_directsoundsink_prepare); gstaudiosink_class->prepare =
GST_DEBUG_FUNCPTR (gst_directsound_sink_prepare);
gstaudiosink_class->unprepare = gstaudiosink_class->unprepare =
GST_DEBUG_FUNCPTR (gst_directsoundsink_unprepare); GST_DEBUG_FUNCPTR (gst_directsound_sink_unprepare);
gstaudiosink_class->open = GST_DEBUG_FUNCPTR (gst_directsoundsink_open); gstaudiosink_class->open = GST_DEBUG_FUNCPTR (gst_directsound_sink_open);
gstaudiosink_class->close = GST_DEBUG_FUNCPTR (gst_directsoundsink_close); gstaudiosink_class->close = GST_DEBUG_FUNCPTR (gst_directsound_sink_close);
gstaudiosink_class->write = GST_DEBUG_FUNCPTR (gst_directsoundsink_write); gstaudiosink_class->write = GST_DEBUG_FUNCPTR (gst_directsound_sink_write);
gstaudiosink_class->delay = GST_DEBUG_FUNCPTR (gst_directsound_sink_delay);
gstaudiosink_class->delay = GST_DEBUG_FUNCPTR (gst_directsoundsink_delay); gstaudiosink_class->reset = GST_DEBUG_FUNCPTR (gst_directsound_sink_reset);
gstaudiosink_class->reset = GST_DEBUG_FUNCPTR (gst_directsoundsink_reset);
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_ATTENUATION, g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_ATTENUATION,
g_param_spec_long ("attenuation", "Attenuation of the sound", g_param_spec_long ("attenuation", "Attenuation of the sound",
"The attenuation for the directsound buffer (default is 0 so the directsound buffer will not be attenuated)", "The attenuation for the directsound buffer (default is 0 so the directsound buffer will not be attenuated)",
-10000, 0, 0, G_PARAM_READWRITE)); -10000, 0, 0, G_PARAM_READWRITE));
} }
static void static void
gst_directsoundsink_set_property (GObject * object, guint prop_id, gst_directsound_sink_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec) const GValue * value, GParamSpec * pspec)
{ {
GstDirectSoundSink *dsoundsink; GstDirectSoundSink *dsoundsink;
@ -198,7 +227,7 @@ gst_directsoundsink_set_property (GObject * object, guint prop_id,
} }
static void static void
gst_directsoundsink_get_property (GObject * object, guint prop_id, gst_directsound_sink_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec) GValue * value, GParamSpec * pspec)
{ {
GstDirectSoundSink *dsoundsink; GstDirectSoundSink *dsoundsink;
@ -216,7 +245,7 @@ gst_directsoundsink_get_property (GObject * object, guint prop_id,
} }
static void static void
gst_directsoundsink_init (GstDirectSoundSink * dsoundsink, gst_directsound_sink_init (GstDirectSoundSink * dsoundsink,
GstDirectSoundSinkClass * g_class) GstDirectSoundSinkClass * g_class)
{ {
dsoundsink->pDS = NULL; dsoundsink->pDS = NULL;
@ -229,7 +258,7 @@ gst_directsoundsink_init (GstDirectSoundSink * dsoundsink,
} }
static GstCaps * static GstCaps *
gst_directsoundsink_getcaps (GstBaseSink * bsink) gst_directsound_sink_getcaps (GstBaseSink * bsink)
{ {
GstDirectSoundSink *dsoundsink; GstDirectSoundSink *dsoundsink;
@ -241,17 +270,15 @@ gst_directsoundsink_getcaps (GstBaseSink * bsink)
} }
static gboolean static gboolean
gst_directsoundsink_open (GstAudioSink * asink) gst_directsound_sink_open (GstAudioSink * asink)
{ {
GstDirectSoundSink *dsoundsink; GstDirectSoundSink *dsoundsink = GST_DIRECTSOUND_SINK (asink);
HRESULT hRes; HRESULT hRes;
dsoundsink = GST_DIRECTSOUND_SINK (asink);
/* create and initialize a DirecSound object */ /* create and initialize a DirecSound object */
if (FAILED (hRes = DirectSoundCreate (NULL, &dsoundsink->pDS, NULL))) { if (FAILED (hRes = DirectSoundCreate (NULL, &dsoundsink->pDS, NULL))) {
GST_ELEMENT_ERROR (dsoundsink, RESOURCE, OPEN_READ, GST_ELEMENT_ERROR (dsoundsink, RESOURCE, OPEN_READ,
("gst_directsoundsink_open: DirectSoundCreate: %s", ("gst_directsound_sink_open: DirectSoundCreate: %s",
DXGetErrorString9 (hRes)), (NULL)); DXGetErrorString9 (hRes)), (NULL));
return FALSE; return FALSE;
} }
@ -259,7 +286,7 @@ gst_directsoundsink_open (GstAudioSink * asink)
if (FAILED (hRes = IDirectSound_SetCooperativeLevel (dsoundsink->pDS, if (FAILED (hRes = IDirectSound_SetCooperativeLevel (dsoundsink->pDS,
GetDesktopWindow (), DSSCL_PRIORITY))) { GetDesktopWindow (), DSSCL_PRIORITY))) {
GST_ELEMENT_ERROR (dsoundsink, RESOURCE, OPEN_READ, GST_ELEMENT_ERROR (dsoundsink, RESOURCE, OPEN_READ,
("gst_directsoundsink_open: IDirectSound_SetCooperativeLevel: %s", ("gst_directsound_sink_open: IDirectSound_SetCooperativeLevel: %s",
DXGetErrorString9 (hRes)), (NULL)); DXGetErrorString9 (hRes)), (NULL));
return FALSE; return FALSE;
} }
@ -268,15 +295,13 @@ gst_directsoundsink_open (GstAudioSink * asink)
} }
static gboolean static gboolean
gst_directsoundsink_prepare (GstAudioSink * asink, GstRingBufferSpec * spec) gst_directsound_sink_prepare (GstAudioSink * asink, GstRingBufferSpec * spec)
{ {
GstDirectSoundSink *dsoundsink; GstDirectSoundSink *dsoundsink = GST_DIRECTSOUND_SINK (asink);
HRESULT hRes; HRESULT hRes;
DSBUFFERDESC descSecondary; DSBUFFERDESC descSecondary;
WAVEFORMATEX wfx; WAVEFORMATEX wfx;
dsoundsink = GST_DIRECTSOUND_SINK (asink);
/*save number of bytes per sample */ /*save number of bytes per sample */
dsoundsink->bytes_per_sample = spec->bytes_per_sample; dsoundsink->bytes_per_sample = spec->bytes_per_sample;
@ -293,7 +318,7 @@ gst_directsoundsink_prepare (GstAudioSink * asink, GstRingBufferSpec * spec)
/* directsound buffer size can handle 1/2 sec of the stream */ /* directsound buffer size can handle 1/2 sec of the stream */
dsoundsink->buffer_size = wfx.nAvgBytesPerSec / 2; dsoundsink->buffer_size = wfx.nAvgBytesPerSec / 2;
GST_CAT_INFO (directsoundsink_debug, GST_INFO_OBJECT (dsoundsink,
"GstRingBufferSpec->channels: %d, GstRingBufferSpec->rate: %d, GstRingBufferSpec->bytes_per_sample: %d\n" "GstRingBufferSpec->channels: %d, GstRingBufferSpec->rate: %d, GstRingBufferSpec->bytes_per_sample: %d\n"
"WAVEFORMATEX.nSamplesPerSec: %ld, WAVEFORMATEX.wBitsPerSample: %d, WAVEFORMATEX.nBlockAlign: %d, WAVEFORMATEX.nAvgBytesPerSec: %ld\n" "WAVEFORMATEX.nSamplesPerSec: %ld, WAVEFORMATEX.wBitsPerSample: %d, WAVEFORMATEX.nBlockAlign: %d, WAVEFORMATEX.nAvgBytesPerSec: %ld\n"
"Size of dsound cirucular buffe=>%d\n", spec->channels, spec->rate, "Size of dsound cirucular buffe=>%d\n", spec->channels, spec->rate,
@ -313,7 +338,7 @@ gst_directsoundsink_prepare (GstAudioSink * asink, GstRingBufferSpec * spec)
&dsoundsink->pDSBSecondary, NULL); &dsoundsink->pDSBSecondary, NULL);
if (FAILED (hRes)) { if (FAILED (hRes)) {
GST_ELEMENT_ERROR (dsoundsink, RESOURCE, OPEN_READ, GST_ELEMENT_ERROR (dsoundsink, RESOURCE, OPEN_READ,
("gst_directsoundsink_prepare: IDirectSound_CreateSoundBuffer: %s", ("gst_directsound_sink_prepare: IDirectSound_CreateSoundBuffer: %s",
DXGetErrorString9 (hRes)), (NULL)); DXGetErrorString9 (hRes)), (NULL));
return FALSE; return FALSE;
} }
@ -326,7 +351,7 @@ gst_directsoundsink_prepare (GstAudioSink * asink, GstRingBufferSpec * spec)
} }
static gboolean static gboolean
gst_directsoundsink_unprepare (GstAudioSink * asink) gst_directsound_sink_unprepare (GstAudioSink * asink)
{ {
GstDirectSoundSink *dsoundsink; GstDirectSoundSink *dsoundsink;
@ -340,7 +365,7 @@ gst_directsoundsink_unprepare (GstAudioSink * asink)
} }
static gboolean static gboolean
gst_directsoundsink_close (GstAudioSink * asink) gst_directsound_sink_close (GstAudioSink * asink)
{ {
GstDirectSoundSink *dsoundsink = NULL; GstDirectSoundSink *dsoundsink = NULL;
@ -353,9 +378,8 @@ gst_directsoundsink_close (GstAudioSink * asink)
return TRUE; return TRUE;
} }
static guint static guint
gst_directsoundsink_write (GstAudioSink * asink, gpointer data, guint length) gst_directsound_sink_write (GstAudioSink * asink, gpointer data, guint length)
{ {
GstDirectSoundSink *dsoundsink; GstDirectSoundSink *dsoundsink;
DWORD dwStatus; DWORD dwStatus;
@ -445,7 +469,7 @@ gst_directsoundsink_write (GstAudioSink * asink, gpointer data, guint length)
} }
static guint static guint
gst_directsoundsink_delay (GstAudioSink * asink) gst_directsound_sink_delay (GstAudioSink * asink)
{ {
GstDirectSoundSink *dsoundsink; GstDirectSoundSink *dsoundsink;
HRESULT hRes; HRESULT hRes;
@ -481,9 +505,8 @@ gst_directsoundsink_delay (GstAudioSink * asink)
} }
static void static void
gst_directsoundsink_reset (GstAudioSink * asink) gst_directsound_sink_reset (GstAudioSink * asink)
{ {
/*not tested for seeking */
GstDirectSoundSink *dsoundsink; GstDirectSoundSink *dsoundsink;
LPVOID pLockedBuffer = NULL; LPVOID pLockedBuffer = NULL;
DWORD dwSizeBuffer = 0; DWORD dwSizeBuffer = 0;

View file

@ -32,7 +32,7 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_DIRECTSOUND_SINK (gst_directsoundsink_get_type()) #define GST_TYPE_DIRECTSOUND_SINK (gst_directsound_sink_get_type())
#define GST_DIRECTSOUND_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DIRECTSOUND_SINK,GstDirectSoundSink)) #define GST_DIRECTSOUND_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DIRECTSOUND_SINK,GstDirectSoundSink))
#define GST_DIRECTSOUND_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DIRECTSOUND_SINK,GstDirectSoundSinkClass)) #define GST_DIRECTSOUND_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DIRECTSOUND_SINK,GstDirectSoundSinkClass))
#define GST_IS_DIRECTSOUND_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DIRECTSOUND_SINK)) #define GST_IS_DIRECTSOUND_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DIRECTSOUND_SINK))
@ -71,7 +71,7 @@ struct _GstDirectSoundSinkClass
GstAudioSinkClass parent_class; GstAudioSinkClass parent_class;
}; };
GType gst_directsoundsink_get_type (void); GType gst_directsound_sink_get_type (void);
G_END_DECLS G_END_DECLS
#endif /* __GST_DIRECTSOUNDSINK_H__ */ #endif /* __GST_DIRECTSOUNDSINK_H__ */

View file

@ -1,5 +1,6 @@
win32/MANIFEST win32/MANIFEST
win32/common/config.h win32/common/config.h
win32/common/config.h.in
win32/vs6/gst_plugins_bad.dsw win32/vs6/gst_plugins_bad.dsw
win32/vs6/libgstdirectdraw.dsp win32/vs6/libgstdirectdraw.dsp
win32/vs6/libgstdirectsound.dsp win32/vs6/libgstdirectsound.dsp

239
win32/common/config.h.in Normal file
View file

@ -0,0 +1,239 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* This copy of config.h.in is specifically for win32 Visual Studio builds */
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#undef ENABLE_NLS
/* gettext package name */
#define GETTEXT_PACKAGE "@GETTEXT_PACKAGE@"
/* macro to use to show function name */
#define GST_FUNCTION "(function)"
/* Defined if gcov is enabled to force a rebuild due to config.h changing */
#undef GST_GCOV_ENABLED
/* Default errorlevel to use */
#undef GST_LEVEL_DEFAULT
/* GStreamer license */
#define GST_LICENSE "@GST_LICENSE@"
/* package name in plugins */
#define GST_PACKAGE_NAME "@GST_PACKAGE_NAME@"
/* package origin */
#define GST_PACKAGE_ORIGIN "@GST_PACKAGE_ORIGIN@"
/* support for features: gstalsa */
#undef HAVE_ALSA
/* support for features: cdparanoia */
#undef HAVE_CDPARANOIA
/* Define if the host CPU is an Alpha */
#undef HAVE_CPU_ALPHA
/* Define if the host CPU is an ARM */
#undef HAVE_CPU_ARM
/* Define if the host CPU is a HPPA */
#undef HAVE_CPU_HPPA
/* Define if the host CPU is an x86 */
#undef HAVE_CPU_I386
/* Define if the host CPU is a IA64 */
#undef HAVE_CPU_IA64
/* Define if the host CPU is a M68K */
#undef HAVE_CPU_M68K
/* Define if the host CPU is a MIPS */
#undef HAVE_CPU_MIPS
/* Define if the host CPU is a PowerPC */
#undef HAVE_CPU_PPC
/* Define if the host CPU is a S390 */
#undef HAVE_CPU_S390
/* Define if the host CPU is a SPARC */
#undef HAVE_CPU_SPARC
/* Define if the host CPU is a x86_64 */
#undef HAVE_CPU_X86_64
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
#undef HAVE_DCGETTEXT
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* support for features: */
#undef HAVE_EXTERNAL
/* FIONREAD ioctl found in sys/filio.h */
#undef HAVE_FIONREAD_IN_SYS_FILIO
/* FIONREAD ioctl found in sys/ioclt.h */
#undef HAVE_FIONREAD_IN_SYS_IOCTL
/* defined if the compiler implements __func__ */
#undef HAVE_FUNC
/* defined if the compiler implements __FUNCTION__ */
#undef HAVE_FUNCTION
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
/* support for features: gnomevfssrc */
#undef HAVE_GNOME_VFS
/* support for features: v4lsrc v4lmjpegsrc v4lmjpegsink */
#undef HAVE_GST_V4L
/* Define if you have the iconv() function. */
#undef HAVE_ICONV
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `asound' library (-lasound). */
#undef HAVE_LIBASOUND
/* support for features: libvisual */
#undef HAVE_LIBVISUAL
/* Define if you have C99's lrint function. */
#undef HAVE_LRINT
/* Define if you have C99's lrintf function. */
#undef HAVE_LRINTF
/* Define to 1 if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* support for features: oggdemux oggmux */
#undef HAVE_OGG
/* support for features: pango */
#undef HAVE_PANGO
/* defined if the compiler implements __PRETTY_FUNCTION__ */
#undef HAVE_PRETTY_FUNCTION
/* Define if RDTSC is available */
#undef HAVE_RDTSC
/* Define to 1 if you have the <regex.h> header file. */
#undef HAVE_REGEX_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H 1
/* support for features: theoradec theoraenc */
#undef HAVE_THEORA
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if valgrind should be used */
#undef HAVE_VALGRIND
/* support for features: vorbisenc vorbisdec */
#undef HAVE_VORBIS
/* defined if vorbis_synthesis_restart is present */
#undef HAVE_VORBIS_SYNTHESIS_RESTART
/* support for features: ximagesink */
#undef HAVE_X
/* support for features: xshm */
#undef HAVE_XSHM
/* support for features: xvimagesink */
#undef HAVE_XVIDEO
/* gettext locale dir */
#define LOCALEDIR PREFIX "\\share\\locale"
/* Name of package */
#define PACKAGE "@PACKAGE@"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
/* Define to the full name of this package. */
#undef PACKAGE_NAME "@PACKAGE_NAME@"
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING "@PACKAGE_STRING@"
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME "@PACKAGE_TARNAME@"
/* Define to the version of this package. */
#undef PACKAGE_VERSION "@PACKAGE_VERSION@"
/* directory where plugins are located */
#undef PLUGINDIR
/* The size of a `char', as computed by sizeof. */
#undef SIZEOF_CHAR
/* The size of a `int', as computed by sizeof. */
#undef SIZEOF_INT
/* The size of a `long', as computed by sizeof. */
#undef SIZEOF_LONG
/* The size of a `short', as computed by sizeof. */
#undef SIZEOF_SHORT
/* The size of a `void*', as computed by sizeof. */
#undef SIZEOF_VOIDP
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#define VERSION "@VERSION@"
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Define to 1 if the X Window System is missing or not being used. */
#undef X_DISPLAY_MISSING
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#undef inline
#endif