Mailing List archive

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

[vdr] Re: Buffer Overflow because of cReceiver-Threads lockingeach other



Rene Bartsch wrote:
> 
> Klaus Schmidinger schrieb:
> > Rene Bartsch wrote:
> >
> >
> > A cReceiver is supposed to accept the data offered in a call to its
> > Receive() function _immediately_, and return without any unnecessary
> > delay. It's the duty of the derived cReceiver class to implement any
> > kind of buffering it might need.
> 
> Didn't you say that you don't want plugins to have access to critical
> areas of VDR? I think this is a very critical area if a plugin can break
> the stream and maybe make recordings corrupt (I'll check the influence
> on recordings this weekend). So VDR should provide a solution. This
> might simply be a cReceiver-template with a MPEG-fixing buffer, which
> can be used by the plugin-developers for implementing their plugin.

The cDevice gets the TS from the driver and buffers it. It distributes each
TS packet to all attached cReceivers by calling their Receive() function.
Neither cDevice nor the abstract cReceiver base class can know what the
derived cReceiver intends to do with these packets. Therefore the semantics
of the Receive() function require it to return immediately. I don't see
any way the core VDR could reasonably do any additional buffering here.

What _could_ be done is that every cReceiver gets a timing function, and
as soon as one of them doesn't return from Receive() within some 100ms or
so, it simply gets detached from the cDevice. But that wouldn't help too
much, either, because in the end the plugin would simply have to make sure
its derived cReceiver plays by the rules...

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