matroskademux: Extract codec_data for AV1

According to
https://github.com/Matroska-Org/matroska-specification/blob/av1-mappin/codec/av1.md
This commit is contained in:
Olivier Crête 2018-07-25 16:39:18 -04:00
parent 43ee4055c3
commit 415caf4b87

View file

@ -5627,6 +5627,17 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext *
*codec_name = g_strdup_printf ("On2 VP9"); *codec_name = g_strdup_printf ("On2 VP9");
} else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_AV1)) { } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_AV1)) {
caps = gst_caps_new_empty_simple ("video/x-av1"); caps = gst_caps_new_empty_simple ("video/x-av1");
if (data) {
GstBuffer *priv;
priv = gst_buffer_new_wrapped (g_memdup (data, size), size);
gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, priv, NULL);
gst_buffer_unref (priv);
} else {
GST_WARNING ("No codec data found, assuming output is byte-stream");
gst_caps_set_simple (caps, "stream-format", G_TYPE_STRING, "byte-stream",
NULL);
}
*codec_name = g_strdup_printf ("AOM AV1"); *codec_name = g_strdup_printf ("AOM AV1");
} else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_PRORES)) { } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_PRORES)) {
guint32 fourcc; guint32 fourcc;