From: Sylwester Nawrocki <snjw23@gmail.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
Sakari Ailus <sakari.ailus@iki.fi>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Kim HeungJun <riverful@gmail.com>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
Stanimir Varbanov <svarbanov@mm-sol.com>
Subject: Re: [RFC] snapshot mode, flash capabilities and control
Date: Sat, 26 Feb 2011 14:39:54 +0100 [thread overview]
Message-ID: <4D6902AA.6060805@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1102261350001.31455@axis700.grange>
On 02/26/2011 02:03 PM, Guennadi Liakhovetski wrote:
> On Sat, 26 Feb 2011, Hans Verkuil wrote:
>
>> On Friday, February 25, 2011 18:08:07 Guennadi Liakhovetski wrote:
>>
>> <snip>
>>
>>>>> configure the sensor to react on an external trigger provided by the flash
>>>>> controller is needed, and that could be a control on the flash sub-device.
>>>>> What we would probably miss is a way to issue a STREAMON with a number of
>>>>> frames to capture. A new ioctl is probably needed there. Maybe that would be
>>>>> an opportunity to create a new stream-control ioctl that could replace
>>>>> STREAMON and STREAMOFF in the long term (we could extend the subdev s_stream
>>>>> operation, and easily map STREAMON and STREAMOFF to the new ioctl in
>>>>> video_ioctl2 internally).
>>>>
>>>> How would this be different from queueing n frames (in total; count
>>>> dequeueing, too) and issuing streamon? --- Except that when the last frame
>>>> is processed the pipeline could be stopped already before issuing STREAMOFF.
>>>> That does indeed have some benefits. Something else?
>>>
>>> Well, you usually see in your host driver, that the videobuffer queue is
>>> empty (no more free buffers are available), so, you stop streaming
>>> immediately too.
>>
>> This probably assumes that the host driver knows that this is a special queue?
>> Because in general drivers will simply keep capturing in the last buffer and not
>> release it to userspace until a new buffer is queued.
>
> Yes, I know about this spec requirement, but I also know, that not all
> drivers do that and not everyone is happy about that requirement:)
Right, similarly a v4l2 output device is not releasing the last buffer
to userland and keeps sending its content until a new buffer is queued to the driver.
But in case of capture device the requirement is a pain, since it only causes
draining the power source, when from a user view the video capture is stopped.
Also it limits a minimum number of buffers that could be used in preview pipeline.
In still capture mode (single shot) we might want to use only one buffer so adhering
to the requirement would not allow this, would it?
>
>> That said, it wouldn't be hard to add some flag somewhere that puts a queue in
>> a 'stop streaming on last buffer capture' mode.
>
> No, it wouldn't... But TBH this doesn't seem like the most elegant and
> complete solution. Maybe we have to think a bit more about it - which
> soncequences switching into the snapshot mode has on the host driver,
> apart from stopping after N frames. So, this is one of the possibilities,
> not sure if the best one.
>
> Thanks
> Guennadi
> ---
> Guennadi Liakhovetski, Ph.D.
> Freelance Open-Source Software Developer
> http://www.open-technology.de/
next prev parent reply other threads:[~2011-02-26 13:39 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-24 12:18 [RFC] snapshot mode, flash capabilities and control Guennadi Liakhovetski
2011-02-24 12:40 ` Hans Verkuil
2011-02-24 16:07 ` Guennadi Liakhovetski
2011-02-24 17:57 ` Kim HeungJun
2011-02-25 10:05 ` Laurent Pinchart
2011-02-25 13:53 ` Sakari Ailus
2011-02-25 17:08 ` Guennadi Liakhovetski
2011-02-25 18:55 ` Sakari Ailus
2011-02-25 20:56 ` Guennadi Liakhovetski
2011-02-28 11:57 ` Guennadi Liakhovetski
2011-03-06 9:53 ` Sakari Ailus
2011-02-26 12:31 ` Hans Verkuil
2011-02-26 13:03 ` Guennadi Liakhovetski
2011-02-26 13:39 ` Sylwester Nawrocki [this message]
2011-02-26 13:56 ` Hans Verkuil
2011-02-26 15:42 ` Sylwester Nawrocki
2011-02-28 10:28 ` Laurent Pinchart
2011-02-28 10:40 ` Hans Verkuil
2011-02-28 10:47 ` Laurent Pinchart
2011-02-28 11:02 ` Guennadi Liakhovetski
2011-02-28 11:07 ` Laurent Pinchart
2011-02-28 11:17 ` Hans Verkuil
2011-02-28 11:19 ` Laurent Pinchart
2011-02-28 11:54 ` Guennadi Liakhovetski
2011-02-28 22:41 ` Guennadi Liakhovetski
2011-03-02 17:51 ` Guennadi Liakhovetski
2011-03-02 18:19 ` Hans Verkuil
2011-03-03 1:05 ` Andy Walls
2011-03-03 11:50 ` Laurent Pinchart
2011-03-03 13:56 ` Andy Walls
2011-03-03 14:04 ` Laurent Pinchart
2011-03-03 14:55 ` Andy Walls
2011-03-03 14:29 ` Sakari Ailus
2011-03-03 8:02 ` Guennadi Liakhovetski
2011-03-03 9:25 ` Hans Verkuil
2011-02-28 13:33 ` Andy Walls
2011-02-28 13:37 ` Andy Walls
2011-02-28 11:37 ` Guennadi Liakhovetski
2011-02-28 12:03 ` Sakari Ailus
2011-02-28 12:44 ` Guennadi Liakhovetski
2011-02-28 15:07 ` Sakari Ailus
2011-02-28 10:24 ` Laurent Pinchart
2011-02-25 16:58 ` Guennadi Liakhovetski
2011-02-25 18:49 ` Sakari Ailus
2011-02-25 20:33 ` Guennadi Liakhovetski
2011-02-27 21:00 ` Sakari Ailus
2011-02-28 11:20 ` Guennadi Liakhovetski
2011-02-28 13:44 ` Sakari Ailus
2011-03-03 7:09 ` Kim, HeungJun
2011-03-03 7:30 ` Guennadi Liakhovetski
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=4D6902AA.6060805@gmail.com \
--to=snjw23@gmail.com \
--cc=g.liakhovetski@gmx.de \
--cc=hverkuil@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=riverful@gmail.com \
--cc=sakari.ailus@iki.fi \
--cc=svarbanov@mm-sol.com \
/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