public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Trent Piepho <xyzzy@speakeasy.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	kilgota@banach.math.auburn.edu,
	Adam Baker <linux@baker-net.org.uk>,
	linux-media@vger.kernel.org,
	Jean-Francois Moine <moinejf@free.fr>,
	Olivier Lorin <o.lorin@laposte.net>
Subject: Re: Adding a control for Sensor Orientation
Date: Mon, 16 Feb 2009 15:25:18 +0100	[thread overview]
Message-ID: <4999774E.9000600@redhat.com> (raw)
In-Reply-To: <42583.62.70.2.252.1234792848.squirrel@webmail.xs4all.nl>



Hans Verkuil wrote:
>>> If you want to add two bits with
>>> mount information, feel free. But don't abuse them for pivot
>>> information.
>>> If you want that, then add another two bits for the rotation:
>>>
>>> #define V4L2_BUF_FLAG_VFLIP     0x0400
>>> #define V4L2_BUF_FLAG_HFLIP     0x0800
>>>
>>> #define V4L2_BUF_FLAG_PIVOT_0   0x0000
>>> #define V4L2_BUF_FLAG_PIVOT_90  0x1000
>>> #define V4L2_BUF_FLAG_PIVOT_180 0x2000
>>> #define V4L2_BUF_FLAG_PIVOT_270 0x3000
>>> #define V4L2_BUF_FLAG_PIVOT_MSK 0x3000
>>>
>> Ok, this seems good. But if we want to distinguish between static sensor
>> mount
>> information, and dynamic sensor orientation changing due to pivotting,
>> then I
>> think we should only put the pivot flags in the buffer flags, and the
>> static
>> flags should be in the VIDIOC_QUERYCAP capabilities flag, what do you
>> think of
>> that?
> 
> That's for driver global information. This type of information is
> input-specific (e.g. input 1 might be from an S-Video input and does not
> require v/hflip, and input 2 is from a sensor and does require v/hflip).
> So struct v4l2_input seems a good place for it.
> 
> Looking at v4l2_input there is a status field, but the status information
> is valid for the current input only. We can:
> 
> 1) add flags here and only set the mounting information for the current
> input,
> 
> 2) add flags here and document that these flags are valid for any input,
> not just the current, or:
> 
> 3) take one of the reserved fields and turn that into a 'flags' field that
> can be used for static info about the input.
> 
> To be honest, I prefer 3.
> 
> The same can be done for v4l2_output should it become necessary in the
> future.
> 
> Actually, pivot information could be stored here as well. Doing that makes
> it possible to obtain the orientation without needing to start a capture,
> and makes it possible to be used (although awkwardly) with the read()
> interface.
> 
> You still want to report this information in v4l2_buffer as well since it
> can change on the fly.
> 

Sounds good to me.

Regards,

Hans


  reply	other threads:[~2009-02-16 14:27 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-16 14:00 Adding a control for Sensor Orientation Hans Verkuil
2009-02-16 14:25 ` Hans de Goede [this message]
2009-02-16 16:09 ` Trent Piepho
  -- strict thread matches above, loose matches on Subject: below --
2009-02-16 12:02 Hans Verkuil
2009-02-16 11:01 Hans Verkuil
2009-02-16 11:12 ` Jean-Francois Moine
2009-02-16 12:07 ` Hans de Goede
2009-02-16  9:07 Hans Verkuil
2009-02-16  9:44 ` Hans de Goede
2009-02-16 11:11   ` Mauro Carvalho Chehab
2009-02-16 12:19     ` Hans de Goede
2009-02-16 14:20       ` Mauro Carvalho Chehab
2009-02-16 15:00       ` Mauro Carvalho Chehab
2009-02-16 15:24         ` Hans de Goede
2009-02-16  8:57 Hans Verkuil
2009-02-16  8:33 Hans Verkuil
2009-02-16 22:36 ` Adam Baker
2009-02-17  2:00   ` kilgota
2009-02-17  7:27     ` Hans Verkuil
2009-02-17 22:29       ` Adam Baker
2009-02-14 20:48 Adam Baker
2009-02-14 21:04 ` Hans Verkuil
2009-02-14 21:55 ` Hans de Goede
2009-02-14 21:59   ` Hans Verkuil
2009-02-14 22:44     ` kilgota
2009-02-15  9:08       ` Hans de Goede
2009-02-15  9:19         ` Hans Verkuil
2009-02-15  9:29           ` Hans de Goede
2009-02-15 13:03             ` Trent Piepho
2009-02-15 13:46               ` Hans de Goede
2009-02-15 23:09                 ` Trent Piepho
2009-02-16  1:46                   ` kilgota
2009-02-16  3:47                     ` hermann pitton
2009-02-16  3:55                     ` Trent Piepho
2009-02-16  8:30                     ` Hans de Goede
2009-02-16  2:26             ` Mauro Carvalho Chehab
2009-02-16  4:04               ` Trent Piepho
2009-02-16  7:44                 ` Hans Verkuil
2009-02-16  8:37                   ` Hans de Goede

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=4999774E.9000600@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kilgota@banach.math.auburn.edu \
    --cc=linux-media@vger.kernel.org \
    --cc=linux@baker-net.org.uk \
    --cc=mchehab@infradead.org \
    --cc=moinejf@free.fr \
    --cc=o.lorin@laposte.net \
    --cc=xyzzy@speakeasy.org \
    /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