pool->allocator);
break;
case GST_V4L2_IO_USERPTR:
+ case GST_V4L2_IO_DMABUF_IMPORT:
default:
newbuf = NULL;
g_assert_not_reached ();
GST_V4L2_ALLOCATOR_CAN_ALLOCATE (pool->vallocator, USERPTR);
break;
case GST_V4L2_IO_RW:
- default:
pool->allocator = g_object_ref (allocator);
pool->params = params;
/* No need to change the configuration */
goto done;
break;
+ case GST_V4L2_IO_DMABUF_IMPORT:
+ default:
+ g_assert_not_reached ();
+ break;
}
if (min_buffers < GST_V4L2_MIN_BUFFERS) {
case GST_V4L2_IO_MMAP:
case GST_V4L2_IO_USERPTR:
case GST_V4L2_IO_DMABUF:
+ case GST_V4L2_IO_DMABUF_IMPORT:
GST_DEBUG_OBJECT (pool, "STREAMON");
if (v4l2_ioctl (pool->video_fd, VIDIOC_STREAMON, &obj->type) < 0)
goto start_failed;
break;
}
case GST_V4L2_IO_USERPTR:
+ case GST_V4L2_IO_DMABUF_IMPORT:
default:
num_buffers = 0;
copy_threshold = 0;
case GST_V4L2_IO_MMAP:
case GST_V4L2_IO_USERPTR:
case GST_V4L2_IO_DMABUF:
+ case GST_V4L2_IO_DMABUF_IMPORT:
GST_DEBUG_OBJECT (pool, "STREAMOFF");
if (v4l2_ioctl (pool->video_fd, VIDIOC_STREAMOFF, &obj->type) < 0)
goto stop_failed;
break;
case GST_V4L2_IO_USERPTR:
+ case GST_V4L2_IO_DMABUF_IMPORT:
default:
ret = GST_FLOW_ERROR;
g_assert_not_reached ();
break;
case GST_V4L2_IO_USERPTR:
+ case GST_V4L2_IO_DMABUF_IMPORT:
default:
ret = GST_FLOW_ERROR;
g_assert_not_reached ();
break;
}
case GST_V4L2_IO_USERPTR:
+ case GST_V4L2_IO_DMABUF_IMPORT:
default:
g_assert_not_reached ();
break;
}
case GST_V4L2_IO_USERPTR:
+ case GST_V4L2_IO_DMABUF_IMPORT:
default:
g_assert_not_reached ();
break;
}
case GST_V4L2_IO_USERPTR:
+ case GST_V4L2_IO_DMABUF_IMPORT:
default:
g_assert_not_reached ();
break;
}
case GST_V4L2_IO_USERPTR:
+ case GST_V4L2_IO_DMABUF_IMPORT:
default:
g_assert_not_reached ();
break;
{GST_V4L2_IO_MMAP, "GST_V4L2_IO_MMAP", "mmap"},
{GST_V4L2_IO_USERPTR, "GST_V4L2_IO_USERPTR", "userptr"},
{GST_V4L2_IO_DMABUF, "GST_V4L2_IO_DMABUF", "dmabuf"},
+ {GST_V4L2_IO_DMABUF_IMPORT, "GST_V4L2_IO_DMABUF_IMPORT",
+ "dmabuf-import"},
{0, NULL, NULL}
};
}
break;
case GST_V4L2_IO_MMAP:
- case GST_V4L2_IO_USERPTR:
case GST_V4L2_IO_DMABUF:
+ /* FIXME in these case we actually prefer/need a downstream pool */
+ case GST_V4L2_IO_USERPTR:
+ case GST_V4L2_IO_DMABUF_IMPORT:
/* in streaming mode, prefer our own pool */
/* Check if we can use it ... */
if (can_use_own_pool) {
#define GST_V4L2_OBJECT(obj) (GstV4l2Object *)(obj)
typedef enum {
- GST_V4L2_IO_AUTO = 0,
- GST_V4L2_IO_RW = 1,
- GST_V4L2_IO_MMAP = 2,
- GST_V4L2_IO_USERPTR = 3,
- GST_V4L2_IO_DMABUF = 4
+ GST_V4L2_IO_AUTO = 0,
+ GST_V4L2_IO_RW = 1,
+ GST_V4L2_IO_MMAP = 2,
+ GST_V4L2_IO_USERPTR = 3,
+ GST_V4L2_IO_DMABUF = 4,
+ GST_V4L2_IO_DMABUF_IMPORT = 5
} GstV4l2IOMode;
typedef gboolean (*GstV4l2GetInOutFunction) (GstV4l2Object * v4l2object, gint * input);