| #include <linux/kernel.h> |
| #include <linux/videodev2.h> |
| #include <media/videobuf2-core.h> |
| /* Maximum frame size in bytes, for sanity checking. */ |
| #define UVC_MAX_FRAME_SIZE (16*1024*1024) |
| /* Maximum number of video buffers. */ |
| #define UVC_MAX_VIDEO_BUFFERS 32 |
| /* ------------------------------------------------------------------------ |
| UVC_BUF_STATE_QUEUED = 1, |
| UVC_BUF_STATE_ACTIVE = 2, |
| enum uvc_buffer_state state; |
| #define UVC_QUEUE_DISCONNECTED (1 << 0) |
| #define UVC_QUEUE_DROP_INCOMPLETE (1 << 1) |
| #define UVC_QUEUE_PAUSED (1 << 2) |
| struct mutex mutex; /* Protects queue */ |
| spinlock_t irqlock; /* Protects flags and irqqueue */ |
| struct list_head irqqueue; |
| static inline int uvc_queue_streaming(struct uvc_video_queue *queue) |
| return vb2_is_streaming(&queue->queue); |
| #endif /* _UVC_QUEUE_H_ */ |