mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
Add ogg/vorbis support for avi files
Original commit message from CVS: Add ogg/vorbis support for avi files
This commit is contained in:
parent
53e95e4cea
commit
027ddda3f0
2 changed files with 28 additions and 3 deletions
|
@ -146,6 +146,11 @@ GST_PAD_TEMPLATE_FACTORY (src_audio_templ,
|
|||
"avidemux_src_audio",
|
||||
"audio/mp3",
|
||||
NULL
|
||||
),
|
||||
GST_CAPS_NEW (
|
||||
"avidemux_src_audio",
|
||||
"application/x-ogg",
|
||||
NULL
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -511,13 +516,13 @@ gst_avi_demux_strf_auds (GstAviDemux *avi_demux)
|
|||
/* let's try some gstreamer-formatted mime types */
|
||||
switch (GUINT16_FROM_LE(strf->format))
|
||||
{
|
||||
case 0x0050:
|
||||
case 0x0055: /* mp3 */
|
||||
case GST_RIFF_WAVE_FORMAT_MPEGL3:
|
||||
case GST_RIFF_WAVE_FORMAT_MPEGL12: /* mp3 */
|
||||
newcaps = gst_caps_new ("avidemux_audio_src",
|
||||
"audio/mp3",
|
||||
NULL);
|
||||
break;
|
||||
case 0x0001: /* PCM/wav */
|
||||
case GST_RIFF_WAVE_FORMAT_PCM: /* PCM/wav */
|
||||
newcaps = gst_caps_new ("avidemux_audio_src",
|
||||
"audio/raw",
|
||||
gst_props_new (
|
||||
|
@ -533,6 +538,16 @@ gst_avi_demux_strf_auds (GstAviDemux *avi_demux)
|
|||
NULL
|
||||
));
|
||||
break;
|
||||
case GST_RIFF_WAVE_FORMAT_VORBIS1: /* ogg/vorbis mode 1 */
|
||||
case GST_RIFF_WAVE_FORMAT_VORBIS2: /* ogg/vorbis mode 2 */
|
||||
case GST_RIFF_WAVE_FORMAT_VORBIS3: /* ogg/vorbis mode 3 */
|
||||
case GST_RIFF_WAVE_FORMAT_VORBIS1PLUS: /* ogg/vorbis mode 1+ */
|
||||
case GST_RIFF_WAVE_FORMAT_VORBIS2PLUS: /* ogg/vorbis mode 2+ */
|
||||
case GST_RIFF_WAVE_FORMAT_VORBIS3PLUS: /* ogg/vorbis mode 3+ */
|
||||
newcaps = gst_caps_new ("avidemux_audio_src",
|
||||
"application/x-ogg",
|
||||
NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
if (newcaps) capslist = gst_caps_append(capslist, newcaps);
|
||||
|
|
|
@ -157,6 +157,11 @@ GST_PAD_TEMPLATE_FACTORY (audio_sink_factory,
|
|||
"avimux_sink_audio",
|
||||
"audio/mp3",
|
||||
NULL
|
||||
),
|
||||
GST_CAPS_NEW (
|
||||
"avimux_sink_audio",
|
||||
"application/x-ogg",
|
||||
NULL
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -424,6 +429,11 @@ gst_avimux_sinkconnect (GstPad *pad, GstCaps *vscaps)
|
|||
GST_RIFF_WAVE_FORMAT_MPEGL12);
|
||||
goto done;
|
||||
}
|
||||
else if (!strcmp (mimetype, "application/x-ogg"))
|
||||
{
|
||||
avimux->auds.format = GST_RIFF_WAVE_FORMAT_VORBIS1;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
return GST_PAD_CONNECT_REFUSED;
|
||||
|
||||
|
|
Loading…
Reference in a new issue