nvdec: Add support VP8/VP9 decoding

NVIDIA video decoder supports VP8 and VP9 decoding

https://bugzilla.gnome.org/show_bug.cgi?id=795823
This commit is contained in:
Seungha Yang 2018-05-05 14:37:06 +09:00 committed by Jan Schmidt
parent 3740837c18
commit 3e5378163a

View file

@ -230,7 +230,7 @@ static GstStaticPadTemplate gst_nvdec_sink_template =
GST_STATIC_CAPS ("video/x-h264, stream-format=byte-stream, alignment=au; "
"video/x-h265, stream-format=byte-stream, alignment=au; "
"video/mpeg, mpegversion={ 1, 2, 4 }, systemstream=false; "
"image/jpeg")
"image/jpeg; video/x-vp8; video/x-vp9")
);
static GstStaticPadTemplate gst_nvdec_src_template =
@ -542,6 +542,10 @@ gst_nvdec_set_format (GstVideoDecoder * decoder, GstVideoCodecState * state)
parser_params.CodecType = cudaVideoCodec_JPEG;
} else if (!g_strcmp0 (caps_name, "video/x-h265")) {
parser_params.CodecType = cudaVideoCodec_HEVC;
} else if (!g_strcmp0 (caps_name, "video/x-vp8")) {
parser_params.CodecType = cudaVideoCodec_VP8;
} else if (!g_strcmp0 (caps_name, "video/x-vp9")) {
parser_params.CodecType = cudaVideoCodec_VP9;
} else {
GST_ERROR_OBJECT (nvdec, "failed to determine codec type");
return FALSE;