From 742d7e17e659c2c87388f21f62ea419aba57247a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Mon, 6 Jan 2020 19:39:06 +0100 Subject: [PATCH] test: vaapioverlay: bail test if not available vaapioverlay is only registered if the VA driver support the blend operation. This patch only executes the test if vaapioverlay is available, otherwise the test is bail out without raising an error. --- tests/check/elements/vaapioverlay.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/check/elements/vaapioverlay.c b/tests/check/elements/vaapioverlay.c index a8e3dcd162..7a729873cc 100644 --- a/tests/check/elements/vaapioverlay.c +++ b/tests/check/elements/vaapioverlay.c @@ -85,6 +85,12 @@ GST_START_TEST (test_overlay_position) GstVideoFrame frame; GstVideoInfo vinfo; + /* Check if vaapioverlay is available, since it is only available + * for iHD vaapi driver */ + overlay = gst_element_factory_make ("vaapioverlay", "overlay"); + if (!overlay) + return; + /* build pipeline */ bin = gst_pipeline_new ("pipeline"); bus = gst_element_get_bus (bin); @@ -108,7 +114,6 @@ GST_START_TEST (test_overlay_position) g_object_set (filter2, "caps", caps, NULL); gst_caps_unref (caps); - overlay = gst_element_factory_make ("vaapioverlay", "overlay"); sink = gst_element_factory_make ("vaapisink", "sink"); g_object_set (sink, "display", 4, "signal-handoffs", TRUE, NULL); g_signal_connect (sink, "handoff", G_CALLBACK (on_handoff), NULL);