When queuing buffers allow for passing the request that should be associated with this buffer. If V4L2_BUF_FLAG_REQUEST_FD is set, then request_fd is used as the file descriptor. If a buffer is stored in a request, but not yet queued to the driver, then V4L2_BUF_FLAG_IN_REQUEST is set.
Showing the changes to include/uapi/linux (1 of 5 files). Show all
Unified · Split
| @@ -917,6 +917,7 @@ struct v4l2_plane { · 916 unmodified lines | ||
| 917 | 917 | * @length: size in bytes of the buffer (NOT its payload) for single-plane |
| 918 | 918 | * buffers (when type != *_MPLANE); number of elements in the |
| 919 | 919 | * planes array for multi-plane buffers |
| 920 | + * @request_fd: fd of the request that this buffer should use | |
| 920 | 921 | * |
| 921 | 922 | * Contains data exchanged by application and driver using one of the Streaming |
| 922 | 923 | * I/O methods. |
| @@ -941,7 +942,10 @@ struct v4l2_buffer { · 18 unmodified lines | ||
| 941 | 942 | } m; |
| 942 | 943 | __u32 length; |
| 943 | 944 | __u32 reserved2; |
| 944 | − __u32 reserved; | |
| 945 | + union { | |
| 946 | + __s32 request_fd; | |
| 947 | + __u32 reserved; | |
| 948 | + }; | |
| 945 | 949 | }; |
| 946 | 950 | |
| 947 | 951 | /* Flags for 'flags' field */ |
| @@ -959,6 +963,8 @@ struct v4l2_buffer { · 11 unmodified lines | ||
| 959 | 963 | #define V4L2_BUF_FLAG_BFRAME 0x00000020 |
| 960 | 964 | /* Buffer is ready, but the data contained within is corrupted. */ |
| 961 | 965 | #define V4L2_BUF_FLAG_ERROR 0x00000040 |
| 966 | +/* Buffer is added to an unqueued request */ | |
| 967 | +#define V4L2_BUF_FLAG_IN_REQUEST 0x00000080 | |
| 962 | 968 | /* timecode field is valid */ |
| 963 | 969 | #define V4L2_BUF_FLAG_TIMECODE 0x00000100 |
| 964 | 970 | /* Buffer is prepared for queuing */ |
| @@ -977,6 +983,8 @@ struct v4l2_buffer { · 12 unmodified lines | ||
| 977 | 983 | #define V4L2_BUF_FLAG_TSTAMP_SRC_SOE 0x00010000 |
| 978 | 984 | /* mem2mem encoder/decoder */ |
| 979 | 985 | #define V4L2_BUF_FLAG_LAST 0x00100000 |
| 986 | +/* request_fd is valid */ | |
| 987 | +#define V4L2_BUF_FLAG_REQUEST_FD 0x00800000 | |
| 980 | 988 | |
| 981 | 989 | /** |
| 982 | 990 | * struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor |