Commit 1ffe547e authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

ext/ffmpeg/: Add support for MusePack StreamVersion 7 and disable the...

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.
parent b83d3703
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> 2008-04-19 Sebastian Dröge <slomo@circular-chaos.org>
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps), * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
......
...@@ -304,6 +304,13 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id, ...@@ -304,6 +304,13 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
} }
break; 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: case CODEC_ID_AC3:
/* FIXME: bitrate */ /* FIXME: bitrate */
caps = gst_ff_aud_caps_new (context, codec_id, "audio/x-ac3", NULL); 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) ...@@ -1797,6 +1804,8 @@ gst_ffmpeg_formatid_to_caps (const gchar * format_name)
} else if (!strcmp (format_name, "yuv4mpegpipe")) { } else if (!strcmp (format_name, "yuv4mpegpipe")) {
caps = gst_caps_new_simple ("application/x-yuv4mpeg", caps = gst_caps_new_simple ("application/x-yuv4mpeg",
"y4mversion", G_TYPE_INT, 2, NULL); "y4mversion", G_TYPE_INT, 2, NULL);
} else if (!strcmp (format_name, "mpc")) {
caps = gst_caps_from_string ("audio/x-musepack, streamversion = (int) 7");
} else { } else {
gchar *name; gchar *name;
...@@ -2124,6 +2133,15 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context) ...@@ -2124,6 +2133,15 @@ gst_ffmpeg_caps_to_codecid (const GstCaps * caps, AVCodecContext * context)
} }
if (id != CODEC_ID_NONE) if (id != CODEC_ID_NONE)
audio = TRUE; 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")) { } else if (!strcmp (mimetype, "audio/x-wma")) {
gint wmaversion = 0; gint wmaversion = 0;
...@@ -2528,6 +2546,9 @@ gst_ffmpeg_get_codecid_longname (enum CodecID codec_id) ...@@ -2528,6 +2546,9 @@ gst_ffmpeg_get_codecid_longname (enum CodecID codec_id)
case CODEC_ID_VORBIS: case CODEC_ID_VORBIS:
name = "Vorbis audio"; name = "Vorbis audio";
break; break;
case CODEC_ID_MUSEPACK7:
name = "MusePack audio";
break;
case CODEC_ID_QDM2: case CODEC_ID_QDM2:
name = "QDesign Music 2"; name = "QDesign Music 2";
break; break;
......
...@@ -1548,6 +1548,7 @@ gst_ffmpegdemux_register (GstPlugin * plugin) ...@@ -1548,6 +1548,7 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
!strcmp (in_plugin->name, "dv") || !strcmp (in_plugin->name, "dv") ||
!strcmp (in_plugin->name, "flv") || !strcmp (in_plugin->name, "flv") ||
!strcmp (in_plugin->name, "mpc") || !strcmp (in_plugin->name, "mpc") ||
!strcmp (in_plugin->name, "mpc8") ||
!strcmp (in_plugin->name, "mpegts") || !strcmp (in_plugin->name, "mpegts") ||
!strcmp (in_plugin->name, "nuv") || !strcmp (in_plugin->name, "nuv") ||
!strcmp (in_plugin->name, "swf") || !strcmp (in_plugin->name, "swf") ||
...@@ -1588,7 +1589,7 @@ gst_ffmpegdemux_register (GstPlugin * plugin) ...@@ -1588,7 +1589,7 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
!strcmp (in_plugin->name, "aiff") || !strcmp (in_plugin->name, "aiff") ||
!strcmp (in_plugin->name, "4xm") || !strcmp (in_plugin->name, "4xm") ||
!strcmp (in_plugin->name, "yuv4mpegpipe") || !strcmp (in_plugin->name, "yuv4mpegpipe") ||
!strcmp (in_plugin->name, "gif")) !strcmp (in_plugin->name, "mpc") || !strcmp (in_plugin->name, "gif"))
rank = GST_RANK_MARGINAL; rank = GST_RANK_MARGINAL;
else else
rank = GST_RANK_NONE; rank = GST_RANK_NONE;
......
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