musepack: Prefer using FFmpeg musepack decoder/demuxer

* Bump the rank of the musepack v7/v8 FFmpeg demuxers to SECONDARY
* Bump the rank of the musepack v7/v8 FFmpeg audio decoders to SECONDARY
* Demote the rank of the musepackdec element to MARGINAL

This is for two reasons:
* The musepack library is no longer maintained, whereas the FFmpeg
  implementation can/will receive fixes
* The `musepackdec` implementation was a all-in-one "parsing and decoding" blob
  which doesn't play nicely with decodebin3 and others

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3033

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6074>
This commit is contained in:
Edward Hervey 2024-02-08 15:50:43 +01:00 committed by GStreamer Marge Bot
parent d2d2ac43e8
commit a1cbe351ec
5 changed files with 13 additions and 9 deletions

View file

@ -14287,7 +14287,7 @@
}
},
"properties": {},
"rank": "marginal"
"rank": "primary"
},
"avdec_mpc8": {
"author": "Wim Taymans <wim.taymans@gmail.com>, Ronald Bultje <rbultje@ronald.bitfreak.net>, Edward Hervey <bilboed@bilboed.com>",
@ -14315,7 +14315,7 @@
}
},
"properties": {},
"rank": "marginal"
"rank": "primary"
},
"avdec_mpeg2video": {
"author": "Wim Taymans <wim.taymans@gmail.com>, Ronald Bultje <rbultje@ronald.bitfreak.net>, Edward Hervey <bilboed@bilboed.com>",
@ -27630,7 +27630,7 @@
"presence": "sometimes"
}
},
"rank": "marginal",
"rank": "secondary",
"signals": {}
},
"avdemux_mpc8": {
@ -27662,7 +27662,7 @@
"presence": "sometimes"
}
},
"rank": "marginal",
"rank": "secondary",
"signals": {}
},
"avdemux_mxf": {

View file

@ -959,6 +959,8 @@ gst_ffmpegauddec_register (GstPlugin * plugin)
case AV_CODEC_ID_RA_288:
case AV_CODEC_ID_COOK:
case AV_CODEC_ID_AAC:
case AV_CODEC_ID_MUSEPACK7:
case AV_CODEC_ID_MUSEPACK8:
rank = GST_RANK_PRIMARY;
break;
/* SIPR: decoder should have a higher rank than realaudiodec.

View file

@ -2177,15 +2177,16 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
!strcmp (in_plugin->name, "4xm") ||
!strcmp (in_plugin->name, "yuv4mpegpipe") ||
!strcmp (in_plugin->name, "pva") ||
!strcmp (in_plugin->name, "mpc") ||
!strcmp (in_plugin->name, "mpc8") ||
!strcmp (in_plugin->name, "ivf") ||
!strcmp (in_plugin->name, "brstm") ||
!strcmp (in_plugin->name, "bfstm") ||
!strcmp (in_plugin->name, "gif") ||
!strcmp (in_plugin->name, "dsf") || !strcmp (in_plugin->name, "iff"))
!strcmp (in_plugin->name, "dsf") || !strcmp (in_plugin->name, "iff")) {
rank = GST_RANK_MARGINAL;
else {
} else if (!strcmp (in_plugin->name, "mpc") ||
!strcmp (in_plugin->name, "mpc8")) {
rank = GST_RANK_SECONDARY;
} else {
GST_DEBUG ("ignoring %s", in_plugin->name);
rank = GST_RANK_NONE;
continue;

View file

@ -79,7 +79,7 @@ G_DEFINE_TYPE_WITH_CODE (GstMusepackDec, gst_musepackdec, GST_TYPE_ELEMENT,
"mpc decoder");
);
GST_ELEMENT_REGISTER_DEFINE (musepackdec, "musepackdec",
GST_RANK_PRIMARY, GST_TYPE_MUSEPACK_DEC);
GST_RANK_MARGINAL, GST_TYPE_MUSEPACK_DEC);
static void
gst_musepackdec_class_init (GstMusepackDecClass * klass)
{

View file

@ -153,6 +153,7 @@ static const FormatInfo formats[] = {
{"audio/x-mod", "Module Music Format (MOD)", FLAG_AUDIO, "mod"},
{"audio/x-mulaw", "Mu-Law", FLAG_AUDIO, ""},
{"audio/x-musepack", "Musepack (MPC)", FLAG_AUDIO, "mpc"},
{"audio/x-ffmpeg-parsed-musepack", "Musepack (MPC)", FLAG_AUDIO, "mpc"},
{"audio/x-nellymoser", "Nellymoser Asao", FLAG_AUDIO, ""},
{"audio/x-nist", "Sphere NIST", FLAG_AUDIO, ""},
{"audio/x-nsf", "Nintendo NSF", FLAG_AUDIO, ""},