v4l.h

来自「在linux下利用video4linux接口采集单幅图像」· C头文件 代码 · 共 58 行

H
58
字号
#ifndef _V4L_H_#define _V4L_H_#include <sys/types.h>#include <linux/videodev.h>#define PAL_WIDTH 768#define PAL_HEIGHT 576#define CIF_WIDTH 352#define CIF_HEIGHT 288#define NTSC_WIDTH 640#define NTSC_HEIGHT 480struct _v4l_struct{   int fd;   int frame_current;   int frame_using[2];   struct video_capability capability;   struct video_buffer buffer;   struct video_window window;   struct video_channel channel[8];   struct video_picture picture;   struct video_tuner tuner;   struct video_audio audio[8];   struct video_mmap mmap;   struct video_mbuf mbuf;   unsigned char *map;   int overlay;};typedef struct _v4l_struct v4l_device;extern int v4l_open(char *, v4l_device *);extern int v4l_close(v4l_device *);extern int v4l_get_capability(v4l_device *);extern int v4l_set_norm(v4l_device *, int);extern int v4l_get_channels(v4l_device *);extern int v4l_get_audios(v4l_device *);extern int v4l_get_picture(v4l_device *);extern int v4l_grab_init(v4l_device *, int,int);extern int v4l_grab_frame(v4l_device *, int);extern int v4l_grab_sync(v4l_device *);extern int v4l_mmap_init(v4l_device *);extern int v4l_get_mbuf(v4l_device *);extern int v4l_get_picture(v4l_device *);extern int v4l_grab_picture(v4l_device *, unsigned int);extern int v4l_set_buffer(v4l_device *);extern int v4l_get_buffer(v4l_device *);extern int v4l_switch_channel(v4l_device *, int);extern int v4l_set_palette(v4l_device *, int);extern unsigned char* device_get_address(v4l_device*);extern int device_next_frame(v4l_device *);extern int device_grab_frame(v4l_device *);//extern int device_grab_sync(v4l_device *);#endif

⌨️ 快捷键说明

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