Re: v4l2 control querying

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



>  So the question: is the app actually supposed to loop-query all
>  available controls and display each of them? Or is an application
>  supposed to use the controls that are known to it, and omit any
>  unknown/private controls? Or am I missing something crucial here?

        printf("controls\n");
        for (i = 0;; i++) {
                memset(&qctrl,0,sizeof(qctrl));
                qctrl.id = V4L2_CID_BASE+i;
                if (-1 == ioctl(fd,VIDIOC_QUERYCTRL,&qctrl))
                        break;
                if (qctrl.flags & V4L2_CTRL_FLAG_DISABLED)
                        continue;
                printf("    VIDIOC_QUERYCTRL(BASE+%d)\n",i);
                print_struct(stderr,desc_v4l2_queryctrl,&qctrl,"",tab);
        }
        for (i = 0;; i++) {
                memset(&qctrl,0,sizeof(qctrl));
                qctrl.id = V4L2_CID_PRIVATE_BASE+i;
                if (-1 == ioctl(fd,VIDIOC_QUERYCTRL,&qctrl))
                        break;
                if (qctrl.flags & V4L2_CTRL_FLAG_DISABLED)
                        continue;
                printf("    VIDIOC_QUERYCTRL(PRIVATE_BASE+%d)\n",i);
                print_struct(stderr,desc_v4l2_queryctrl,&qctrl,"",tab);
        }


  Gerd





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux