From a68dbb9c82ab8783f43b1760541ca926e89fc60a Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Sat, 5 May 2018 18:00:06 +0200 Subject: [PATCH] Expose support for DSD DSD is usually wrapped in DSF, for which we now also expose the demuxer. https://bugzilla.gnome.org/show_bug.cgi?id=721186 --- ext/libav/gstavcodecmap.c | 28 ++++++++++++++++++++++++++++ ext/libav/gstavdemux.c | 3 ++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/ext/libav/gstavcodecmap.c b/ext/libav/gstavcodecmap.c index 9a72033..f4c00c9 100644 --- a/ext/libav/gstavcodecmap.c +++ b/ext/libav/gstavcodecmap.c @@ -2216,6 +2216,34 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id, gst_ff_aud_caps_new (context, NULL, codec_id, encode, "audio/G729", NULL); break; + case AV_CODEC_ID_DSD_LSBF: + caps = + gst_ff_aud_caps_new (context, NULL, codec_id, encode, "audio/x-dsd", + NULL); + gst_caps_set_simple (caps, "lsbf", G_TYPE_BOOLEAN, + TRUE, "planar", G_TYPE_BOOLEAN, FALSE, NULL); + break; + case AV_CODEC_ID_DSD_MSBF: + caps = + gst_ff_aud_caps_new (context, NULL, codec_id, encode, "audio/x-dsd", + NULL); + gst_caps_set_simple (caps, "lsbf", G_TYPE_BOOLEAN, + FALSE, "planar", G_TYPE_BOOLEAN, FALSE, NULL); + break; + case AV_CODEC_ID_DSD_LSBF_PLANAR: + caps = + gst_ff_aud_caps_new (context, NULL, codec_id, encode, "audio/x-dsd", + NULL); + gst_caps_set_simple (caps, "lsbf", G_TYPE_BOOLEAN, + TRUE, "planar", G_TYPE_BOOLEAN, TRUE, NULL); + break; + case AV_CODEC_ID_DSD_MSBF_PLANAR: + caps = + gst_ff_aud_caps_new (context, NULL, codec_id, encode, "audio/x-dsd", + NULL); + gst_caps_set_simple (caps, "lsbf", G_TYPE_BOOLEAN, + FALSE, "planar", G_TYPE_BOOLEAN, TRUE, NULL); + break; default: GST_DEBUG ("Unknown codec ID %d, please add mapping here", codec_id); break; diff --git a/ext/libav/gstavdemux.c b/ext/libav/gstavdemux.c index 001e2f1..b2bc091 100644 --- a/ext/libav/gstavdemux.c +++ b/ext/libav/gstavdemux.c @@ -2085,7 +2085,8 @@ gst_ffmpegdemux_register (GstPlugin * plugin) !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, "bfstm") || + !strcmp (in_plugin->name, "gif") || !strcmp (in_plugin->name, "dsf")) rank = GST_RANK_MARGINAL; else { GST_DEBUG ("ignoring %s", in_plugin->name); -- 2.7.4