diff options
author | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2020-01-16 11:49:21 +0100 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2020-01-24 12:21:59 +0000 |
commit | ee3d4c3206327d2a7a666fbeb699a911dfc1700c (patch) | |
tree | 83827c199f686821a9e6aa5b0d6253a7f033b639 /gst | |
parent | 7a186975cc209f1f4d75e902144563e76ce3a14c (diff) |
libs: display: driver quirks mechanism
This mechanism comes from ffmpeg vaapi implementation, where they have
their own quirks.
A specific driver is identified by a substring present in the vendor
string. If that substring is found, a set of bitwise flags are store.
These flags can be accessed through the function
gst_vaapi_display_has_driver_quirks().
The purpose for this first quirks is to disable the put image try for
AMD Gallium driver (see [1]).
1. https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/merge_requests/72
Diffstat (limited to 'gst')
-rw-r--r-- | gst/vaapi/gstvaapipluginbase.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gst/vaapi/gstvaapipluginbase.c b/gst/vaapi/gstvaapipluginbase.c index e9dd8dec..e0c1189e 100644 --- a/gst/vaapi/gstvaapipluginbase.c +++ b/gst/vaapi/gstvaapipluginbase.c @@ -1456,7 +1456,12 @@ extract_allowed_surface_formats (GstVaapiDisplay * display, if (direction == GST_PAD_SRC) { res = gst_vaapi_surface_get_image (surface, image); } else { - res = gst_vaapi_surface_put_image (surface, image); + if (!gst_vaapi_display_has_driver_quirks (display, + GST_VAAPI_DRIVER_QUIRK_NO_CHECK_SURFACE_PUT_IMAGE)) + res = gst_vaapi_surface_put_image (surface, image); + else + res = TRUE; /* Let's say it's possible to upload + * all formats */ } if (res) g_array_append_val (out_formats, img_format); |