Commit 6134dab3 authored by Vincent Penquerc'h's avatar Vincent Penquerc'h Committed by Olivier Crête
Browse files

audio: add FLAC to GstAudioRingBufferFormatType

https://bugzilla.gnome.org/show_bug.cgi?id=777655
parent c4660709
......@@ -302,6 +302,14 @@ gst_audio_ring_buffer_parse_caps (GstAudioRingBufferSpec * spec, GstCaps * caps)
GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG2_AAC_RAW :
GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC_RAW;
info.bpf = 1;
} else if (g_str_equal (mimetype, "audio/x-flac")) {
/* extract the needed information from the cap */
if (!(gst_structure_get_int (structure, "rate", &info.rate)))
goto parse_error;
gst_structure_get_int (structure, "channels", &info.channels);
spec->type = GST_AUDIO_RING_BUFFER_FORMAT_TYPE_FLAC;
info.bpf = 1;
} else {
goto parse_error;
}
......
......@@ -87,6 +87,7 @@ typedef enum {
* @GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC: samples in MPEG-4 AAC ADTS format
* @GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG2_AAC_RAW: samples in MPEG-2 AAC raw format
* @GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC_RAW: samples in MPEG-4 AAC raw format
* @GST_AUDIO_RING_BUFFER_FORMAT_TYPE_FLAC: samples in FLAC format
*
* The format of the samples in the ringbuffer.
*/
......@@ -105,7 +106,8 @@ typedef enum
GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG2_AAC,
GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC,
GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG2_AAC_RAW,
GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC_RAW
GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC_RAW,
GST_AUDIO_RING_BUFFER_FORMAT_TYPE_FLAC
} GstAudioRingBufferFormatType;
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment