On Saturday, January 22, 2011 17:11:12 Andy Walls wrote: > On Sat, 2011-01-22 at 12:05 +0100, Hans Verkuil wrote: > > Controls can be dependent on the chosen input/output. So it has to be possible > > to enable or disable groups of controls, preventing them from being seen in > > the application. > > I'm not a human factors expert, but given some of the principles listed > here: > > http://www.asktog.com/basics/firstPrinciples.html > > I get the feeling that forcing controls to disappear and reappear will > not be good for every possible application UI design. They already have to do that anyway since changing input might also mean changing input standard, formats, etc. I doubt many do that, though, since having different inputs with different standard/formats/controls etc. is pretty rare. Although with embedded systems this will become more common. > I'm sure that due to subdevices providing all sorts of interesting > controls, some method of disabling controls is needed so as not to show > duplicates, etc. > > However, would it be better to provide a hint to the application and let > the application UI designer decide what gets shown; instead of the > kernel dictating what is shown? An alternative might be to enumerate all controls but set the DISABLED flag for disabled controls. But this is just half the story. For controls that are common to multiple inputs you still need to update them since the min/max ranges may have changed after you changed inputs. That said, it may not be a bad idea to use the DISABLED flag. It does allow a UI application to populate the control panel with all possible controls. However, it would require a small change to the spec since right now it says this: Table A.80. Control Flags V4L2_CTRL_FLAG_DISABLED 0x0001 This control is permanently disabled and should be ignored by the application. Any attempt to change the control will result in an EINVAL error code. That does not quite fit what the new situation will be. Regards, Hans -- Hans Verkuil - video4linux developer - sponsored by Cisco -- 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