PROBLEM SOLVED!!!
Hello all,
While reading through the MeeGo documentation , I noticed that the v4l2 API is supported on MeeGo.
I am working on porting Maemo application to MeeGo, but got stuck at the v4l2 implementation. I am trying to read a camera control variable V4L2_CID_FOCUS_ABSOLUTE, but end up with an error argument not supported. When I try to enumerate through all of the supported control arguments I do not retrieve any, while the same code return 24 user controls on a maemo device.
Question:
1.) Is it possible to use http://v4l2spec.bytesex.org/spec/x542.htm and Extended Controls of v4l2 API on MeeGo.
2.) If so, do you have any idea why the code bellow returns 24 controls of Maemo device and 0 on Meego.
Thx for your help.Code:void InitV4l2Driver(){ const char *device = "/dev/video0"; //tried video 1, 2, 3 and 4 fd = open(device, O_RDWR, 0); if(fd < 0) { fprintf(stderr, "Unable to open %s: %s\n", device, strerror(errno)); printf("Unable to open %s: %s\n", device, strerror(errno)); } int count=0; struct v4l2_queryctrl qctrl; qctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL; while (0 == ioctl (fd, VIDIOC_QUERYCTRL, &qctrl)) { count++; qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL; } printf("Number of controls: %d\n",count); }
Klen

Reply With Quote

