Re: v4l2 api

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



> > > Another (and IMHO better) approach is to allow multiple
> > > applications queue up capture requests.  If a second application
> > > asks for a video frame while the driver is busy capturing the
> > > frame for the first application, it can simply put the request
> > > into a queue instead of returning -EBUSY.  This might need some
> > > more changes through (depending on the current driver design).

>  I think that it is very bad idea. You should either
>  support delivering one buffer to more than one app
>  (like current vloopback does), or you should return 
>  BUSY. Otherwise if you start second grabber application 
>  (by mistake or whatever) while one is already running, 
>  you'll start seeing missed frames for no apparent reason.

For streaming capture (i.e. STREAMON, QBUF + DQBUF loop, STREAMOFF)
a v4l2 driver must hand out frames at full frame rate.  Thus the driver
will likely return -EBUSY in this case, because it isn't allowed to give
out frames to another application[1].  For multiple applications reading
single frames now and then using read() the queuing approach will do
just fine through.

  Gerd

[1] Well, it might be possible to do that neverless, by field splitting
    for example.  streaming capture of the even fields still allows to
    hand out the odd fields to other apps ...

-- 
You can't please everybody.  And usually if you _try_ to please
everybody, the end result is one big mess.
				-- Linus Torvalds, 2002-04-20





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux