Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: WaitForPut/WaitForGet (was VDR developer version 1.1.31)
Stefan Huelswitt wrote:
>
> On 11 May 2003 Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de> wrote:
>
> Hi,
>
> > - Removed the WaitForPut/WaitForGet stuff from cRingBuffer, since it appears to
> > no longer be necessary due to the implementation of cNonBlockingFileReader in
> > dvbplayer.c. Also, the long timeout in WaitForPut caused problems with cReceivers
> > that use a ring buffer and didn't immediately return from their Receive() function
> > if the buffer runs full (thanks to Sascha Volkenandt for reporting this one).
>
> With these functions removed, how I'm supposed to wait in a
> non-busy way for data arrival or free buffer space?
>
> I cannot understand why these have been removed (specialy if we
> are close to a release). This makes the ringbuffer pretty useless
> for most uses and breaks not only my plugins.
There was a problem with cReceivers that used cRingBuffer* to buffer
the data they got in their Receive() function. The Receive() function
is supposed to return _immediately_, but when the ring buffer was full
it waited _inside_ the Put() function for up to a full second - which
broke the data stream for all cReceivers attached to that device.
Therefore I tested what would happen if the WaitForPut/WaitForGet mechanism was
removed and didn't see any difference in recording, replaying or transfer mode.
I wasn't aware that any plugin would explicitly call any of these functions.
So, if any plugin is using such a buffer in a cReceiver it would risk breaking
the data stream if the buffer runs full. And if it uses the buffer in a different
context I wonder why the waiting should be done in the buffer and not where
the actual reading or writing is done. Maybe take a look at how VDR does this
in cDvbPlayer::Action().
Of course I could put these things back into cRingBuffer, but VDR itself
wouldn't be using them any more, and any plugin that implements a cReceiver
also shouldn't do so. If there are other applications that _really_ need
WaitForPut/WaitForGet please let me know.
Klaus
--
_______________________________________________________________
Klaus Schmidinger Phone: +49-8635-6989-10
CadSoft Computer GmbH Fax: +49-8635-6989-40
Hofmark 2 Email: kls@cadsoft.de
D-84568 Pleiskirchen, Germany URL: www.cadsoft.de
_______________________________________________________________
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index