summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2020-01-06 19:39:06 +0100
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2020-01-06 20:58:17 +0100
commit742d7e17e659c2c87388f21f62ea419aba57247a (patch)
tree253adecaaca9feb13d979477c43a2feb50b94d74 /tests
parente4b48361701678bdfeed1c64c74a8a8ea80f51da (diff)
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/check/elements/vaapioverlay.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/check/elements/vaapioverlay.c b/tests/check/elements/vaapioverlay.c
index a8e3dcd1..7a729873 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);