Re: Question about v4l2-compliance: cap->readbuffers

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

 



Hello Hans

Thanks for the explanation. I have tried changing the controls to
inactive and the are shown disabled on the gui, just as you say, but
they are there :S. I personally liked better the previous behaviour,
when the controls where not shown at all. But it is just that, a
taste, if it is more correct showing them as inactive they will be
inactive :).

For a case where a option is only available at a specific format: I
was also disablig the control (now inactiving it), and returning
-EINVAL if the user tried to set the control on an incompatible
format. Apparently the v4l2-compilance dont like that either, is this
a false positive or I should behave differently?.

Thank you again!




On Tue, Jul 30, 2013 at 6:17 PM, Hans Verkuil <hverkuil@xxxxxxxxx> wrote:
> Hi Ricardo,
>
> On 07/30/2013 05:46 PM, Ricardo Ribalda Delgado wrote:
>> Hello
>>
>> I have a camera that works on two modes: Mono and colour. On color
>> mode it has 3 gains, on mono mode it has 1 gain.
>>
>> When the user sets the output to mono I disable the color controls
>> (and the other way around).
>>
>> Also on color mode the hflip and vflip do not work, therefore I dont show them.
>>
>> I could return -EINVAL, but I rather not show the controls to the user.
>>
>> What would be the proper way to do this?
>
> Use the INACTIVE flag, that's the way it is typically done. You can still set
> such controls, but the new value won't be active until you switch back to a
> mode where they do work.
>
> Using INACTIVE will show such controls as disabled in a GUI like qv4l2. I highly
> recommend using qv4l2 for testing this since it is the reference implementation
> of how GUIs should interpret control flags.
>
> Regards,
>
>         Hans
>
>>
>>
>> Thanks gain.
>>
>>
>>
>>
>>
>> On Tue, Jul 30, 2013 at 5:29 PM, Hans Verkuil <hverkuil@xxxxxxxxx> wrote:
>>> On Tue 30 July 2013 17:18:58 Ricardo Ribalda Delgado wrote:
>>>> Thanks for the explanation Hans!
>>>>
>>>> I finaly manage to pass that one ;)
>>>>
>>>> Just one more question. Why the compliance test checks if the DISABLED
>>>> flag is on on for qctrls?
>>>>
>>>> http://git.linuxtv.org/v4l-utils.git/blob/3ae390e54a0ba627c9e74953081560192b996df4:/utils/v4l2-compliance/v4l2-test-controls.cpp#l137
>>>>
>>>>  137         if (fl & V4L2_CTRL_FLAG_DISABLED)
>>>>  138                 return fail("DISABLED flag set\n");
>>>>
>>>> Apparently that has been added on:
>>>> http://git.linuxtv.org/v4l-utils.git/commit/0a4d4accea7266d7b5f54dea7ddf46cce8421fbb
>>>>
>>>> But I have failed to find a reason
>>>
>>> It shouldn't be used anymore in drivers. With the control framework there is
>>> no longer any reason to use the DISABLED flag.
>>>
>>> If something has a valid use case for it, then I'd like to know what it is.
>>>
>>> Regards,
>>>
>>>         Hans
>>
>>
>>



-- 
Ricardo Ribalda
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux