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.
This commit is contained in:
Ronald S. Bultje 2003-12-18 09:31:49 +00:00
parent 3bb5da14bb
commit 76a5c85de7
5 changed files with 23 additions and 19 deletions

View file

@ -75,6 +75,7 @@ sink_template_factory (void)
"shout2send_sink",
"audio/mpeg",
gst_props_new (
"mpegversion", GST_PROPS_INT (1),
"layer", GST_PROPS_INT_RANGE (1, 3),
NULL
)),

View file

@ -200,7 +200,7 @@ gst_matroska_demux_init (GstMatroskaDemux *demux)
gint i;
GST_FLAG_SET (GST_OBJECT (demux), GST_ELEMENT_EVENT_AWARE);
demux->sinkpad = gst_pad_new_from_template (
gst_element_class_get_pad_template (klass, "sink"), "sink");
gst_element_add_pad (GST_ELEMENT (demux), demux->sinkpad);
@ -2389,7 +2389,6 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext *audiocontext,
caps = GST_CAPS_NEW ("matroskademux_mpeg1-l1",
"audio/mpeg",
"mpegversion", GST_PROPS_INT (1),
"systemstream", GST_PROPS_BOOLEAN (FALSE),
"layer", GST_PROPS_INT (layer));
} else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_PCM_INT_BE) ||
!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_PCM_INT_LE)) {
@ -2496,8 +2495,7 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext *audiocontext,
caps = GST_CAPS_NEW ("matroska_demux_aac_mpeg2",
"audio/mpeg",
"mpegversion", GST_PROPS_INT (mpegversion),
"systemstream", GST_PROPS_BOOLEAN (FALSE));
"mpegversion", GST_PROPS_INT (mpegversion));
} else {
GST_WARNING ("Unknown codec '%s', cannot build Caps",
codec_id);

View file

@ -416,7 +416,7 @@ gst_matroska_mux_audio_pad_link (GstPad *pad,
audiocontext->bitdepth = 16;
if (!strcmp (mimetype, "audio/mpeg")) {
gint mpegversion = 1;
gint mpegversion = 0;
gst_caps_get_int (caps, "mpegversion", &mpegversion);
switch (mpegversion) {

View file

@ -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),

View file

@ -97,6 +97,7 @@ GST_PAD_TEMPLATE_FACTORY (src_template_factory,
GST_CAPS_NEW (
"wavparse_mpeg",
"audio/mpeg",
"mpegversion", GST_PROPS_INT (1),
"rate", GST_PROPS_INT_RANGE (8000, 48000),
"channels", GST_PROPS_INT_RANGE (1, 2),
"layer", GST_PROPS_INT_RANGE (1, 3)
@ -640,21 +641,21 @@ gst_wavparse_parse_fmt (GstWavParse *wavparse)
}
caps = GST_CAPS_NEW ("parsewav_src",
mime,
"rate", GST_PROPS_INT (wavparse->rate),
"channels", GST_PROPS_INT (wavparse->channels)
mime,
"rate", GST_PROPS_INT (wavparse->rate),
"channels", GST_PROPS_INT (wavparse->channels)
);
}
case GST_RIFF_WAVE_FORMAT_PCM:
caps = GST_CAPS_NEW ("parsewav_src",
"audio/x-raw-int",
"endianness", GST_PROPS_INT (G_LITTLE_ENDIAN),
"signed", GST_PROPS_BOOLEAN ((wavparse->width > 8) ? TRUE : FALSE),
"width", GST_PROPS_INT (wavparse->width),
"depth", GST_PROPS_INT (wavparse->width),
"rate", GST_PROPS_INT (wavparse->rate),
"channels", GST_PROPS_INT (wavparse->channels)
"audio/x-raw-int",
"endianness", GST_PROPS_INT (G_LITTLE_ENDIAN),
"signed", GST_PROPS_BOOLEAN ((wavparse->width > 8) ? TRUE : FALSE),
"width", GST_PROPS_INT (wavparse->width),
"depth", GST_PROPS_INT (wavparse->width),
"rate", GST_PROPS_INT (wavparse->rate),
"channels", GST_PROPS_INT (wavparse->channels)
);
break;
@ -663,10 +664,11 @@ gst_wavparse_parse_fmt (GstWavParse *wavparse)
int layer = (wavparse->format == GST_RIFF_WAVE_FORMAT_MPEGL12) ? 2 : 3;
caps = GST_CAPS_NEW ("parsewav_src",
"audio/mpeg",
"layer", GST_PROPS_INT (layer),
"rate", GST_PROPS_INT (wavparse->rate),
"channels", GST_PROPS_INT (wavparse->channels)
"audio/mpeg",
"mpegversion", GST_PROPS_INT (1),
"layer", GST_PROPS_INT (layer),
"rate", GST_PROPS_INT (wavparse->rate),
"channels", GST_PROPS_INT (wavparse->channels)
);
}
break;