https://bugzilla.gnome.org/show_bug.cgi?id=720568
GstBufferPool *pool;
guint size, min, max;
gboolean update;
+ struct v4l2_control ctl = { 0, };
GST_DEBUG_OBJECT (obj->element, "decide allocation");
min = 2;
}
+ /* Certain driver may expose a minimum through controls */
+ ctl.id = V4L2_CID_MIN_BUFFERS_FOR_CAPTURE;
+ if (v4l2_ioctl (obj->video_fd, VIDIOC_G_CTRL, &ctl) >= 0) {
+ GST_DEBUG_OBJECT (obj->element, "driver require a minimum of %d buffers",
+ ctl.value);
+ min += ctl.value;
+ }
+
/* select a pool */
switch (obj->mode) {
case GST_V4L2_IO_RW: