On Tuesday 27 January 2009 19:08:43 Trent Piepho wrote:
> On Tue, 27 Jan 2009, Hans Verkuil wrote:
> > > [Shah, Hardik] Hi Hans,
> > > I got your above point. Now regarding the enum I am not sure about
> > > how to implement it. Are you suggesting me to remove the control ID
> > > for rotation and implement in some other way. Please let me know if
> > > I am missing something. Currently in driver I have implemented the
> > > rotation in below way {
> > > .id = V4L2_CID_ROTATION,
> > > .name = "Rotation",
> > > .minimum = 0,
> > > .maximum = 270,
> > > .step = 90,
> > > .default_value = -1,
> > > .flags = 0,
> > > .type = V4L2_CTRL_TYPE_INTEGER,
> > > You want me to change V4L2_CTRL_TYPE_INTEGER to some enum or
> > > something.
> >
> > Change it to V4L2_CTRL_TYPE_MENU. See:
> > http://www.linuxtv.org/downloads/video4linux/API/V4L2_API/spec-single/v
> >4l2.html#VIDIOC-QUERYCTRL
>
> Thinking about it more, I think an integer control like this might make
> more sense. default_value should be changed to 0 of course. Extracting
> the real meaning from the control setting is more obvious for the integer
> control than a menu. And what if some hardware allows for rotations
> other than 90 degrees?
If the hardware can do rotations other than 90 degrees then we get into the
area of video effects. In principle such a driver can implement this
rotation control as an integer rather than a menu (apps are supposed to
query the type of a control dynamically, after all). But for a case like
this where there are only four values I think a menu-type control is much
more user-friendly.
Regards,
Hans
--
Hans Verkuil - video4linux developer - sponsored by TANDBERG
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html