linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <snjw23@gmail.com>
To: "Kim, Heungjun" <riverful.kim@samsung.com>
Cc: 'Laurent Pinchart' <laurent.pinchart@ideasonboard.com>,
	linux-media@vger.kernel.org, mchehab@redhat.com,
	hverkuil@xs4all.nl, sakari.ailus@iki.fi,
	kyungmin.park@samsung.com, 'Hans de Goede' <hdegoede@redhat.com>
Subject: Re: [RFC PATCH 1/4] v4l: Add V4L2_CID_PRESET_WHITE_BALANCE menu control
Date: Mon, 02 Jan 2012 22:50:07 +0100	[thread overview]
Message-ID: <4F02268F.4050107@gmail.com> (raw)
In-Reply-To: <4F0134DC.507@samsung.com>

Hi HeungJun,

On 01/02/2012 05:38 AM, Kim, Heungjun wrote:
> On 2011년 12월 30일 19:30, Sylwester Nawrocki wrote:
>> On 12/29/2011 06:08 AM, HeungJun, Kim wrote:
>>> I guess the WBP menu controls of pwc driver is probably defined in the other
>>> headers, for users being well known the PWC hardware. So it should be managed
>>> separately to videodev2.h. Is it right? Even if the way might be slightly
>>> different, it can't avoid to be "managed separately".
>>>
>>> It means the users being not well known the specific hardware like PWC,
>>> have difficulty to use that driver well.
>>> And, at least, It doesn't looks generic API for me.
>>> In this case, the unfamiliar user with such unique hardware, can use
>>> whatever he wants to use finally, after finding&  looking around the headers.
>> Applications can query drivers for supported controls and populate user control
>> panels dynamically, based on information from VIDIOC_QUERYCTRL and
>> VIDIOC_QUERYMENU
>> ioctls. Not needing to rely on menu items definition in videodev2.h.
>> I had a feeling you weren't considering such case. :)
> You're right in that meaning. And it might be a good point.
> But, I think these 2 ioctl can not handle about this issue.
> 
> Before using VIDIOC_QUERYCTRL and VIDIOC_QUERYMENU, the user should know which
> CID name
> is used in the videodev2.h, and anyway it can not be avoidable the user find out
> this name in it. :)

Yes, in many cases it is required to know the CID in advance, however it is not
mandatory for all applications.

> At least I've seen nobody makes the application just to open(), queryctrl(),
> querymenu(), and close(),
> only for scanning the specific control is existed or not.
> Until now, I have known these 2 ioctl is generally used for formating the UI
> componets like button, menu, and etc, on the screen.

Yup.

> So, it's safe to say that the user who knows that specific control is also know
> the CID name,
> the user knows such specific controls don't need even VIDIOC_QUERYCTRL and
> VIDIOC_QUERYMENU.

I respectfully disagree. Properly written applications must use VIDIOC_QUERYCTRL/
VIDIOC_QUERYMENU ioctls, as many v4l2 controls have now driver-specific value
range.

Please see this application for instance [1], it doesn't hard code any control
IDs in it, it only uses V4L2_CID_BASE, V4L2_CID_PRIVATE_BASE and V4L2_CID_LASTP1.

Yet, it can handle any control, as long as it supports the control's type.

> And IMHO, this is not related about pulling out the hidden(?) controls generally
> used in the camera,
> on the videodev2.h. I think it's only generic defined in videodev2.h.
> 
> I really had wondered why the controls I thought very general for camera is in
> hidden(?) the specific driver,
> not in the videodev2.h. It was just start to consider this issues.

I think you misunderstood me, I didn't mean to force anyone to use private
controls for common features. :)

> Regards,
> Heungjun Kim
> 
>> Perhaps it's uncommon in embedded systems though.

[1] http://sourceforge.net/projects/v4l2ucp/files/v4l2ucp/2.0/

-- 

Regards,
Sylwester

  reply	other threads:[~2012-01-02 21:50 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-28  6:23 [RFC PATCH 0/4] Add some new camera controls HeungJun, Kim
2011-12-28  6:23 ` [RFC PATCH 1/4] v4l: Add V4L2_CID_PRESET_WHITE_BALANCE menu control HeungJun, Kim
2011-12-28 13:35   ` Sylwester Nawrocki
2011-12-28 13:51     ` Laurent Pinchart
2011-12-29  5:08       ` HeungJun, Kim
2011-12-29 23:58         ` Laurent Pinchart
2011-12-30  5:21           ` Kim, Heungjun
2011-12-30 10:30         ` Sylwester Nawrocki
2012-01-02  4:38           ` Kim, Heungjun
2012-01-02 21:50             ` Sylwester Nawrocki [this message]
2011-12-29 23:34       ` Sakari Ailus
2011-12-30  6:35         ` HeungJun, Kim
2011-12-30  8:41           ` Hans de Goede
2011-12-30 18:42             ` 'Sakari Ailus'
2011-12-30 18:56               ` Hans de Goede
2011-12-30 21:03                 ` 'Sakari Ailus'
2011-12-30 18:17           ` 'Sakari Ailus'
2011-12-30 10:14         ` Sylwester Nawrocki
2011-12-30 20:41           ` Sakari Ailus
2012-01-01 15:38             ` Sylwester Nawrocki
2012-01-04 20:39               ` Sakari Ailus
2012-01-04 20:57                 ` Laurent Pinchart
2012-01-04 21:24                   ` Sakari Ailus
2012-01-04 22:06                     ` Sylwester Nawrocki
2012-01-11 22:36                       ` Sakari Ailus
2012-01-13 21:41                         ` Sylwester Nawrocki
2011-12-29  4:06     ` HeungJun, Kim
2012-01-02  9:53     ` Sylwester Nawrocki
2011-12-30 11:23   ` Sylwester Nawrocki
2011-12-28  6:23 ` [RFC PATCH 2/4] v4l: Add V4L2_CID_SCENEMODE " HeungJun, Kim
2011-12-28 13:56   ` Laurent Pinchart
2011-12-29  5:40     ` HeungJun, Kim
2011-12-30  0:11       ` Laurent Pinchart
2011-12-30  5:31         ` HeungJun, Kim
2011-12-28  6:23 ` [RFC PATCH 3/4] v4l: Add V4L2_CID_WDR button control HeungJun, Kim
2011-12-28 13:56   ` Laurent Pinchart
2011-12-29  5:52     ` HeungJun, Kim
2011-12-30  0:13       ` Laurent Pinchart
2011-12-30  5:41         ` HeungJun, Kim
2011-12-30 21:10   ` Sakari Ailus
2011-12-28  6:23 ` [RFC PATCH 4/4] v4l: Add V4L2_CID_ANTISHAKE " HeungJun, Kim
2011-12-28 13:58   ` Laurent Pinchart
2011-12-29  5:57     ` HeungJun, Kim
2011-12-28 14:01 ` [RFC PATCH 0/4] Add some new camera controls Laurent Pinchart
2011-12-29  6:15   ` HeungJun, Kim
2011-12-30  0:16     ` Laurent Pinchart
2011-12-30  7:52       ` HeungJun, Kim
2011-12-30 11:18   ` Sylwester Nawrocki
2012-01-04 21:07     ` Sakari Ailus
2012-01-28 17:01       ` Sylwester Nawrocki
2012-01-30 22:25         ` Sakari Ailus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F02268F.4050107@gmail.com \
    --to=snjw23@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kyungmin.park@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=riverful.kim@samsung.com \
    --cc=sakari.ailus@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).