| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
#ifndef __GST_DIRECTSOUNDSINK_H__ |
| 31 |
#define __GST_DIRECTSOUNDSINK_H__ |
| 32 |
|
| 33 |
#include <gst/gst.h> |
| 34 |
#include <gst/audio/audio.h> |
| 35 |
#include <gst/audio/gstaudiosink.h> |
| 36 |
|
| 37 |
#include <windows.h> |
| 38 |
#include <dxerr9.h> |
| 39 |
#include <dsound.h> |
| 40 |
#include <mmreg.h> |
| 41 |
#include <ks.h> |
| 42 |
#include <ksmedia.h> |
| 43 |
|
| 44 |
G_BEGIN_DECLS |
| 45 |
#define GST_TYPE_DIRECTSOUND_SINK (gst_directsound_sink_get_type()) |
| 46 |
#define GST_DIRECTSOUND_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DIRECTSOUND_SINK,GstDirectSoundSink)) |
| 47 |
#define GST_DIRECTSOUND_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DIRECTSOUND_SINK,GstDirectSoundSinkClass)) |
| 48 |
#define GST_IS_DIRECTSOUND_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DIRECTSOUND_SINK)) |
| 49 |
#define GST_IS_DIRECTSOUND_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DIRECTSOUND_SINK)) |
| 50 |
typedef struct _GstDirectSoundSink GstDirectSoundSink; |
| 51 |
typedef struct _GstDirectSoundSinkClass GstDirectSoundSinkClass; |
| 52 |
|
| 53 |
#define GST_DSOUND_LOCK(obj) (g_mutex_lock (&obj->dsound_lock)) |
| 54 |
#define GST_DSOUND_UNLOCK(obj) (g_mutex_unlock (&obj->dsound_lock)) |
| 55 |
|
| 56 |
struct _GstDirectSoundSink |
| 57 |
{ |
| 58 |
GstAudioSink sink; |
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
LPDIRECTSOUND pDS; |
| 63 |
|
| 64 |
|
| 65 |
LPDIRECTSOUNDBUFFER pDSBSecondary; |
| 66 |
|
| 67 |
|
| 68 |
guint buffer_size; |
| 69 |
|
| 70 |
|
| 71 |
guint current_circular_offset; |
| 72 |
|
| 73 |
guint bytes_per_sample; |
| 74 |
|
| 75 |
|
| 76 |
glong volume; |
| 77 |
gboolean mute; |
| 78 |
gchar * device_id; |
| 79 |
gchar * device_name; |
| 80 |
|
| 81 |
GstCaps *cached_caps; |
| 82 |
|
| 83 |
GMutex dsound_lock; |
| 84 |
|
| 85 |
gboolean first_buffer_after_reset; |
| 86 |
|
| 87 |
GstAudioRingBufferFormatType type; |
| 88 |
}; |
| 89 |
|
| 90 |
struct _GstDirectSoundSinkClass |
| 91 |
{ |
| 92 |
GstAudioSinkClass parent_class; |
| 93 |
}; |
| 94 |
|
| 95 |
GType gst_directsound_sink_get_type (void); |
| 96 |
|
| 97 |
G_END_DECLS |
| 98 |
#endif |