mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
ringbuffer: Add support for MPEG audio buffers
This commit is contained in:
parent
1a1f2cc50a
commit
193fbf93a9
1 changed files with 13 additions and 0 deletions
|
@ -446,6 +446,19 @@ gst_ring_buffer_parse_caps (GstRingBufferSpec * spec, GstCaps * caps)
|
|||
spec->width = 16;
|
||||
spec->depth = 16;
|
||||
spec->channels = 2;
|
||||
} else if (!strncmp (mimetype, "audio/mpeg", 10) &&
|
||||
gst_structure_get_int (structure, "mpegaudioversion", &i) &&
|
||||
(i == 1 || i == 2)) {
|
||||
/* Now we know this is MPEG-1 or MPEG-2 (non AAC) */
|
||||
/* extract the needed information from the cap */
|
||||
if (!(gst_structure_get_int (structure, "rate", &spec->rate)))
|
||||
goto parse_error;
|
||||
|
||||
spec->type = GST_BUFTYPE_MPEG;
|
||||
spec->format = GST_MPEG;
|
||||
spec->width = 16;
|
||||
spec->depth = 16;
|
||||
spec->channels = 2;
|
||||
} else {
|
||||
goto parse_error;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue