[0.11] gst-plugins-base: ext: Add new 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: 75f91ebea0eabcc085c0d6c0d45456dfe4ff796a
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=75f91ebea0eabcc085c0d6c0d45456dfe4ff796a

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Sat Dec 31 14:25:09 2011 +0100

ext: Add new layout field to the raw audio caps

---

 ext/alsa/gstalsasink.c    |    1 +
 ext/alsa/gstalsasrc.c     |    1 +
 ext/libvisual/visual.c    |    2 +-
 ext/ogg/gstoggstream.c    |    1 +
 ext/vorbis/gstvorbisenc.c |    4 ++++
 5 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/ext/alsa/gstalsasink.c b/ext/alsa/gstalsasink.c
index 7ae9e51..45deb50 100644
--- a/ext/alsa/gstalsasink.c
+++ b/ext/alsa/gstalsasink.c
@@ -102,6 +102,7 @@ static GstStaticPadTemplate alsasink_sink_factory =
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS ("audio/x-raw, "
         "format = (string) " GST_AUDIO_FORMATS_ALL ", "
+        "layout = (string) interleaved, "
         "rate = (int) [ 1, MAX ], " "channels = (int) [ 1, MAX ]; "
         "audio/x-iec958")
     );
diff --git a/ext/alsa/gstalsasrc.c b/ext/alsa/gstalsasrc.c
index 2d21c88..c28fe0f 100644
--- a/ext/alsa/gstalsasrc.c
+++ b/ext/alsa/gstalsasrc.c
@@ -107,6 +107,7 @@ GST_STATIC_PAD_TEMPLATE ("src",
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS ("audio/x-raw, "
         "format = (string) " GST_AUDIO_FORMATS_ALL ", "
+        "layout = (string) interleaved, "
         "rate = (int) [ 1, MAX ], " "channels = (int) [ 1, MAX ]")
     );
 
diff --git a/ext/libvisual/visual.c b/ext/libvisual/visual.c
index c95e96f..93ce600 100644
--- a/ext/libvisual/visual.c
+++ b/ext/libvisual/visual.c
@@ -113,7 +113,7 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS ("audio/x-raw, "
         "format = (string) " GST_AUDIO_NE (S16) ", "
-        "channels = (int) { 1, 2 }, "
+        "layout = (string) interleaved, " "channels = (int) { 1, 2 }, "
 #if defined(VISUAL_API_VERSION) && VISUAL_API_VERSION >= 4000 && VISUAL_API_VERSION < 5000
         "rate = (int) { 8000, 11250, 22500, 32000, 44100, 48000, 96000 }"
 #else
diff --git a/ext/ogg/gstoggstream.c b/ext/ogg/gstoggstream.c
index 6063aee..08a1842 100644
--- a/ext/ogg/gstoggstream.c
+++ b/ext/ogg/gstoggstream.c
@@ -1651,6 +1651,7 @@ setup_pcm_mapper (GstOggStream * pad, ogg_packet * packet)
   }
 
   gst_caps_set_simple (caps,
+      "layout", G_TYPE_STRING, "interleaved",
       "rate", G_TYPE_INT, pad->granulerate_n,
       "channels", G_TYPE_INT, channels, NULL);
   pad->caps = caps;
diff --git a/ext/vorbis/gstvorbisenc.c b/ext/vorbis/gstvorbisenc.c
index 518b604..e95d15d 100644
--- a/ext/vorbis/gstvorbisenc.c
+++ b/ext/vorbis/gstvorbisenc.c
@@ -64,6 +64,7 @@ GST_STATIC_PAD_TEMPLATE ("sink",
     GST_PAD_ALWAYS,
     GST_STATIC_CAPS ("audio/x-raw, "
         "format = (string) " GST_AUDIO_NE (F32) ", "
+        "layout = (string) interleaved, "
         "rate = (int) [ 1, 200000 ], " "channels = (int) [ 1, 255 ]")
     );
 
@@ -260,6 +261,7 @@ gst_vorbis_enc_generate_sink_caps (void)
 
   gst_caps_append_structure (caps, gst_structure_new ("audio/x-raw",
           "format", G_TYPE_STRING, GST_AUDIO_NE (F32),
+          "layout", G_TYPE_STRING, "interleaved",
           "rate", GST_TYPE_INT_RANGE, 1, 200000,
           "channels", G_TYPE_INT, 1, NULL));
 
@@ -274,6 +276,7 @@ gst_vorbis_enc_generate_sink_caps (void)
 
     structure = gst_structure_new ("audio/x-raw",
         "format", G_TYPE_STRING, GST_AUDIO_NE (F32),
+        "layout", G_TYPE_STRING, "interleaved",
         "rate", GST_TYPE_INT_RANGE, 1, 200000, "channels", G_TYPE_INT, i,
         "channel-mask", GST_TYPE_BITMASK, channel_mask, NULL);
 
@@ -282,6 +285,7 @@ gst_vorbis_enc_generate_sink_caps (void)
 
   gst_caps_append_structure (caps, gst_structure_new ("audio/x-raw",
           "format", G_TYPE_STRING, GST_AUDIO_NE (F32),
+          "layout", G_TYPE_STRING, "interleaved",
           "rate", GST_TYPE_INT_RANGE, 1, 200000,
           "channels", GST_TYPE_INT_RANGE, 9, 255,
           "channel-mask", GST_TYPE_BITMASK, G_GUINT64_CONSTANT (0), NULL));



More information about the gstreamer-commits mailing list