summaryrefslogtreecommitdiff
path: root/ringbuffer.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2007-11-17 13:59:08 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2007-11-17 13:59:08 +0100
commite47d73715b48e182cefbc4f4a728f70873840703 (patch)
tree8abc7a2dbc76f295297a87cd8af5fb75f1e667bc /ringbuffer.h
parentb88420b23b8d975dad8ddce3b9d6f50ad8996cff (diff)
downloadvdr-e47d73715b48e182cefbc4f4a728f70873840703.tar.gz
vdr-e47d73715b48e182cefbc4f4a728f70873840703.tar.bz2
Fixed handling small PES packets that caused subtitles to be displayed late in live mode
Diffstat (limited to 'ringbuffer.h')
-rw-r--r--ringbuffer.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/ringbuffer.h b/ringbuffer.h
index dba0e619..f6664cf8 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.17 2005/12/10 10:54:51 kls Exp $
+ * $Id: ringbuffer.h 1.18 2007/11/17 13:49:34 kls Exp $
*/
#ifndef __RINGBUFFER_H
@@ -60,6 +60,13 @@ private:
int gotten;
uchar *buffer;
char *description;
+protected:
+ 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. A derived class can reimplement this function
+ ///< if it has other conditions that define when data is ready.
+ ///< The return value is either 0 if there is not yet enough data available,
+ ///< or the number of bytes from the beginning of Data that are "ready".
public:
cRingBufferLinear(int Size, int Margin = 0, bool Statistics = false, const char *Description = NULL);
///< Creates a linear ring buffer.