当前位置: 技术问答>linux和unix
求助,关于write_jpeg问题
来源: 互联网 发布时间:2016-09-20
本文导语: /* 涓嬮潰鏄竴涓畬鏁寸殑绋嬪簭 test.c * gcc test.c -o test -ljpeg */ #include #include #include #include #include #include #include #include #include #include #define WIDTH 320 #define HEIG...
/* 涓嬮潰鏄竴涓畬鏁寸殑绋嬪簭 test.c
* gcc test.c -o test -ljpeg
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define WIDTH 320
#define HEIGHT 240
#define V4L_DEVICE "/dev/video0"
int main()
{
unsigned char* buf;
int i,j;
int fd;
int re;
struct video_capability vcap;
struct video_channel vc;
struct video_mbuf mbuf;
struct video_mmap mm;
fd = open(V4L_DEVICE, O_RDWR);
if(fd
* gcc test.c -o test -ljpeg
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define WIDTH 320
#define HEIGHT 240
#define V4L_DEVICE "/dev/video0"
int main()
{
unsigned char* buf;
int i,j;
int fd;
int re;
struct video_capability vcap;
struct video_channel vc;
struct video_mbuf mbuf;
struct video_mmap mm;
fd = open(V4L_DEVICE, O_RDWR);
if(fd