[Bug 738013] v4l2allocator: issue with import_userptr() in single-planar API when n_planes > 1

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Jan 23 11:08:47 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=738013
  GStreamer | gst-plugins-good | git master

Nicolas Dufresne (stormer) <nicolas.dufresne> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #295289|none                        |reviewed
             status|                            |

--- Comment #15 from Nicolas Dufresne (stormer) <nicolas.dufresne at collabora.co.uk> 2015-01-23 19:08:43 UTC ---
Review of attachment 295289:
 --> (https://bugzilla.gnome.org/review?bug=738013&attachment=295289)

::: sys/v4l2/gstv4l2allocator.c
@@ +1152,3 @@
   g_return_val_if_fail (allocator->memory == V4L2_MEMORY_USERPTR, FALSE);

   /* TODO Support passing N plane from 1 memory to MPLANE v4l2 format */

Actually, this TODO make no sense ;-P We already do that by mapping the buffer
using gst_video_frame_map(). I'll drop it later, don't worry.

::: sys/v4l2/gstv4l2bufferpool.c
@@ +258,3 @@
+            pix_fmt->bytesperline);
+        guint eheight = GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (finfo, i,
+            pix_fmt->height);

I'm wondering if we could use a simplier check.

if (!V4L2_TYPE_IS_MULTIPLANAR (pool->obj->type)) {
  if (gst_buffer_n_memory (buffer) != 1)
    goto non_contiguous_mem;

  /* TODO check all strides */
  if (stride[0] != pix_fmt->bytesperline)
    goto not_aligned;

Would do you think ?

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list