On Wed, 2007-12-12 at 16:03 -0800, Peter Krenesky wrote: > Hi all, > > I'm trying to initialize the camera device and running into some > errors. I'm attempting to use the mmap interface initialized by > VIDIOCGMBUF ioctl. the ioctl is returning -1 and errno is 22. > > Is VIDIOCGMBUF/mmap even supported by the driver/device? If so, any > ideas on what can be going wrong?
What's normally used right now to get video out of the device is GStreamer. You can see what GStreamer is doing from the stuff in v4l2src_calls.c. Specifically, look at gst_v4l2src_capture_init(). You probably want to use the QBUF/DQBUF functionality. Dan > > Here is the c++ code that is causing the problem: > > video_mbuf mmap_buf_info; > if (-1 == ioctl(vidfd, VIDIOCGMBUF, &mmap_buf_info)) > { > printf ("ERROR: %i \n", errno); > close(); > return(HXR_ENC_NO_VIDEO_CAPTURE); > } > > > > thanks, > > -peter > > > > _______________________________________________ > Devel mailing list > Devel@lists.laptop.org > http://lists.laptop.org/listinfo/devel _______________________________________________ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel