On 29 Dec 2001, Dirk Meul wrote: > Hi Steve, > > with changes you mentioned nothing changed for me :-( > > Starting NVrec.c, version 20011228 (NVrec-20011228). > v4lgen core init - Device /dev/v4l/video0 > v4l2 core init - Size: 384x288 from /dev/v4l/video0 > v4l2 core init - trying format YUV420 > v4l2 core init - could not request parameters: Invalid argument > > [v4l2_core.c] > ... > vct->fd = open(fdev, O_RDWR); > ... > vct->bufs[i * vct->planes] = (unsigned char *)mmap(NULL, > vct->cbuf.length, PROT_READ|PROT_WRITE, MAP_SHARED, vct->fd, > vct->cbuf.offset); > ... > > Something missed? Hi Dirk, Sorry - I forgot that I also made some changes in Gerd's bttv 0.8 - to add an implementation of VIDIOC_G_PARM. I though I'd submitted that to Gerd but don't see this in the current 0.8.31 source, although other adjustments are there. Here's a patch to add the VIDIOC_G_PARM for 0.8.31 - needed for NVrec to work. I ported this change forward from the 0.8.28 I use - compiled but not tested. I also had some changes to mmap flags - but 0.8.31 code has changed in that area so I can't immediately see if the 0.8.31 has the changes. Let me know how you get on. In the meantime I will clean up and make a proper patch submission to Gerd. Regards, Steve
diff -U3 -r bttv-0.8.31/bttv-driver.c bttv-0.8.31-sld/bttv-driver.c --- bttv-0.8.31/bttv-driver.c Fri Nov 16 15:13:59 2001 +++ bttv-0.8.31-sld/bttv-driver.c Sat Dec 29 13:24:49 2001 @@ -2420,6 +2420,27 @@ case VIDIOC_S_CTRL: return set_control(btv,arg); + case VIDIOC_G_PARM: + case VIDIOC_S_PARM: + { + struct v4l2_standard std; + struct v4l2_streamparm *p = arg; + + down(&fh->lock); +#ifdef FIXME + /* FIXME: BTTV2 code: Where's equivalent info in bttv structures...? */ + p->type = (btvo->vbi)?V4L2_BUF_TYPE_VBI:V4L2_BUF_TYPE_CAPTURE; +#else + p->type = V4L2_BUF_TYPE_CAPTURE; +#endif + p->parm.capture.capability = 0; + p->parm.capture.capturemode = 0; + v4l2_video_std_construct(&std,bttv_tvnorms[btv->tvnorm].v4l2_id,0); + p->parm.capture.timeperframe = v4l2_video_std_tpf(&std); + up(&fh->lock); + return 0; + } + case VIDIOC_ENUMSTD: case VIDIOC_G_STD: case VIDIOC_S_STD: