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

📄 spcav4l.h

📁 linux下用c语言写的一个图像抓拍程序。
💻 H
字号:
/****************************************************************************Mouse-capture Version 1:2006-6-29This program is used to get one picture from a jpeg webcam to test whether the webcam's drive is successfully installed.It is made for ARM9.Of course it can be used on PC if you modify the complier:)It is modified from servfox by daily3(戴丽-戴小鼠 in Hefei University of Technology and HHCN-BBS).Thanks to 我爱狗熊.If you have problems ,you can contact me.Email:daily3@126.comWish you some useful help!Best Wish to the orignal authors! Thank you very much!****************************************************************************/#ifndef SPCAV4L_H#define SPCAV4L_H #include <stdio.h>#include <unistd.h>#include <stdlib.h>#include <string.h>#include <fcntl.h>#include <errno.h>#include <stdarg.h>#include <linux/types.h>#include <linux/videodev.h>#include <sys/mman.h>#include <sys/ioctl.h>#include <sys/file.h>#include <sys/types.h>#include <sys/stat.h>#define VIDEO_PALETTE_JPEG 21#define BRIDGE_ZC3XX 0#define MAX_BRIDGE 2#define JPEG 0#define UNOW 1struct bridge_list {	int num;	const char *name;};	struct vdIn {	int fd;	char *videodevice ;	struct video_mmap vmmap;	struct video_capability videocap;	int mmapsize;	struct video_mbuf videombuf;	struct video_picture videopict;	struct video_channel videochan;		int cameratype ;	char *cameraname;	char bridge[9];	int palette; // available palette	int grabMethod ;	unsigned char *pFramebuffer;	unsigned char *ptframe;	int framesizeIn ;	int bppIn;	int  hdrwidth;	int  hdrheight;	int  formatIn;	};	int init_videoIn(struct vdIn *vd,char *device,int width,int height,int format,int grabmethod);int v4lGrab (struct vdIn *vd,char *filename );int close_v4l (struct vdIn *vd);int get_jpegsize (unsigned char *buf, int insize);void exit_fatal(char *messages);#endif /* SPCAV4L_H */

⌨️ 快捷键说明

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