Commit fda72021 authored by Akihiro Tsukada's avatar Akihiro Tsukada Committed by Sebastian Dröge

pulsesink: Add support for AAC pass-through

https://bugzilla.gnome.org/show_bug.cgi?id=694445
parent 1e917822
......@@ -1796,6 +1796,8 @@ gst_pulsesink_payload (GstAudioBaseSink * sink, GstBuffer * buf)
case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_EAC3:
case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_DTS:
case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG:
case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG2_AAC:
case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC:
{
/* FIXME: alloc memory from PA if possible */
gint framesize = gst_audio_iec61937_frame_size (&sink->ringbuffer->spec);
......
......@@ -97,7 +97,8 @@ GType gst_pulsesink_get_type (void);
_PULSE_CAPS_AC3 \
_PULSE_CAPS_EAC3 \
_PULSE_CAPS_DTS \
_PULSE_CAPS_MP3
_PULSE_CAPS_MP3 \
_PULSE_CAPS_AAC
G_END_DECLS
......
......@@ -164,6 +164,13 @@ gst_pulse_fill_format_info (GstAudioRingBufferSpec * spec, pa_format_info ** f,
format->encoding = PA_ENCODING_DTS_IEC61937;
} else if (spec->type == GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG) {
format->encoding = PA_ENCODING_MPEG_IEC61937;
#if PA_CHECK_VERSION(3,99,0)
} else if (spec->type == GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG2_AAC) {
format->encoding = PA_ENCODING_MPEG2_AAC_IEC61937;
} else if (spec->type == GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MPEG4_AAC) {
/* HACK. treat MPEG4 AAC as MPEG2 AAC for the moment */
format->encoding = PA_ENCODING_MPEG2_AAC_IEC61937;
#endif
} else {
goto fail;
}
......
......@@ -61,6 +61,8 @@
"block-size = (int) { 512, 1024, 2048 }; "
#define _PULSE_CAPS_MP3 "audio/mpeg, mpegversion = (int) 1, " \
"mpegaudioversion = (int) [ 1, 2 ], parsed = (boolean) true;"
#define _PULSE_CAPS_AAC "audio/mpeg, mpegversion = (int) { 2, 4 }, " \
"framed = (boolean) true, stream-format = (string) adts;"
#define _PULSE_CAPS_PCM \
_PULSE_CAPS_LINEAR \
......
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