v4l: remove caps argument, it's not needed
Remove the caps parameter, we don't need it anymore because we don't set caps on buffers anymore.
This commit is contained in:
parent
59b86d2558
commit
f55656dcfc
@ -105,7 +105,6 @@ gst_v4l2_buffer_dispose (GstBuffer * buffer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (resuscitated) {
|
if (resuscitated) {
|
||||||
/* FIXME: check that the caps didn't change */
|
|
||||||
GST_LOG_OBJECT (pool->v4l2elem, "reviving buffer %p, %d", buffer, index);
|
GST_LOG_OBJECT (pool->v4l2elem, "reviving buffer %p, %d", buffer, index);
|
||||||
gst_buffer_ref (buffer);
|
gst_buffer_ref (buffer);
|
||||||
pool->buffers[index] = buffer;
|
pool->buffers[index] = buffer;
|
||||||
@ -124,7 +123,7 @@ gst_v4l2_buffer_dispose (GstBuffer * buffer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GstBuffer *
|
static GstBuffer *
|
||||||
gst_v4l2_buffer_new (GstV4l2BufferPool * pool, guint index, GstCaps * caps)
|
gst_v4l2_buffer_new (GstV4l2BufferPool * pool, guint index)
|
||||||
{
|
{
|
||||||
GstBuffer *ret;
|
GstBuffer *ret;
|
||||||
GstMetaV4l2 *meta;
|
GstMetaV4l2 *meta;
|
||||||
@ -258,7 +257,6 @@ get_v4l2_object (GstElement * v4l2elem)
|
|||||||
* @v4l2elem: the v4l2 element (src or sink) that owns this pool
|
* @v4l2elem: the v4l2 element (src or sink) that owns this pool
|
||||||
* @fd: the video device file descriptor
|
* @fd: the video device file descriptor
|
||||||
* @num_buffers: the requested number of buffers in the pool
|
* @num_buffers: the requested number of buffers in the pool
|
||||||
* @caps: the caps to set on the buffer
|
|
||||||
* @requeuebuf: if %TRUE, and if the pool is still in the running state, a
|
* @requeuebuf: if %TRUE, and if the pool is still in the running state, a
|
||||||
* buffer with no remaining references is immediately passed back to v4l2
|
* buffer with no remaining references is immediately passed back to v4l2
|
||||||
* (VIDIOC_QBUF), otherwise it is returned to the pool of available buffers
|
* (VIDIOC_QBUF), otherwise it is returned to the pool of available buffers
|
||||||
@ -270,7 +268,7 @@ get_v4l2_object (GstElement * v4l2elem)
|
|||||||
*/
|
*/
|
||||||
GstV4l2BufferPool *
|
GstV4l2BufferPool *
|
||||||
gst_v4l2_buffer_pool_new (GstElement * v4l2elem, gint fd, gint num_buffers,
|
gst_v4l2_buffer_pool_new (GstElement * v4l2elem, gint fd, gint num_buffers,
|
||||||
GstCaps * caps, gboolean requeuebuf, enum v4l2_buf_type type)
|
gboolean requeuebuf, enum v4l2_buf_type type)
|
||||||
{
|
{
|
||||||
GstV4l2BufferPool *pool;
|
GstV4l2BufferPool *pool;
|
||||||
gint n;
|
gint n;
|
||||||
@ -315,7 +313,7 @@ gst_v4l2_buffer_pool_new (GstElement * v4l2elem, gint fd, gint num_buffers,
|
|||||||
|
|
||||||
/* now, map the buffers: */
|
/* now, map the buffers: */
|
||||||
for (n = 0; n < num_buffers; n++) {
|
for (n = 0; n < num_buffers; n++) {
|
||||||
pool->buffers[n] = gst_v4l2_buffer_new (pool, n, caps);
|
pool->buffers[n] = gst_v4l2_buffer_new (pool, n);
|
||||||
if (!pool->buffers[n])
|
if (!pool->buffers[n])
|
||||||
goto buffer_new_failed;
|
goto buffer_new_failed;
|
||||||
pool->num_live_buffers++;
|
pool->num_live_buffers++;
|
||||||
|
@ -83,7 +83,7 @@ const GstMetaInfo * gst_meta_v4l2_get_info (void);
|
|||||||
#define GST_META_V4L2_ADD(buf) ((GstMetaV4l2 *)gst_buffer_add_meta(buf,gst_meta_v4l2_get_info(),NULL))
|
#define GST_META_V4L2_ADD(buf) ((GstMetaV4l2 *)gst_buffer_add_meta(buf,gst_meta_v4l2_get_info(),NULL))
|
||||||
|
|
||||||
void gst_v4l2_buffer_pool_destroy (GstV4l2BufferPool * pool);
|
void gst_v4l2_buffer_pool_destroy (GstV4l2BufferPool * pool);
|
||||||
GstV4l2BufferPool *gst_v4l2_buffer_pool_new (GstElement *v4l2elem, gint fd, gint num_buffers, GstCaps * caps, gboolean requeuebuf, enum v4l2_buf_type type);
|
GstV4l2BufferPool *gst_v4l2_buffer_pool_new (GstElement *v4l2elem, gint fd, gint num_buffers, gboolean requeuebuf, enum v4l2_buf_type type);
|
||||||
|
|
||||||
|
|
||||||
GstBuffer *gst_v4l2_buffer_pool_get (GstV4l2BufferPool *pool, gboolean blocking);
|
GstBuffer *gst_v4l2_buffer_pool_get (GstV4l2BufferPool *pool, gboolean blocking);
|
||||||
|
@ -668,7 +668,7 @@ gst_v4l2sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
|
|||||||
|
|
||||||
newpool = gst_v4l2_buffer_pool_new (GST_ELEMENT (v4l2sink),
|
newpool = gst_v4l2_buffer_pool_new (GST_ELEMENT (v4l2sink),
|
||||||
v4l2sink->v4l2object->video_fd,
|
v4l2sink->v4l2object->video_fd,
|
||||||
v4l2sink->num_buffers, caps, FALSE, V4L2_BUF_TYPE_VIDEO_OUTPUT);
|
v4l2sink->num_buffers, FALSE, V4L2_BUF_TYPE_VIDEO_OUTPUT);
|
||||||
if (newpool == NULL)
|
if (newpool == NULL)
|
||||||
goto no_pool;
|
goto no_pool;
|
||||||
|
|
||||||
|
@ -310,7 +310,7 @@ gst_v4l2src_capture_init (GstV4l2Src * v4l2src, GstCaps * caps)
|
|||||||
|
|
||||||
if (!(v4l2src->pool = gst_v4l2_buffer_pool_new (GST_ELEMENT (v4l2src),
|
if (!(v4l2src->pool = gst_v4l2_buffer_pool_new (GST_ELEMENT (v4l2src),
|
||||||
v4l2src->v4l2object->video_fd,
|
v4l2src->v4l2object->video_fd,
|
||||||
v4l2src->num_buffers, caps, TRUE, V4L2_BUF_TYPE_VIDEO_CAPTURE)))
|
v4l2src->num_buffers, TRUE, V4L2_BUF_TYPE_VIDEO_CAPTURE)))
|
||||||
goto buffer_pool_new_failed;
|
goto buffer_pool_new_failed;
|
||||||
|
|
||||||
GST_INFO_OBJECT (v4l2src, "capturing buffers via mmap()");
|
GST_INFO_OBJECT (v4l2src, "capturing buffers via mmap()");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user