ext/ffmpeg/: Add support for MusePack StreamVersion 7 and disable the StreamVersion 8 typefinder. Fixes bug #510745.

Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_formatid_to_caps), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_get_codecid_longname):
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Add support for MusePack StreamVersion 7 and disable the StreamVersion
8 typefinder. Fixes bug #510745.
This commit is contained in:
Sebastian Dröge 2008-04-19 20:27:25 +00:00
parent b83d37033a
commit 1ffe547e23
3 changed files with 32 additions and 1 deletions

View file

@ -1,3 +1,12 @@
2008-04-19 Sebastian Dröge <slomo@circular-chaos.org>
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_formatid_to_caps), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_get_codecid_longname):
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Add support for MusePack StreamVersion 7 and disable the StreamVersion
8 typefinder. Fixes bug #510745.
2008-04-19 Sebastian Dröge <slomo@circular-chaos.org>
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),

View file

@ -304,6 +304,13 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
}
break;
case CODEC_ID_MUSEPACK7:
caps =
gst_ff_aud_caps_new (context, codec_id,
"audio/x-ffmpeg-parsed-musepack", "streamversion", G_TYPE_INT, 7,
NULL);
break;
case CODEC_ID_AC3:
/* FIXME: bitrate */
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-ac3", NULL);
@ -1797,6 +1804,8 @@ gst_ffmpeg_formatid_to_caps (const gchar * format_name)
} else if (!strcmp (format_name, "yuv4mpegpipe")) {
caps = gst_caps_new_simple ("application/x-yuv4mpeg",
"y4mversion", G_TYPE_INT, 2, NULL);
} else if (!strcmp (format_name, "mpc")) {
caps = gst_caps_from_string ("audio/x-musepack, streamversion = (int) 7");
} else {
gchar *name;
@ -2124,6 +2133,15 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
}
if (id != CODEC_ID_NONE)
audio = TRUE;
} else if (!strcmp (mimetype, "audio/x-musepack")) {
gint streamversion = -1;
if (gst_structure_get_int (structure, "streamversion", &streamversion)) {
if (streamversion == 7)
id = CODEC_ID_MUSEPACK7;
} else {
id = CODEC_ID_MUSEPACK7;
}
} else if (!strcmp (mimetype, "audio/x-wma")) {
gint wmaversion = 0;
@ -2528,6 +2546,9 @@ gst_ffmpeg_get_codecid_longname (enum CodecID codec_id)
case CODEC_ID_VORBIS:
name = "Vorbis audio";
break;
case CODEC_ID_MUSEPACK7:
name = "MusePack audio";
break;
case CODEC_ID_QDM2:
name = "QDesign Music 2";
break;

View file

@ -1548,6 +1548,7 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
!strcmp (in_plugin->name, "dv") ||
!strcmp (in_plugin->name, "flv") ||
!strcmp (in_plugin->name, "mpc") ||
!strcmp (in_plugin->name, "mpc8") ||
!strcmp (in_plugin->name, "mpegts") ||
!strcmp (in_plugin->name, "nuv") ||
!strcmp (in_plugin->name, "swf") ||
@ -1588,7 +1589,7 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
!strcmp (in_plugin->name, "aiff") ||
!strcmp (in_plugin->name, "4xm") ||
!strcmp (in_plugin->name, "yuv4mpegpipe") ||
!strcmp (in_plugin->name, "gif"))
!strcmp (in_plugin->name, "mpc") || !strcmp (in_plugin->name, "gif"))
rank = GST_RANK_MARGINAL;
else
rank = GST_RANK_NONE;