summaryrefslogtreecommitdiff
path: root/gst/interleave
diff options
context:
space:
mode:
authorAntonio Ospite <ao2@ao2.it>2014-08-29 15:07:58 +0200
committerTim-Philipp Müller <tim@centricular.com>2016-01-12 22:11:30 +0000
commitbdcc0390aff2b91ceb48fb169e7c155f3e84f4ba (patch)
treec8ca3659cb738c8615781783b7346ca3ba03c389 /gst/interleave
parent205565ccd9f93968265e76019426d9b048e2d3eb (diff)
downloadgstreamer-plugins-good-bdcc0390aff2b91ceb48fb169e7c155f3e84f4ba.tar.gz
interleave: Fix the example by setting channel-masks in the sink pads
The current example does not work, it fails with: ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstWavParse:wavparse0: Internal data flow error. gstwavparse.c(2178): gst_wavparse_loop (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstWavParse:wavparse0: streaming task paused, reason not-negotiated (-4) This is because negotiation with wavenc gets messed up by the missing channel positions configuration. The proper way to define the channel layout when using the interleave element in code would be to set the channel-positions property, but gst-launch-1.0 does not know how to deal with arrays; so the example pipeline works around the issue by setting the channel-masks in the sink pads. Also fix a repetition in the deinterleave example description https://bugzilla.gnome.org/show_bug.cgi?id=735673
Diffstat (limited to 'gst/interleave')
-rw-r--r--gst/interleave/interleave.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gst/interleave/interleave.c b/gst/interleave/interleave.c
index f27591a9d..45d72f9f9 100644
--- a/gst/interleave/interleave.c
+++ b/gst/interleave/interleave.c
@@ -49,11 +49,14 @@
* |[
* gst-launch-1.0 filesrc location=file.mp3 ! decodebin ! audioconvert ! "audio/x-raw,channels=2" ! deinterleave name=d interleave name=i ! audioconvert ! wavenc ! filesink location=test.wav d.src_0 ! queue ! audioconvert ! i.sink_1 d.src_1 ! queue ! audioconvert ! i.sink_0
* ]| Decodes and deinterleaves a Stereo MP3 file into separate channels and
- * then interleaves the channels again to a WAV file with the channel with the
- * channels exchanged.
+ * then interleaves the channels again to a WAV file with the channels
+ * exchanged.
* |[
- * gst-launch-1.0 interleave name=i ! audioconvert ! wavenc ! filesink location=file.wav filesrc location=file1.wav ! decodebin ! audioconvert ! "audio/x-raw,channels=1" ! queue ! i.sink_0 filesrc location=file2.wav ! decodebin ! audioconvert ! "audio/x-raw,channels=1" ! queue ! i.sink_1
- * ]| Interleaves two Mono WAV files to a single Stereo WAV file.
+ * gst-launch-1.0 interleave name=i ! audioconvert ! wavenc ! filesink location=file.wav filesrc location=file1.wav ! decodebin ! audioconvert ! "audio/x-raw,channels=1,channel-mask=(bitmask)0x1" ! queue ! i.sink_0 filesrc location=file2.wav ! decodebin ! audioconvert ! "audio/x-raw,channels=1,channel-mask=(bitmask)0x2" ! queue ! i.sink_1
+ * ]| Interleaves two Mono WAV files to a single Stereo WAV file. Having
+ * channel-masks defined in the sink pads ensures a sane mapping of the mono
+ * streams into the stereo stream. NOTE: the proper way to map channels in
+ * code is by using the channel-positions property of the interleave element.
* </refsect2>
*/