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
This commit is contained in:
Mathieu Duponchelle 2018-05-05 18:00:06 +02:00
parent c182d28770
commit a68dbb9c82
2 changed files with 30 additions and 1 deletions

View file

@ -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;

View file

@ -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);