diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2001-06-02 10:47:40 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2001-06-02 10:47:40 +0200 |
commit | c40e4eb96e43963845d1de1678a317b27e77f04e (patch) | |
tree | fc61866ba83db4bb0611cb45f1bd951eeeb56bd7 /ringbuffer.h | |
parent | 1ef2b1d3a149348539565902825bb168a52673a1 (diff) | |
download | vdr-c40e4eb96e43963845d1de1678a317b27e77f04e.tar.gz vdr-c40e4eb96e43963845d1de1678a317b27e77f04e.tar.bz2 |
Converted to the new API plus several small enhancements0.8.0
Diffstat (limited to 'ringbuffer.h')
-rw-r--r-- | ringbuffer.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ringbuffer.h b/ringbuffer.h index 605f553f..49be769c 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.1 2001/03/18 16:47:00 kls Exp $ + * $Id: ringbuffer.h 1.2 2001/05/20 11:56:44 kls Exp $ */ #ifndef __RINGBUFFER_H @@ -28,7 +28,11 @@ private: uchar *buffer; int maxFill; bool busy; + bool statistics; protected: + void Lock(void) { mutex.Lock(); } + void Unlock(void) { mutex.Unlock(); } + int Available(void); bool Busy(void) { return busy; } void Clear(void); // Immediately clears the ring buffer. @@ -45,7 +49,7 @@ protected: // Runs as a separate thread and shall continuously call Get() to // retrieve data from the ring buffer and write it to a destination. public: - cRingBuffer(int Size); + cRingBuffer(int Size, bool Statistics = false); virtual ~cRingBuffer(); bool Start(void); bool Active(void); |