mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
audio: add FLAC to GstAudioRingBufferFormatType
https://bugzilla.gnome.org/show_bug.cgi?id=777655
This commit is contained in:
parent
c46607095e
commit
6134dab3bb
2 changed files with 11 additions and 1 deletions
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue