videocodectestsink: Add YUV422 support
[platform/upstream/gstreamer.git] / subprojects / gst-plugins-bad / gst / debugutils / gstvideocodectestsink.c
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;