10 #ifndef __RINGBUFFER_H 11 #define __RINGBUFFER_H 36 virtual void Clear(
void) = 0;
50 #ifdef DEBUGRINGBUFFERS 52 int lastHead, lastTail;
58 static void PrintDebugRBL(
void);
81 virtual void Clear(
void);
85 int Read(
int FileHandle,
int Max = 0);
93 int Put(
const uchar *Data,
int Count);
145 virtual void Clear(
void);
157 #endif // __RINGBUFFER_H
virtual int DataReady(const uchar *Data, int Count)
By default a ring buffer has data ready as soon as there are at least 'margin' bytes available.
virtual void Clear(void)
Immediately clears the ring buffer.
virtual int Available(void)
cFrame(const uchar *Data, int Count, eFrameType=ftUnknown, int Index=-1, uint32_t Pts=0, bool independent=false)
Creates a new cFrame object.
cRingBufferFrame(int Size, bool Statistics=false)
bool Independent(void) const
cRingBufferLinear(int Size, int Margin=0, bool Statistics=false, const char *Description=NULL)
Creates a linear ring buffer.
int Put(const uchar *Data, int Count)
Puts at most Count bytes of Data into the ring buffer.
void UpdatePercentage(int Fill)
cUnbufferedFile is used for large files that are mainly written or read in a streaming manner,...
virtual void Clear(void)=0
int Read(int FileHandle, int Max=0)
Reads at most Max bytes from FileHandle and stores them in the ring buffer.
virtual int Available(void)=0
void Del(int Count)
Deletes at most Count bytes from the ring buffer.
eFrameType Type(void) const
virtual ~cRingBufferLinear()
uchar * Get(int &Count)
Gets data from the ring buffer.
void Delete(cFrame *Frame)
cRingBuffer(int Size, bool Statistics=false)
virtual ~cRingBufferFrame()
void SetTimeouts(int PutTimeout, int GetTimeout)
void ReportOverflow(int Bytes)
time_t lastOverflowReport
virtual int Available(void)