mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-17 12:55:53 +00:00
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.
This commit is contained in:
parent
e4b4836170
commit
742d7e17e6
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue