Hook up "audio/x-xma: xmaversion: [1,2]" to AV_CODEC_ID_XMA[1,2]
Even though XMA1 and XMA2 are very niche formats with no official mimetypes as far as I'm aware, it'd be nice to have actual sink caps for avdec_xma1
and avdec_xma2
.
Currently, both are defaulting to unknown/unknown
.
Quite honestly, I've copied the WMA sink caps and changed them to match audio/x-xma
with a xmaversion
of 1 and 2.
Both formats seem to be based on (or otherwise similar to) WMA Pro anyway.
For context, I'm trying to add XMA2 support to FAudio which uses gstreamer / decodebin under the hood to decode certain audio types.
I've checked with gst-inspect
and the new sink caps are exposed properly.
I've tested this patch in combination with some additional FAudio and FNA changes on a few XBLIG games.
decodebin / typefind found avdec_xma2
and audio was playing fine (my ears didn't start to bleed).
Sadly I'm unable to test avdec_xma1
myself, but I don't see any reason to not expose that as well.
I've updated gst_plugins_cache.json
by hand as I'm still very new to building with meson / ninja and new to gst-build in general.