Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1427 → Rev 1426

/demos/trunk/bttvdemo/bttv.c
72,17 → 72,14
 
task_nopreempt();
 
/* Open VideoDev */
VIDEODEV26_open(0);
/* Select input channel */
VIDEODEV26_ioctl(0,VIDIOCGCHAN,(unsigned long)&chan);
chan.channel = (int)(arg);
VIDEODEV26_ioctl(0,VIDIOCSCHAN,(unsigned long)&chan);
/* Select palette and depth */
VIDEODEV26_ioctl(0,VIDIOCGPICT,(unsigned long)&vpic);
vpic.palette = VIDEO_PALETTE_GREY;
90,8 → 87,6
VIDEODEV26_ioctl(0,VIDIOCSPICT,(unsigned long)&vpic);
 
/* Double Buffering Strategy */
 
fbuf[0].base = malloc(320*200);
fbuf[0].height = 200;
fbuf[0].width = 320;
107,7 → 102,6
VIDEODEV26_ioctl(0,VIDIOCSFBUF,(unsigned long)&(fbuf[0]));
VIDEODEV26_ioctl(0,VIDIOCSFBUF,(unsigned long)&(fbuf[1]));
 
/* Set grabbing window */
VIDEODEV26_ioctl(0,VIDIOCGWIN,(unsigned long)&win);
win.x = 0;
126,11 → 120,8
task_nopreempt();
/* Set the current buffer */
VIDEODEV26_ioctl(0,VIDIOCSFBUF,(unsigned long)&(fbuf[save]));
 
 
/* Start grabbing */
on = 1;
VIDEODEV26_ioctl(0,VIDIOCCAPTURE,(unsigned long)&on);
138,7 → 129,6
 
elaborate_image(fbuf[display].base);
 
/* Buffer switch */
temp = display;
display = save;
save = temp;