Re: [Query] VIDIOC_QBUF and VIDIOC_STREAMON order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



VIDIOC_STREAMON expects buffers to be queued before hardware part of
image/video pipe is enabled. From my experience of V4L2 user space, I
have always QBUFfed before invoking the STREAMON. Below is the API
specification which also speaks something same:

http://linuxtv.org/downloads/v4l-dvb-apis/vidioc-streamon.html

I think its better to return EINVAL if there are no queued buffers
when VIDIOC_STREAMON is invoked.

Regards,
Subash

On Mon, Mar 14, 2011 at 3:44 PM, Sylwester Nawrocki
<s.nawrocki@xxxxxxxxxxx> wrote:
> Hello,
>
> As far as I know V4L2 applications are allowed to call VIDIOC_STREAMON before
> queuing buffers with VIDIOC_QBUF.
>
> This leads to situation that a H/W is attempted to be enabled by the driver
> when it has no any buffer ownership.
>
> Effectively actual activation of the data pipeline has to be deferred
> until first buffer arrived in the driver. Which makes it difficult
> to signal any errors to user during enabling the data pipeline.
>
> Is this allowed to force applications to queue some buffers before calling
> STREAMON, by returning an error in vidioc_streamon from the driver, when
> no buffers have been queued at this time?
>
> I suppose this could render some applications to stop working if this kind
> of restriction is applied e.g. in camera capture driver.
>
> What the applications really expect?
>
> With the above I refer mostly to a snapshot mode where we have to be careful
> not to lose any frame, as there could be only one..
>
>
> Please share you opinions.
>
>
> Regards,
> --
> Sylwester Nawrocki
> Samsung Poland R&D Center
> --
> 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
>
--
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


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux