7.53. ioctl VIDIOC_REMOVE_BUFS¶
7.53.1. Name¶
VIDIOC_REMOVE_BUFS - Removes buffers from a queue
7.53.2. Synopsis¶
-
VIDIOC_REMOVE_BUFS¶
int ioctl(int fd, VIDIOC_REMOVE_BUFS, struct v4l2_remove_buffers *argp)
7.53.3. Arguments¶
fd
File descriptor returned by
open()
.argp
Pointer to struct
v4l2_remove_buffers
.
7.53.4. Description¶
Applications can optionally call the ioctl VIDIOC_REMOVE_BUFS ioctl to
remove buffers from a queue.
ioctl VIDIOC_CREATE_BUFS ioctl support is mandatory to enable ioctl VIDIOC_REMOVE_BUFS.
This ioctl is available if the V4L2_BUF_CAP_SUPPORTS_REMOVE_BUFS
capability
is set on the queue when VIDIOC_REQBUFS()
or VIDIOC_CREATE_BUFS()
are invoked.
-
type v4l2_remove_buffers¶
__u32 |
|
The starting buffer index to remove. This field is ignored if count == 0. |
__u32 |
|
The number of buffers to be removed with indices ‘index’ until ‘index + count - 1’.
All buffers in this range must be valid and in DEQUEUED state.
ioctl VIDIOC_REMOVE_BUFS will always check the validity of |
__u32 |
|
Type of the stream or buffers, this is the same as the struct
|
__u32 |
|
A place holder for future extensions. Drivers and applications must set the array to zero. |
7.53.5. Return Value¶
On success 0 is returned, on error -1 and the errno
variable is set
appropriately. The generic error codes are described at the
Generic Error Codes chapter. If an error occurs, no
buffers will be freed and one of the error codes below will be returned:
- EBUSY
File I/O is in progress. One or more of the buffers in the range
index
toindex + count - 1
are not in DEQUEUED state.- EINVAL
One or more of the buffers in the range
index
toindex + count - 1
do not exist in the queue. The buffer type (type
field) is not valid.