History

media: v4l2: Add REMOVE_BUFS ioctl

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.

Benjamin Gaignard committed 2 years ago

Commit a3293a81 parent 5fb19f211 files · +211 −1Browse files

Showing the changes to include/uapi (1 of 11 files). Show all

Unified · Split

include/uapi/linux/videodev2.h+17−0
@@ -1036,6 +1036,7 @@ struct v4l2_requestbuffers { · 1035 unmodified lines
10361036 #define V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF (1 << 5)
10371037 #define V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS (1 << 6)
10381038 #define V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS (1 << 7)
1039+#define V4L2_BUF_CAP_SUPPORTS_REMOVE_BUFS (1 << 8)
10391040
10401041 /**
10411042 * struct v4l2_plane - plane info for multi-planar buffers
@@ -2624,6 +2625,20 @@ struct v4l2_create_buffers { · 1582 unmodified lines
26242625 __u32 reserved[5];
26252626 };
26262627
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+
26272642 /*
26282643 * 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
26292644 *
@@ -2723,6 +2738,8 @@ struct v4l2_create_buffers { · 93 unmodified lines
27232738 #define VIDIOC_DBG_G_CHIP_INFO _IOWR('V', 102, struct v4l2_dbg_chip_info)
27242739
27252740 #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+
27262743
27272744 /* Reminder: when adding new ioctls please add support for them to
27282745 drivers/media/v4l2-core/v4l2-compat-ioctl32.c as well! */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t