VIDIOC_REMOVE_BUFS ioctl allows to remove buffers from a queue. The number of buffers to remove in given by count field of struct v4l2_remove_buffers and the range start at the index specified in the same structure.
Showing the changes to include/uapi (1 of 11 files). Show all
Unified · Split
| @@ -1036,6 +1036,7 @@ struct v4l2_requestbuffers { · 1035 unmodified lines | ||
| 1036 | 1036 | #define V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF (1 << 5) |
| 1037 | 1037 | #define V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS (1 << 6) |
| 1038 | 1038 | #define V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS (1 << 7) |
| 1039 | +#define V4L2_BUF_CAP_SUPPORTS_REMOVE_BUFS (1 << 8) | |
| 1039 | 1040 | |
| 1040 | 1041 | /** |
| 1041 | 1042 | * struct v4l2_plane - plane info for multi-planar buffers |
| @@ -2624,6 +2625,20 @@ struct v4l2_create_buffers { · 1582 unmodified lines | ||
| 2624 | 2625 | __u32 reserved[5]; |
| 2625 | 2626 | }; |
| 2626 | 2627 | |
| 2628 | +/** | |
| 2629 | + * struct v4l2_remove_buffers - VIDIOC_REMOVE_BUFS argument | |
| 2630 | + * @index: the first buffer to be removed | |
| 2631 | + * @count: number of buffers to removed | |
| 2632 | + * @type: enum v4l2_buf_type | |
| 2633 | + * @reserved: future extensions | |
| 2634 | + */ | |
| 2635 | +struct v4l2_remove_buffers { | |
| 2636 | + __u32 index; | |
| 2637 | + __u32 count; | |
| 2638 | + __u32 type; | |
| 2639 | + __u32 reserved[13]; | |
| 2640 | +}; | |
| 2641 | + | |
| 2627 | 2642 | /* |
| 2628 | 2643 | * I O C T L C O D E S F O R V I D E O D E V I C E S |
| 2629 | 2644 | * |
| @@ -2723,6 +2738,8 @@ struct v4l2_create_buffers { · 93 unmodified lines | ||
| 2723 | 2738 | #define VIDIOC_DBG_G_CHIP_INFO _IOWR('V', 102, struct v4l2_dbg_chip_info) |
| 2724 | 2739 | |
| 2725 | 2740 | #define VIDIOC_QUERY_EXT_CTRL _IOWR('V', 103, struct v4l2_query_ext_ctrl) |
| 2741 | +#define VIDIOC_REMOVE_BUFS _IOWR('V', 104, struct v4l2_remove_buffers) | |
| 2742 | + | |
| 2726 | 2743 | |
| 2727 | 2744 | /* Reminder: when adding new ioctls please add support for them to |
| 2728 | 2745 | drivers/media/v4l2-core/v4l2-compat-ioctl32.c as well! */ |