Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/gst-plugins-good.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schleef <ds@entropywave.com>2011-03-25 00:34:24 +0300
committerDavid Schleef <ds@schleef.org>2011-04-14 03:53:30 +0400
commit8c07e522364a5a35a7b079965cddec17acfc26af (patch)
tree116030dbae66e85bf2c19c57d5e5cbcfb65d7f92 /sys/directsound/gstdirectsoundsink.c
parenteb15dcb47389b0fcb2929bc62f0e53bac55838f6 (diff)
directsoundsink: Add conditionals on WAVE_FORMAT_DOLBY_AC3_SPDIF
Diffstat (limited to 'sys/directsound/gstdirectsoundsink.c')
-rw-r--r--sys/directsound/gstdirectsoundsink.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/directsound/gstdirectsoundsink.c b/sys/directsound/gstdirectsoundsink.c
index 462c41210..4eef182fe 100644
--- a/sys/directsound/gstdirectsoundsink.c
+++ b/sys/directsound/gstdirectsoundsink.c
@@ -468,6 +468,7 @@ gst_directsound_sink_prepare (GstAudioSink * asink, GstRingBufferSpec * spec)
spec->segsize += spec->segsize % spec->bytes_per_sample;
spec->segtotal = dsoundsink->buffer_size / spec->segsize;
} else {
+#ifdef WAVE_FORMAT_DOLBY_AC3_SPDIF
wfx.cbSize = 0;
wfx.wFormatTag = WAVE_FORMAT_DOLBY_AC3_SPDIF;
wfx.nChannels = 2;
@@ -478,6 +479,9 @@ gst_directsound_sink_prepare (GstAudioSink * asink, GstRingBufferSpec * spec)
spec->segsize = 6144;
spec->segtotal = 10;
+#else
+ g_assert_not_reached ();
+#endif
}
// Make the final buffer size be an integer number of segments
@@ -738,6 +742,7 @@ gst_directsound_probe_supported_formats (GstDirectSoundSink * dsoundsink,
* Check availability of digital output by trying to create an SPDIF buffer
*/
+#ifdef WAVE_FORMAT_DOLBY_AC3_SPDIF
/* fill the WAVEFORMATEX structure with some standard AC3 over SPDIF params */
memset (&wfx, 0, sizeof (wfx));
wfx.cbSize = 0;
@@ -772,6 +777,9 @@ gst_directsound_probe_supported_formats (GstDirectSoundSink * dsoundsink,
DXGetErrorString9 (hRes));
}
}
+#else
+ caps = gst_caps_subtract (caps, gst_caps_new_simple ("audio/x-iec958", NULL));
+#endif
return caps;
}