From 3bd9a7ccf355e445685ff115464a4e684a8c4211 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 18 May 2003 18:00:00 +0200 Subject: =?UTF-8?q?Version=201.1.32=20-=20Removed=20a=20faulty=20parameter?= =?UTF-8?q?=20initialization=20in=20menu.c=20(thanks=20to=20Lauri=20Tischl?= =?UTF-8?q?er=20for=20=20=20reporting=20this=20one).=20-=20Re-implemented?= =?UTF-8?q?=20the=20WaitForPut/WaitForGet=20stuff=20in=20cRingBuffer,=20si?= =?UTF-8?q?nce=20some=20plugins=20=20=20actually=20need=20this.=20By=20def?= =?UTF-8?q?ault=20the=20buffer=20does=20not=20wait;=20if=20a=20plugin=20ne?= =?UTF-8?q?eds=20the=20=20=20waiting=20functionality=20it=20can=20call=20t?= =?UTF-8?q?he=20new=20SetTimeouts()=20function.=20-=20Moved=20the=20call?= =?UTF-8?q?=20to=20cPlugin::Start()=20further=20up=20in=20vdr.c,=20to=20ma?= =?UTF-8?q?ke=20sure=20it=20gets=20=20=20called=20before=20trying=20to=20l?= =?UTF-8?q?earn=20the=20keys=20(problem=20reported=20by=20Oliver=20Endriss?= =?UTF-8?q?).=20-=20No=20longer=20starting=20the=20editing=20process=20if?= =?UTF-8?q?=20no=20marks=20have=20been=20set=20(thanks=20to=20=20=20Matthi?= =?UTF-8?q?as=20Raus=20for=20reporting=20this=20one).=20-=20Added=20Catala?= =?UTF-8?q?nian=20language=20texts=20(thanks=20to=20Marc=20Rovira=20Vall?= =?UTF-8?q?=20and=20Ramon=20Roca).=20=20=20Plugin=20authors=20may=20want?= =?UTF-8?q?=20to=20add=20the=20new=20entries=20to=20their=20I18N=20texts?= =?UTF-8?q?=20and=20contact=20=20=20the=20translators=20to=20have=20their?= =?UTF-8?q?=20texts=20translated.=20Note=20that=20there=20are=20now=2016?= =?UTF-8?q?=20=20=20different=20OSD=20languages,=20so=20please=20make=20su?= =?UTF-8?q?re=20you=20have=2016=20versions=20for=20each=20of=20=20=20your?= =?UTF-8?q?=20texts.=20-=20Moved=20the=20detection=20of=20a=20broken=20vid?= =?UTF-8?q?eo=20data=20stream=20from=20the=20cDevice=20into=20the=20=20=20?= =?UTF-8?q?cRecorder=20to=20avoid=20problems=20with=20cReceivers=20that=20?= =?UTF-8?q?want=20to=20receive=20from=20PIDs=20=20=20that=20are=20currentl?= =?UTF-8?q?y=20not=20transmitting=20(thanks=20to=20Marcel=20Wiesweg=20for?= =?UTF-8?q?=20reporting=20=20=20this=20one).=20-=20Fixed=20setting=20the?= =?UTF-8?q?=20locking=20pid=20after=20a=20timed=20wait=20(thanks=20to=20An?= =?UTF-8?q?dreas=20Schultz).=20-=20Avoiding=20spurious=20section=20filter?= =?UTF-8?q?=20settings=20after=20a=20channel=20switch.=20-=20Updated=20'ch?= =?UTF-8?q?annels.conf.cable'=20(thanks=20to=20Stefan=20Hu=C3=9Ffeldt).=20?= =?UTF-8?q?-=20Fixed=20reading=20'epg.data'=20for=20channels=20with=20non-?= =?UTF-8?q?zero=20RID=20(thanks=20to=20Oliver=20=20=20Endriss=20for=20repo?= =?UTF-8?q?rting=20this=20one).=20-=20Fixed=20EPG=20bugfix=20statistics=20?= =?UTF-8?q?to=20avoid=20log=20entires=20for=20undefined=20channels=20(than?= =?UTF-8?q?ks=20=20=20to=20Lars=20Bl=C3=A4ser=20for=20reporting=20this=20o?= =?UTF-8?q?ne).=20-=20No=20longer=20waiting=20inside=20cIndexFile::CatchUp?= =?UTF-8?q?()=20to=20avoid=20shortly=20blocking=20replay=20=20=20at=20the?= =?UTF-8?q?=20end=20of=20a=20recording.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ringbuffer.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'ringbuffer.h') diff --git a/ringbuffer.h b/ringbuffer.h index 6b25662..1506345 100644 --- a/ringbuffer.h +++ b/ringbuffer.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: ringbuffer.h 1.11 2003/05/11 09:48:23 kls Exp $ + * $Id: ringbuffer.h 1.12 2003/05/12 17:35:10 kls Exp $ */ #ifndef __RINGBUFFER_H @@ -16,11 +16,19 @@ class cRingBuffer { private: cMutex mutex; + cCondVar readyForPut, readyForGet; + cMutex putMutex, getMutex; + int putTimeout; + int getTimeout; int size; protected: int maxFill;//XXX int lastPercent; bool statistics;//XXX + void WaitForPut(void); + void WaitForGet(void); + void EnablePut(void); + void EnableGet(void); virtual void Clear(void) = 0; virtual int Available(void) = 0; int Free(void) { return size - Available() - 1; } @@ -30,6 +38,7 @@ protected: public: cRingBuffer(int Size, bool Statistics = false); virtual ~cRingBuffer(); + void SetTimeouts(int PutTimeout, int GetTimeout); }; class cRingBufferLinear : public cRingBuffer { -- cgit v1.2.3