History

[media] v4l: Use full 32 bits for buffer flags

The buffer flags field is 32 bits but the defined only used 16. This is fine, but as more than 16 bits will be used in the very near future, define them as 32-bit numbers for consistency.

Sakari Ailus committed 13 years ago

Commit 939f1371 parent c6c09212 files · +38 −30Browse files

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

Unified · Split

include/uapi/linux/videodev2.h+23−15
@@ -674,24 +674,32 @@ struct v4l2_buffer { · 673 unmodified lines
674};674};
675 675
676/* Flags for 'flags' field */676/* Flags for 'flags' field */
677#define V4L2_BUF_FLAG_MAPPED 0x0001 /* Buffer is mapped (flag) */677/* Buffer is mapped (flag) */
678#define V4L2_BUF_FLAG_QUEUED 0x0002 /* Buffer is queued for processing */678#define V4L2_BUF_FLAG_MAPPED 0x00000001
679#define V4L2_BUF_FLAG_DONE 0x0004 /* Buffer is ready */679/* Buffer is queued for processing */
680#define V4L2_BUF_FLAG_KEYFRAME 0x0008 /* Image is a keyframe (I-frame) */680#define V4L2_BUF_FLAG_QUEUED 0x00000002
681#define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */681/* Buffer is ready */
682#define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */682#define V4L2_BUF_FLAG_DONE 0x00000004
683/* Image is a keyframe (I-frame) */
684#define V4L2_BUF_FLAG_KEYFRAME 0x00000008
685/* Image is a P-frame */
686#define V4L2_BUF_FLAG_PFRAME 0x00000010
687/* Image is a B-frame */
688#define V4L2_BUF_FLAG_BFRAME 0x00000020
683/* Buffer is ready, but the data contained within is corrupted. */689/* Buffer is ready, but the data contained within is corrupted. */
684#define V4L2_BUF_FLAG_ERROR 0x0040690#define V4L2_BUF_FLAG_ERROR 0x00000040
685#define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */691/* timecode field is valid */
686#define V4L2_BUF_FLAG_PREPARED 0x0400 /* Buffer is prepared for queuing */692#define V4L2_BUF_FLAG_TIMECODE 0x00000100
693/* Buffer is prepared for queuing */
694#define V4L2_BUF_FLAG_PREPARED 0x00000400
687/* Cache handling flags */695/* Cache handling flags */
688#define V4L2_BUF_FLAG_NO_CACHE_INVALIDATE 0x0800696#define V4L2_BUF_FLAG_NO_CACHE_INVALIDATE 0x00000800
689#define V4L2_BUF_FLAG_NO_CACHE_CLEAN 0x1000697#define V4L2_BUF_FLAG_NO_CACHE_CLEAN 0x00001000
690/* Timestamp type */698/* Timestamp type */
691#define V4L2_BUF_FLAG_TIMESTAMP_MASK 0xe000699#define V4L2_BUF_FLAG_TIMESTAMP_MASK 0x0000e000
692#define V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN 0x0000700#define V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN 0x00000000
693#define V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC 0x2000701#define V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC 0x00002000
694#define V4L2_BUF_FLAG_TIMESTAMP_COPY 0x4000702#define V4L2_BUF_FLAG_TIMESTAMP_COPY 0x00004000
695 703
696/**704/**
697 * struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor705 * struct v4l2_exportbuffer - export of video buffer as DMABUF file descriptor

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