On Thu, 2008-01-31 at 13:40 -0500, Daniel Kristjansson wrote:
> On Thu, 2008-01-31 at 08:20 +0100, Hans Verkuil wrote:

> > The easiest way to solve it is to check whether S_INPUT returns EBUSY 
> > and in that case pause the encoder (VIDIOC_ENCODER_CMD), call S_INPUT 
> > again and restart it with ENCODER_CMD.
> 
> Hmm, that may allow for a more elegant hack in MythTV than a
> close/open requirement. I'm installing 2.6.24 now so I can test
> the hack I've attached here: http://svn.mythtv.org/trac/ticket/4466
> We already have a similar hack for the ConvertX drivers which
> require streaming to be stopped during input switches... The
> hack checks if we're using the "ivtv" drivers and if so does a
> VIDIOC_ENCODER_CMD PAUSE and RESUME around the input switching code.

Hans, that doesn't seem to work. I even tried sending a PAUSE to all
three open file descriptors for the ivtv device and it still returned
EBUSY.

I'm looking at ivtv-ioctl.c now to see how I might go about fixing
this there. It looks like itv->capturing is the only thing it is
checking on. Could it be that the VIDIOC_ENCODER_CMD PAUSE command
is not acting atomically but returning success because one of the
file descriptors is opened with O_NONBLOCK ?

-- Daniel



_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel

Reply via email to