summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2018-10-17 17:22:10 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2018-10-30 12:25:08 +0100
commit3c8ac7de80a51cf51da86d322308b24a70080116 (patch)
tree135a6d6bebace12faf9db0979d98a6e6611f0b69
parenteb20293a028403167e347118b756171ced9d3271 (diff)
downloadgst-plugins-base-glupload.tar.gz
gst-plugins-base-glupload.tar.xz
glupload: dmabuf-direct: report driver limitations to debug logglupload
Report in the DEBUG log if the driver does not support importing a given format with linear modifiers non-externally. https://bugzilla.gnome.org/show_bug.cgi?id=783521
-rw-r--r--gst-libs/gst/gl/egl/gsteglimage.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/gst-libs/gst/gl/egl/gsteglimage.c b/gst-libs/gst/gl/egl/gsteglimage.c
index 6138ba0fa..81eb1ec9b 100644
--- a/gst-libs/gst/gl/egl/gsteglimage.c
+++ b/gst-libs/gst/gl/egl/gsteglimage.c
@@ -637,13 +637,19 @@ _gst_egl_image_check_dmabuf_direct (GstGLContext * context, int fourcc)
break;
}
g_free (formats);
- if (i == num_formats)
+ if (i == num_formats) {
+ GST_DEBUG ("driver does not support importing fourcc %" GST_FOURCC_FORMAT,
+ GST_FOURCC_ARGS (fourcc));
return FALSE;
+ }
ret = gst_eglQueryDmaBufModifiersEXT (egl_display, fourcc, 0, NULL, NULL,
&num_modifiers);
- if (!ret || num_modifiers == 0)
+ if (!ret || num_modifiers == 0) {
+ GST_DEBUG ("driver does not report modifiers for fourcc %"
+ GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc));
return FALSE;
+ }
modifiers = g_new (EGLuint64KHR, num_modifiers);
external_only = g_new (EGLBoolean, num_modifiers);
@@ -658,12 +664,18 @@ _gst_egl_image_check_dmabuf_direct (GstGLContext * context, int fourcc)
for (i = 0; i < num_modifiers; ++i) {
if (modifiers[i] == DRM_FORMAT_MOD_LINEAR) {
+ if (external_only[i]) {
+ GST_DEBUG ("driver only supports external import of fourcc %"
+ GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc));
+ }
ret = !external_only[i];
g_free (modifiers);
g_free (external_only);
return ret;
}
}
+ GST_DEBUG ("driver only supports non-linear import of fourcc %"
+ GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc));
g_free (modifiers);
g_free (external_only);
return FALSE;