videocodectestsink: Add YUV422 support
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 4 Nov 2022 18:24:58 +0000 (14:24 -0400)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 7 Nov 2022 00:40:25 +0000 (00:40 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3331>

subprojects/gst-plugins-bad/docs/plugins/gst_plugins_cache.json
subprojects/gst-plugins-bad/gst/debugutils/gstvideocodectestsink.c

index 4db433f..bd07b68 100644 (file)
                 "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"
                     }
index 127106a..0416659 100644 (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;