From 7f39f69c7c822f9c2983d2a76cc6bae7ce59f497 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 30 Sep 2016 18:56:07 +0300 Subject: [PATCH] avcodecmap: Add variant to the ProRes caps https://bugzilla.gnome.org/show_bug.cgi?id=769048 --- ext/libav/gstavcodecmap.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/ext/libav/gstavcodecmap.c b/ext/libav/gstavcodecmap.c index 9b27044..3d64291 100644 --- a/ext/libav/gstavcodecmap.c +++ b/ext/libav/gstavcodecmap.c @@ -1664,6 +1664,31 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id, caps = gst_ff_vid_caps_new (context, NULL, codec_id, encode, "video/x-prores", NULL); + if (context) { + switch (context->codec_tag) { + case GST_MAKE_FOURCC ('a', 'p', 'c', 'o'): + gst_caps_set_simple (caps, "variant", G_TYPE_STRING, "proxy", NULL); + break; + case GST_MAKE_FOURCC ('a', 'p', 'c', 's'): + gst_caps_set_simple (caps, "variant", G_TYPE_STRING, "lt", NULL); + break; + default: + case GST_MAKE_FOURCC ('a', 'p', 'c', 'n'): + gst_caps_set_simple (caps, "variant", G_TYPE_STRING, "standard", + NULL); + break; + case GST_MAKE_FOURCC ('a', 'p', 'c', 'h'): + gst_caps_set_simple (caps, "variant", G_TYPE_STRING, "hq", NULL); + break; + case GST_MAKE_FOURCC ('a', 'p', '4', 'h'): + gst_caps_set_simple (caps, "variant", G_TYPE_STRING, "4444", NULL); + break; + case GST_MAKE_FOURCC ('a', 'p', '4', 'x'): + gst_caps_set_simple (caps, "variant", G_TYPE_STRING, "4444xq", + NULL); + break; + } + } break; case AV_CODEC_ID_MIMIC: -- 2.7.4