mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
directsoundsink: Add conditionals on WAVE_FORMAT_DOLBY_AC3_SPDIF
This commit is contained in:
parent
eb15dcb473
commit
8c07e52236
1 changed files with 8 additions and 0 deletions
|
@ -468,6 +468,7 @@ gst_directsound_sink_prepare (GstAudioSink * asink, GstRingBufferSpec * spec)
|
||||||
spec->segsize += spec->segsize % spec->bytes_per_sample;
|
spec->segsize += spec->segsize % spec->bytes_per_sample;
|
||||||
spec->segtotal = dsoundsink->buffer_size / spec->segsize;
|
spec->segtotal = dsoundsink->buffer_size / spec->segsize;
|
||||||
} else {
|
} else {
|
||||||
|
#ifdef WAVE_FORMAT_DOLBY_AC3_SPDIF
|
||||||
wfx.cbSize = 0;
|
wfx.cbSize = 0;
|
||||||
wfx.wFormatTag = WAVE_FORMAT_DOLBY_AC3_SPDIF;
|
wfx.wFormatTag = WAVE_FORMAT_DOLBY_AC3_SPDIF;
|
||||||
wfx.nChannels = 2;
|
wfx.nChannels = 2;
|
||||||
|
@ -478,6 +479,9 @@ gst_directsound_sink_prepare (GstAudioSink * asink, GstRingBufferSpec * spec)
|
||||||
|
|
||||||
spec->segsize = 6144;
|
spec->segsize = 6144;
|
||||||
spec->segtotal = 10;
|
spec->segtotal = 10;
|
||||||
|
#else
|
||||||
|
g_assert_not_reached ();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make the final buffer size be an integer number of segments
|
// 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
|
* 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 */
|
/* fill the WAVEFORMATEX structure with some standard AC3 over SPDIF params */
|
||||||
memset (&wfx, 0, sizeof (wfx));
|
memset (&wfx, 0, sizeof (wfx));
|
||||||
wfx.cbSize = 0;
|
wfx.cbSize = 0;
|
||||||
|
@ -772,6 +777,9 @@ gst_directsound_probe_supported_formats (GstDirectSoundSink * dsoundsink,
|
||||||
DXGetErrorString9 (hRes));
|
DXGetErrorString9 (hRes));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
caps = gst_caps_subtract (caps, gst_caps_new_simple ("audio/x-iec958", NULL));
|
||||||
|
#endif
|
||||||
|
|
||||||
return caps;
|
return caps;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue