[0.11] gst-plugins-good: matroska: Update for the new raw audio interleaved caps field

Sebastian Dröge slomo at kemper.freedesktop.org
Thu Jan 5 01:37:29 PST 2012


Module: gst-plugins-good
Branch: 0.11
Commit: dd84b002b0a6b3e810cdcddafb8781d4df478189
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=dd84b002b0a6b3e810cdcddafb8781d4df478189

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Wed Jan  4 11:52:29 2012 +0100

matroska: Update for the new raw audio interleaved caps field

Still needs to be fixed to handle the multichannel channel-mask
and reordering.

---

 gst/matroska/matroska-demux.c |   11 ++++++++---
 gst/matroska/matroska-mux.c   |    1 +
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
index 006184d..404071c 100644
--- a/gst/matroska/matroska-demux.c
+++ b/gst/matroska/matroska-demux.c
@@ -5191,8 +5191,10 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext *
     format = gst_audio_format_build_integer (sign, endianness,
         audiocontext->bitdepth, audiocontext->bitdepth);
 
+    /* FIXME: Channel mask and reordering */
     caps = gst_caps_new_simple ("audio/x-raw",
-        "format", G_TYPE_STRING, gst_audio_format_to_string (format), NULL);
+        "format", G_TYPE_STRING, gst_audio_format_to_string (format),
+        "layout", G_TYPE_STRING, "interleaved", NULL);
 
     *codec_name = g_strdup_printf ("Raw %d-bit PCM audio",
         audiocontext->bitdepth);
@@ -5203,8 +5205,10 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext *
       format = "F32LE";
     else
       format = "F64LE";
+    /* FIXME: Channel mask and reordering */
     caps = gst_caps_new_simple ("audio/x-raw",
-        "format", G_TYPE_STRING, format, NULL);
+        "format", G_TYPE_STRING, format,
+        "layout", G_TYPE_STRING, "interleaved", NULL);
     *codec_name = g_strdup_printf ("Raw %d-bit floating-point audio",
         audiocontext->bitdepth);
     context->alignment = audiocontext->bitdepth / 8;
@@ -5251,8 +5255,9 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext *
       if (riff_audio_fmt)
         *riff_audio_fmt = auds.format;
 
+      /* FIXME: Handle reorder map */
       caps = gst_riff_create_audio_caps (auds.format, NULL, &auds, NULL,
-          codec_data, codec_name);
+          codec_data, codec_name, NULL);
       gst_buffer_unref (codec_data);
 
       if (caps == NULL) {
diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c
index a40d918..f02c171 100644
--- a/gst/matroska/matroska-mux.c
+++ b/gst/matroska/matroska-mux.c
@@ -166,6 +166,7 @@ static GstStaticPadTemplate audiosink_templ =
         COMMON_AUDIO_CAPS "; "
         "audio/x-raw, "
         "format = (string) { U8, S16BE, S16LE, S24BE, S24LE, S32BE, S32LE, F32LE, F64LE }, "
+        "layout = (string) interleaved, "
         COMMON_AUDIO_CAPS ";"
         "audio/x-tta, "
         "width = (int) { 8, 16, 24 }, "



More information about the gstreamer-commits mailing list