ringbuffer: Add support for DTS buffers
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Wed, 9 Mar 2011 17:27:00 +0000 (22:57 +0530)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Sat, 14 May 2011 11:23:33 +0000 (16:53 +0530)
gst-libs/gst/audio/gstringbuffer.c

index 87d1ce2..a2a863b 100644 (file)
@@ -436,6 +436,16 @@ gst_ring_buffer_parse_caps (GstRingBufferSpec * spec, GstCaps * caps)
     spec->width = 16;
     spec->depth = 16;
     spec->channels = 2;
+  } else if (!strncmp (mimetype, "audio/x-dts", 11)) {
+    /* extract the needed information from the cap */
+    if (!(gst_structure_get_int (structure, "rate", &spec->rate)))
+      goto parse_error;
+
+    spec->type = GST_BUFTYPE_DTS;
+    spec->format = GST_DTS;
+    spec->width = 16;
+    spec->depth = 16;
+    spec->channels = 2;
   } else {
     goto parse_error;
   }