Commit 6382c57f authored by Ronald S. Bultje's avatar Ronald S. Bultje

Sorry Dave... Add mpegversion=1 to mp3 caps everywhere so that the autoplugger...

Sorry Dave... Add mpegversion=1 to mp3 caps everywhere so that the autoplugger uses mad and not faad for mp3 decoding...

Original commit message from CVS:
Sorry Dave... Add mpegversion=1 to mp3 caps everywhere so that the autoplugger uses mad and not faad for mp3 decoding. This should fix mp3 playback.
parent 6662cd73
......@@ -404,6 +404,7 @@ gst_faad_chain (GstPad *pad,
gst_buffer_unref (buf);
return;
}
if (info.samplerate != faad->samplerate ||
info.channels != faad->channels) {
faad->samplerate = info.samplerate;
......
......@@ -87,6 +87,7 @@ GST_PAD_TEMPLATE_FACTORY (audio_sink_factory,
GST_CAPS_NEW (
"sink_audio",
"audio/mpeg",
"mpegversion", GST_PROPS_INT (1),
"layer", GST_PROPS_INT_RANGE (1, 3)
)
)
......
......@@ -77,6 +77,7 @@ sink_template_factory (void)
"icecastsend_sink",
"audio/mpeg",
gst_props_new (
"mpegversion", GST_PROPS_INT (1),
"layer", GST_PROPS_INT_RANGE (1, 3),
NULL
)),
......
......@@ -233,8 +233,9 @@ gst_riff_create_audio_caps (guint16 codec_id,
case GST_RIFF_WAVE_FORMAT_MPEGL12: /* mp1 or mp2 */
caps = GST_CAPS_NEW ("riff_audio_mp1l12",
"audio/mpeg",
"layer", GST_PROPS_INT (2));
"audio/mpeg",
"mpegversion", GST_PROPS_INT (1),
"layer", GST_PROPS_INT (2));
break;
case GST_RIFF_WAVE_FORMAT_PCM: /* PCM/wav */ {
......
......@@ -79,7 +79,9 @@ GST_PAD_TEMPLATE_FACTORY (audio_sink_factory,
GST_CAPS_NEW (
"sink_audio",
"audio/mpeg",
NULL /* well, "don't care" */
"mpegversion", GST_PROPS_INT (1),
"layer", GST_PROPS_INT_RANGE (1, 2)
/* "don't care" about samplerate/channels */
)
)
......
......@@ -26,6 +26,8 @@
#include <string.h>
#include <zlib.h>
#define g_print(x...)
#define QTDEMUX_GUINT32_GET(a) GUINT32_FROM_BE(*(guint32 *)(a))
#define QTDEMUX_GUINT16_GET(a) GUINT16_FROM_BE(*(guint16 *)(a))
#define QTDEMUX_GUINT8_GET(a) (*(guint8 *)(a))
......@@ -1711,6 +1713,7 @@ static GstCaps *qtdemux_audio_caps(GstQTDemux *qtdemux, guint32 fourcc)
case GST_MAKE_FOURCC('.','m','p','3'):
/* MPEG layer 3, CBR & VBR (QT4.1 and later) */
return GST_CAPS_NEW("_mp3_caps","audio/mpeg",
"mpegversion", GST_PROPS_INT(1),
"layer", GST_PROPS_INT(3),
"rate",GST_PROPS_INT_RANGE(1,G_MAXINT),
"channels",GST_PROPS_INT_RANGE(1,G_MAXINT),
......
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