[0.11] gst-plugins-base: riff: Add the layout field to the raw audio caps

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


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

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Sat Dec 31 13:50:04 2011 +0100

riff: Add the layout field to the raw audio caps

---

 gst-libs/gst/riff/riff-media.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gst-libs/gst/riff/riff-media.c b/gst-libs/gst/riff/riff-media.c
index 259576a..5fae542 100644
--- a/gst-libs/gst/riff/riff-media.c
+++ b/gst-libs/gst/riff/riff-media.c
@@ -1151,6 +1151,7 @@ gst_riff_create_audio_caps (guint16 codec_id,
 
         caps = gst_caps_new_simple ("audio/x-raw",
             "format", G_TYPE_STRING, gst_audio_format_to_string (format),
+            "layout", G_TYPE_STRING, "interleaved",
             "channels", G_TYPE_INT, ch, NULL);
 
         /* Add default channel layout. In theory this should be done
@@ -1169,7 +1170,7 @@ gst_riff_create_audio_caps (guint16 codec_id,
         /* FIXME: this is pretty useless - we need fixed caps */
         caps = gst_caps_from_string ("audio/x-raw, "
             "format = (string) { S8, U8, S16LE, U16LE, S24LE, "
-            "U24LE, S32LE, U32LE }");
+            "U24LE, S32LE, U32LE }, " "layout = (string) interleaved");
       }
       if (codec_name && strf)
         *codec_name = g_strdup_printf ("Uncompressed %d-bit PCM audio",
@@ -1195,6 +1196,7 @@ gst_riff_create_audio_caps (guint16 codec_id,
 
         caps = gst_caps_new_simple ("audio/x-raw",
             "format", G_TYPE_STRING, wd == 64 ? "F64LE" : "F32LE",
+            "layout", G_TYPE_STRING, "interleaved",
             "channels", G_TYPE_INT, ch, NULL);
 
         /* Add default channel layout. In theory this should be done
@@ -1212,7 +1214,8 @@ gst_riff_create_audio_caps (guint16 codec_id,
       } else {
         /* FIXME: this is pretty useless - we need fixed caps */
         caps = gst_caps_from_string ("audio/x-raw, "
-            "format = (string) { F32LE, F64LE }");
+            "format = (string) { F32LE, F64LE }, "
+            "layout = (string) interleaved");
       }
       if (codec_name && strf)
         *codec_name = g_strdup_printf ("Uncompressed %d-bit IEEE float audio",
@@ -1515,6 +1518,7 @@ gst_riff_create_audio_caps (guint16 codec_id,
 
             caps = gst_caps_new_simple ("audio/x-raw",
                 "format", G_TYPE_STRING, gst_audio_format_to_string (format),
+                "layout", G_TYPE_STRING, "interleaved",
                 "channels", G_TYPE_INT, strf->channels,
                 "rate", G_TYPE_INT, strf->rate, NULL);
 
@@ -1547,6 +1551,7 @@ gst_riff_create_audio_caps (guint16 codec_id,
 
             caps = gst_caps_new_simple ("audio/x-raw",
                 "format", G_TYPE_STRING, wd == 32 ? "F32LE" : "F64LE",
+                "layout", G_TYPE_STRING, "interleaved",
                 "channels", G_TYPE_INT, strf->channels,
                 "rate", G_TYPE_INT, strf->rate, NULL);
 



More information about the gstreamer-commits mailing list