[vdr] vdr-xine: what's wrong with this piece of code -- threading
rnissl at gmx.de
Fri Mar 25 11:00:35 CET 2005
Stefan Taferner wrote:
>>>If you want to wait for data (and keep the non-blocking) you should wait
>>>some time (200ms or so). If you are not sure about the cPoller, use the
>>>select function with a timeout. Then you get exact error codes and all
>>All I'd like to do is to block until the requested data is ready and "r
>>== 0" should just indicate that the FIFO was closed by xine.
>>But for any reason, "r == 0" happens still without the FIFO beeing
>>closed. Can someone tell me, how to handle this situation properly?
> The read manpage says: On success, the number of bytes read is
> returned (zero indicates end of file). But you probably already know that.
> Here is my version of xread, taken from vdr-xine-0.7.2 with modifications.
> But it is an untested version of code I wrote at work (still have no vdr at
Sorry, makes no difference.
But I think, that maybe the problem has to do with still images, which
are sent while moving cut marks, as it only happens when moving cut marks.
Some days ago I've already discovered that VDR doesn't call StillImage()
with a single I-frame. It may contain some remainder of the previous
B-frame and may be too short, as the remainder of the I-frame is in the
PES packet which contains the start of the next B-frame.
At the moment, it looks like xine disconnects for some reason (maybe it
sees an end of stream in the garbage). I'll have to make sure first,
that only correct data is sent to xine. And then it may simply be enough
to disconnect in the case "r == 0".
Thank you very much for your help!
Dipl.-Inform. (FH) Reinhard Nissl
mailto:rnissl at gmx.de
More information about the vdr