audio: add FLAC to GstAudioRingBufferFormatType

https://bugzilla.gnome.org/show_bug.cgi?id=777655
This commit is contained in:
Vincent Penquerc'h 2016-11-17 13:04:18 +00:00 committed by Olivier Crête
parent c46607095e
commit 6134dab3bb
2 changed files with 11 additions and 1 deletions

View file

@ -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;
}

View file

@ -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;
/**