Commit 644e9c55 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

v4l2: remove dead userptr code

parent 630c2645
...@@ -544,7 +544,6 @@ void DemuxClose( vlc_object_t *obj ) ...@@ -544,7 +544,6 @@ void DemuxClose( vlc_object_t *obj )
break; break;
case IO_METHOD_MMAP: case IO_METHOD_MMAP:
case IO_METHOD_USERPTR:
{ {
/* NOTE: Some buggy drivers hang if buffers are not unmapped before /* NOTE: Some buggy drivers hang if buffers are not unmapped before
* streamoff */ * streamoff */
...@@ -552,8 +551,7 @@ void DemuxClose( vlc_object_t *obj ) ...@@ -552,8 +551,7 @@ void DemuxClose( vlc_object_t *obj )
{ {
struct v4l2_buffer buf = { struct v4l2_buffer buf = {
.type = V4L2_BUF_TYPE_VIDEO_CAPTURE, .type = V4L2_BUF_TYPE_VIDEO_CAPTURE,
.memory = ( sys->io == IO_METHOD_USERPTR ) ? .memory = V4L2_MEMORY_MMAP,
V4L2_MEMORY_USERPTR : V4L2_MEMORY_MMAP,
}; };
v4l2_ioctl( fd, VIDIOC_DQBUF, &buf ); v4l2_ioctl( fd, VIDIOC_DQBUF, &buf );
} }
...@@ -576,11 +574,6 @@ void DemuxClose( vlc_object_t *obj ) ...@@ -576,11 +574,6 @@ void DemuxClose( vlc_object_t *obj )
v4l2_munmap( sys->p_buffers[i].start, v4l2_munmap( sys->p_buffers[i].start,
sys->p_buffers[i].length ); sys->p_buffers[i].length );
break; break;
case IO_METHOD_USERPTR:
for( unsigned i = 0; i < sys->i_nbuffers; ++i )
free( sys->p_buffers[i].start );
break;
} }
free( sys->p_buffers ); free( sys->p_buffers );
} }
......
...@@ -71,7 +71,6 @@ extern int (*v4l2_munmap) (void *, size_t); ...@@ -71,7 +71,6 @@ extern int (*v4l2_munmap) (void *, size_t);
typedef enum { typedef enum {
IO_METHOD_READ=1, IO_METHOD_READ=1,
IO_METHOD_MMAP, IO_METHOD_MMAP,
IO_METHOD_USERPTR,
} io_method; } io_method;
typedef struct vlc_v4l2_ctrl vlc_v4l2_ctrl_t; typedef struct vlc_v4l2_ctrl vlc_v4l2_ctrl_t;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment