⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mmvideo_h.txt

📁 Linux Kernel Programming by Examples(1)[Xeroo]
💻 TXT
字号:
/** mmvideo.h * * author marco corvi <marco_corvi@geocities.com> * date   may 2003 * * credits: after the stv680 driver (thanks) * */#include <linux/timer.h>#ifndef MM_VIDEO_H#define MM_VIDEO_H#define MMVIDEO_NUMFRAMES    2     // double buffer#define MMVIDEO_TIMEOUT   1000#define MMVIDEO_WIDTH      384#define MMVIDEO_HEIGHT     288#define MMVIDEO_DEPTH        3     // RGB#define MMVIDEO_FRAMESIZE  331776  // 3 * 384 * 288#define MMVIDEO_PALETTE    VIDEO_PALETTE_RGB24enum {  MMVIDEO_SQUARE,  MMVIDEO_CROSS,  MMVIDEO_CIRCLE,  MMVIDEO_DIAMOND};#define MMVIDEO_FRAME_READY    0x01#define MMVIDEO_FRAME_MMAP     0x10#define MMVIDEO_FRAME_MMAPUSED 0x20// mmvideo frames // data are stored as RGB tripletsstruct mmvideo_frame {  unsigned char * data;};struct mmvideo_device {  struct video_device  vdev;  struct video_picture vpict;  int cwidth;     // camera width-height  int cheight;  int vwidth;     // video width-height  int vheight;  int user;       // number of users (max 1)  int total_cnt;  // statistics  int mmap_cnt;  int error_cnt;  int frame_cnt;  int drop_cnt;  unsigned char * fbuf;   // videodev buffer area  unsigned char * hw_fbuf;   // videodev buffer area  struct mmvideo_frame hw_frame[ 2 ];  struct mmvideo_frame frame[ MMVIDEO_NUMFRAMES ];  unsigned char frame_flag[ MMVIDEO_NUMFRAMES ];  int frame_nr;           // index of the last captured frame  int hw_frame_nr;           // index of the last captured frame  int frame_to_read;  struct proc_dir_entry * proc_entry;  struct semaphore  lock;    // video_device has already a semaphore ...  wait_queue_head_t wq;      // waiting processes  struct timer_list timer;  // struct file * file;     // open file};#endif // MM_VIDEO_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -