glcolorconvert: output why we cannot convert a buffer
authorMatthew Waters <matthew@centricular.com>
Thu, 9 Oct 2014 01:28:11 +0000 (12:28 +1100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:31:48 +0000 (19:31 +0000)
gst-libs/gst/gl/gstglcolorconvert.c

index e7d2299..3dfbe75 100644 (file)
@@ -1257,11 +1257,14 @@ _do_convert (GstGLContext * context, GstGLColorConvert * convert)
     convert->priv->in_tex[i] =
         (GstGLMemory *) gst_buffer_peek_memory (convert->inbuf, i);
     if (!gst_is_gl_memory ((GstMemory *) convert->priv->in_tex[i])) {
+      GST_ERROR_OBJECT (convert, "input must be GstGLMemory");
       res = FALSE;
       goto out;
     }
     if (!gst_memory_map ((GstMemory *) convert->priv->in_tex[i], &in_info[i],
             GST_MAP_READ | GST_MAP_GL)) {
+      GST_ERROR_OBJECT (convert, "failed to map input memory %p",
+          convert->priv->in_tex[i]);
       res = FALSE;
       goto out;
     }
@@ -1273,6 +1276,7 @@ _do_convert (GstGLContext * context, GstGLColorConvert * convert)
     gint mem_width, mem_height;
 
     if (!gst_is_gl_memory ((GstMemory *) out_tex)) {
+      GST_ERROR_OBJECT (convert, "output must be GstGLMemory");
       res = FALSE;
       goto out;
     }
@@ -1300,6 +1304,8 @@ _do_convert (GstGLContext * context, GstGLColorConvert * convert)
 
     if (!gst_memory_map ((GstMemory *) convert->priv->out_tex[j], &out_info[j],
             GST_MAP_WRITE | GST_MAP_GL)) {
+      GST_ERROR_OBJECT (convert, "failed to map output memory %p",
+          convert->priv->out_tex[i]);
       res = FALSE;
       goto out;
     }