videocodectestsink: Add YUV422 support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3331>
This commit is contained in:
Nicolas Dufresne 2022-11-04 14:24:58 -04:00 committed by GStreamer Marge Bot
parent 62f8d292a1
commit e81e212610
2 changed files with 7 additions and 4 deletions

View file

@ -10954,7 +10954,7 @@
"long-name": "Video CODEC Test Sink",
"pad-templates": {
"sink": {
"caps": "video/x-raw:\n format: { I420, I420_10LE, NV12 }\n",
"caps": "video/x-raw:\n format: { I422_10LE, I420_10LE, Y42B, I420, NV12 }\n",
"direction": "sink",
"presence": "always"
}

View file

@ -79,7 +79,8 @@ static GstStaticPadTemplate gst_video_codec_test_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("video/x-raw, format = { I420, I420_10LE, NV12 }"));
GST_STATIC_CAPS ("video/x-raw, format = { "
"I422_10LE, I420_10LE, Y42B, I420, NV12 }"));
#define gst_video_codec_test_sink_parent_class parent_class
G_DEFINE_TYPE (GstVideoCodecTestSink, gst_video_codec_test_sink,
@ -209,7 +210,7 @@ gst_video_codec_test_sink_process_data (GstVideoCodecTestSink * self,
}
static GstFlowReturn
gst_video_codec_test_sink_process_i420 (GstVideoCodecTestSink * self,
gst_video_codec_test_sink_process_i42x (GstVideoCodecTestSink * self,
GstVideoFrame * frame)
{
guint plane;
@ -312,7 +313,9 @@ gst_video_codec_test_sink_set_caps (GstBaseSink * sink, GstCaps * caps)
switch (GST_VIDEO_INFO_FORMAT (&self->vinfo)) {
case GST_VIDEO_FORMAT_I420:
case GST_VIDEO_FORMAT_I420_10LE:
self->process = gst_video_codec_test_sink_process_i420;
case GST_VIDEO_FORMAT_Y42B:
case GST_VIDEO_FORMAT_I422_10LE:
self->process = gst_video_codec_test_sink_process_i42x;
break;
case GST_VIDEO_FORMAT_NV12:
self->process = gst_video_codec_test_sink_process_nv12;