From 33ef9ab054568172cec94702390ef2955317b49d Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Wed, 9 Mar 2011 22:57:00 +0530 Subject: [PATCH] ringbuffer: Add support for DTS buffers --- gst-libs/gst/audio/gstringbuffer.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gst-libs/gst/audio/gstringbuffer.c b/gst-libs/gst/audio/gstringbuffer.c index 87d1ce2..a2a863b 100644 --- a/gst-libs/gst/audio/gstringbuffer.c +++ b/gst-libs/gst/audio/gstringbuffer.c @@ -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; } -- 2.7.4