mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
gstreamer-vaapi: tests: test vaapipostproc only if exists
Fix: #2491 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6129>
This commit is contained in:
parent
6b024b50ab
commit
03d7082657
1 changed files with 16 additions and 15 deletions
|
@ -49,18 +49,6 @@ typedef struct
|
||||||
VppTestCoordinate expect;
|
VppTestCoordinate expect;
|
||||||
} VppTestCoordinateParams;
|
} VppTestCoordinateParams;
|
||||||
|
|
||||||
GST_START_TEST (test_make)
|
|
||||||
{
|
|
||||||
GstElement *vaapipostproc;
|
|
||||||
|
|
||||||
vaapipostproc = gst_element_factory_make ("vaapipostproc", "vaapipostproc");
|
|
||||||
fail_unless (vaapipostproc != NULL, "Failed to create vaapipostproc element");
|
|
||||||
|
|
||||||
gst_object_unref (vaapipostproc);
|
|
||||||
}
|
|
||||||
|
|
||||||
GST_END_TEST;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
vpp_test_init_context (VppTestContext * ctx)
|
vpp_test_init_context (VppTestContext * ctx)
|
||||||
{
|
{
|
||||||
|
@ -390,11 +378,24 @@ vaapipostproc_suite (void)
|
||||||
{
|
{
|
||||||
Suite *s = suite_create ("vaapipostproc");
|
Suite *s = suite_create ("vaapipostproc");
|
||||||
TCase *tc_chain = tcase_create ("general");
|
TCase *tc_chain = tcase_create ("general");
|
||||||
|
gboolean has_vaapipostproc = FALSE;
|
||||||
|
|
||||||
|
{
|
||||||
|
GstElement *vaapipostproc;
|
||||||
|
|
||||||
|
vaapipostproc = gst_element_factory_make ("vaapipostproc", NULL);
|
||||||
|
if (vaapipostproc) {
|
||||||
|
has_vaapipostproc = TRUE;
|
||||||
|
gst_object_unref (vaapipostproc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
suite_add_tcase (s, tc_chain);
|
suite_add_tcase (s, tc_chain);
|
||||||
tcase_add_test (tc_chain, test_make);
|
|
||||||
|
if (has_vaapipostproc) {
|
||||||
tcase_add_test (tc_chain, test_crop_mouse_events);
|
tcase_add_test (tc_chain, test_crop_mouse_events);
|
||||||
tcase_add_test (tc_chain, test_orientation_mouse_events);
|
tcase_add_test (tc_chain, test_orientation_mouse_events);
|
||||||
|
}
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue