mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Version 1.5.12
- Fixed assembling PS1 packets in cTS2PES::instant_repack() (thanks to Reinhard Nissl). - Updated the Russian OSD texts (thanks to Oleg Roitburd). - Fixed handling small PES packets that caused subtitles to be displayed late in live mode (based on a patch from Reinhard Nissl). - Fixed stopping live subtitles when a player is attached to the device. - Fixed suddenly stopping subtitles in live mode.
This commit is contained in:
parent
182cd78af0
commit
29b2d48bb5
@ -1149,6 +1149,9 @@ Reinhard Nissl <rnissl@gmx.de>
|
|||||||
for adding a debug error message to cReceiver::~cReceiver() in case it is still
|
for adding a debug error message to cReceiver::~cReceiver() in case it is still
|
||||||
attached to a device
|
attached to a device
|
||||||
for reporting a missing SetVolumeDevice() call in cDevice::SetPrimaryDevice()
|
for reporting a missing SetVolumeDevice() call in cDevice::SetPrimaryDevice()
|
||||||
|
for fixing assembling PS1 packets in cTS2PES::instant_repack()
|
||||||
|
for a patch that was used to fix handling small PES packets that caused subtitles
|
||||||
|
to be displayed late in live mode
|
||||||
|
|
||||||
Richard Robson <richard_robson@beeb.net>
|
Richard Robson <richard_robson@beeb.net>
|
||||||
for reporting freezing replay if a timer starts while in Transfer Mode from the
|
for reporting freezing replay if a timer starts while in Transfer Mode from the
|
||||||
|
10
HISTORY
10
HISTORY
@ -5518,3 +5518,13 @@ Video Disk Recorder Revision History
|
|||||||
Kirchgatterer).
|
Kirchgatterer).
|
||||||
- Fixed decoding filename characters in case there are not two hex digits after
|
- Fixed decoding filename characters in case there are not two hex digits after
|
||||||
the '#' (reported by Helmut Auer).
|
the '#' (reported by Helmut Auer).
|
||||||
|
|
||||||
|
2007-11-18: Version 1.5.12
|
||||||
|
|
||||||
|
- Fixed assembling PS1 packets in cTS2PES::instant_repack() (thanks to Reinhard
|
||||||
|
Nissl).
|
||||||
|
- Updated the Russian OSD texts (thanks to Oleg Roitburd).
|
||||||
|
- Fixed handling small PES packets that caused subtitles to be displayed late
|
||||||
|
in live mode (based on a patch from Reinhard Nissl).
|
||||||
|
- Fixed stopping live subtitles when a player is attached to the device.
|
||||||
|
- Fixed suddenly stopping subtitles in live mode.
|
||||||
|
10
config.h
10
config.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: config.h 1.300 2007/10/17 18:34:17 kls Exp $
|
* $Id: config.h 1.301 2007/11/10 13:38:19 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __CONFIG_H
|
#ifndef __CONFIG_H
|
||||||
@ -22,13 +22,13 @@
|
|||||||
|
|
||||||
// VDR's own version number:
|
// VDR's own version number:
|
||||||
|
|
||||||
#define VDRVERSION "1.5.11"
|
#define VDRVERSION "1.5.12"
|
||||||
#define VDRVERSNUM 10511 // Version * 10000 + Major * 100 + Minor
|
#define VDRVERSNUM 10512 // Version * 10000 + Major * 100 + Minor
|
||||||
|
|
||||||
// The plugin API's version number:
|
// The plugin API's version number:
|
||||||
|
|
||||||
#define APIVERSION "1.5.11"
|
#define APIVERSION "1.5.12"
|
||||||
#define APIVERSNUM 10511 // Version * 10000 + Major * 100 + Minor
|
#define APIVERSNUM 10512 // Version * 10000 + Major * 100 + Minor
|
||||||
|
|
||||||
// When loading plugins, VDR searches them by their APIVERSION, which
|
// When loading plugins, VDR searches them by their APIVERSION, which
|
||||||
// may be smaller than VDRVERSION in case there have been no changes to
|
// may be smaller than VDRVERSION in case there have been no changes to
|
||||||
|
4
device.c
4
device.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: device.c 1.147 2007/11/03 13:30:09 kls Exp $
|
* $Id: device.c 1.148 2007/11/17 15:39:28 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
@ -1148,6 +1148,8 @@ bool cDevice::AttachPlayer(cPlayer *Player)
|
|||||||
if (CanReplay()) {
|
if (CanReplay()) {
|
||||||
if (player)
|
if (player)
|
||||||
Detach(player);
|
Detach(player);
|
||||||
|
DELETENULL(liveSubtitle);
|
||||||
|
DELETENULL(dvbSubtitleConverter);
|
||||||
pesAssembler->Reset();
|
pesAssembler->Reset();
|
||||||
player = Player;
|
player = Player;
|
||||||
if (!Transferring())
|
if (!Transferring())
|
||||||
|
47
po/ru_RU.po
47
po/ru_RU.po
@ -2,14 +2,15 @@
|
|||||||
# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
|
# Copyright (C) 2007 Klaus Schmidinger <kls@cadsoft.de>
|
||||||
# This file is distributed under the same license as the VDR package.
|
# This file is distributed under the same license as the VDR package.
|
||||||
# Vyacheslav Dikonov <sdiconov@mail.ru>, 2004
|
# Vyacheslav Dikonov <sdiconov@mail.ru>, 2004
|
||||||
|
# Oleg Roitburd <oleg@roitburd.de>, 2007
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: VDR 1.5.7\n"
|
"Project-Id-Version: VDR 1.5.7\n"
|
||||||
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
|
"Report-Msgid-Bugs-To: <vdr-bugs@cadsoft.de>\n"
|
||||||
"POT-Creation-Date: 2007-10-13 11:29+0200\n"
|
"POT-Creation-Date: 2007-10-13 11:29+0200\n"
|
||||||
"PO-Revision-Date: 2007-08-12 14:17+0200\n"
|
"PO-Revision-Date: 2007-11-05 14:24+0100\n"
|
||||||
"Last-Translator: Vyacheslav Dikonov <sdiconov@mail.ru>\n"
|
"Last-Translator: Oleg Roitburd <oleg@roitburd.de>\n"
|
||||||
"Language-Team: <vdr@linuxtv.org>\n"
|
"Language-Team: <vdr@linuxtv.org>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=ISO-8859-5\n"
|
"Content-Type: text/plain; charset=ISO-8859-5\n"
|
||||||
@ -166,7 +167,7 @@ msgid "Key$Audio"
|
|||||||
msgstr "Ï×ëÚ"
|
msgstr "Ï×ëÚ"
|
||||||
|
|
||||||
msgid "Key$Subtitles"
|
msgid "Key$Subtitles"
|
||||||
msgstr ""
|
msgstr "Субтитры"
|
||||||
|
|
||||||
msgid "Key$Schedule"
|
msgid "Key$Schedule"
|
||||||
msgstr "ÂÕÛÕÓØÔ"
|
msgstr "ÂÕÛÕÓØÔ"
|
||||||
@ -187,31 +188,31 @@ msgid "Key$Commands"
|
|||||||
msgstr "ºÞÜÐÝÔë"
|
msgstr "ºÞÜÐÝÔë"
|
||||||
|
|
||||||
msgid "Key$User1"
|
msgid "Key$User1"
|
||||||
msgstr ""
|
msgstr "Пользователь1"
|
||||||
|
|
||||||
msgid "Key$User2"
|
msgid "Key$User2"
|
||||||
msgstr ""
|
msgstr "Пользователь2"
|
||||||
|
|
||||||
msgid "Key$User3"
|
msgid "Key$User3"
|
||||||
msgstr ""
|
msgstr "Пользователь3"
|
||||||
|
|
||||||
msgid "Key$User4"
|
msgid "Key$User4"
|
||||||
msgstr ""
|
msgstr "Пользователь4"
|
||||||
|
|
||||||
msgid "Key$User5"
|
msgid "Key$User5"
|
||||||
msgstr ""
|
msgstr "Пользователь5"
|
||||||
|
|
||||||
msgid "Key$User6"
|
msgid "Key$User6"
|
||||||
msgstr ""
|
msgstr "Пользователь6"
|
||||||
|
|
||||||
msgid "Key$User7"
|
msgid "Key$User7"
|
||||||
msgstr ""
|
msgstr "Пользователь7"
|
||||||
|
|
||||||
msgid "Key$User8"
|
msgid "Key$User8"
|
||||||
msgstr ""
|
msgstr "Пользователь8"
|
||||||
|
|
||||||
msgid "Key$User9"
|
msgid "Key$User9"
|
||||||
msgstr ""
|
msgstr "Пользователь9"
|
||||||
|
|
||||||
msgid "Free To Air"
|
msgid "Free To Air"
|
||||||
msgstr "FTA (ÝÕ×ÐÚÞÔØàÞÒÐÝÞ)"
|
msgstr "FTA (ÝÕ×ÐÚÞÔØàÞÒÐÝÞ)"
|
||||||
@ -253,10 +254,10 @@ msgid "Dpid2"
|
|||||||
msgstr "Dpid2 (AC3 2)"
|
msgstr "Dpid2 (AC3 2)"
|
||||||
|
|
||||||
msgid "Spid1"
|
msgid "Spid1"
|
||||||
msgstr ""
|
msgstr "Субтитры ПИД1"
|
||||||
|
|
||||||
msgid "Spid2"
|
msgid "Spid2"
|
||||||
msgstr ""
|
msgstr "Субтитры ПИД2"
|
||||||
|
|
||||||
msgid "Tpid"
|
msgid "Tpid"
|
||||||
msgstr "Tpid (âÕÛÕâÕÚáâ)"
|
msgstr "Tpid (âÕÛÕâÕÚáâ)"
|
||||||
@ -627,22 +628,22 @@ msgid "Setup.DVB$Audio language"
|
|||||||
msgstr "²ëÑàÐÝ"
|
msgstr "²ëÑàÐÝ"
|
||||||
|
|
||||||
msgid "Setup.DVB$Display subtitles"
|
msgid "Setup.DVB$Display subtitles"
|
||||||
msgstr ""
|
msgstr "Показывать субтитры"
|
||||||
|
|
||||||
msgid "Setup.DVB$Subtitle languages"
|
msgid "Setup.DVB$Subtitle languages"
|
||||||
msgstr ""
|
msgstr "Языки субтитров"
|
||||||
|
|
||||||
msgid "Setup.DVB$Subtitle language"
|
msgid "Setup.DVB$Subtitle language"
|
||||||
msgstr ""
|
msgstr "Язык субтитров"
|
||||||
|
|
||||||
msgid "Setup.DVB$Subtitle offset"
|
msgid "Setup.DVB$Subtitle offset"
|
||||||
msgstr ""
|
msgstr "Сдвиг субтитров"
|
||||||
|
|
||||||
msgid "Setup.DVB$Subtitle foreground transparency"
|
msgid "Setup.DVB$Subtitle foreground transparency"
|
||||||
msgstr ""
|
msgstr "Прозрачность переднего плана субтитров"
|
||||||
|
|
||||||
msgid "Setup.DVB$Subtitle background transparency"
|
msgid "Setup.DVB$Subtitle background transparency"
|
||||||
msgstr ""
|
msgstr "Прозрачность фона субтитров"
|
||||||
|
|
||||||
msgid "LNB"
|
msgid "LNB"
|
||||||
msgstr "ºÞÝÒÕàâÕà"
|
msgstr "ºÞÝÒÕàâÕà"
|
||||||
@ -837,13 +838,13 @@ msgid "No audio available!"
|
|||||||
msgstr "¾âáãâáâÒãÕâ ×ÒãÚ!"
|
msgstr "¾âáãâáâÒãÕâ ×ÒãÚ!"
|
||||||
|
|
||||||
msgid "No subtitles"
|
msgid "No subtitles"
|
||||||
msgstr ""
|
msgstr "Нет субтитров"
|
||||||
|
|
||||||
msgid "Button$Subtitles"
|
msgid "Button$Subtitles"
|
||||||
msgstr ""
|
msgstr "Субтитры"
|
||||||
|
|
||||||
msgid "No subtitles available!"
|
msgid "No subtitles available!"
|
||||||
msgstr ""
|
msgstr "Субтитры недоступны!"
|
||||||
|
|
||||||
msgid "Not enough disk space to start recording!"
|
msgid "Not enough disk space to start recording!"
|
||||||
msgstr "½ÕÔÞáâÐâÞçÝÞ ÜÕáâÐ ÝÐ ÔØáÚÕ ÔÛï ÝÐçÐÛÐ ×ÐߨáØ"
|
msgstr "½ÕÔÞáâÐâÞçÝÞ ÜÕáâÐ ÝÐ ÔØáÚÕ ÔÛï ÝÐçÐÛÐ ×ÐߨáØ"
|
||||||
|
36
remux.c
36
remux.c
@ -11,7 +11,7 @@
|
|||||||
* The cRepacker family's code was originally written by Reinhard Nissl <rnissl@gmx.de>,
|
* The cRepacker family's code was originally written by Reinhard Nissl <rnissl@gmx.de>,
|
||||||
* and adapted to the VDR coding style by Klaus.Schmidinger@cadsoft.de.
|
* and adapted to the VDR coding style by Klaus.Schmidinger@cadsoft.de.
|
||||||
*
|
*
|
||||||
* $Id: remux.c 1.60 2007/11/03 14:18:07 kls Exp $
|
* $Id: remux.c 1.63 2007/11/18 14:45:28 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "remux.h"
|
#include "remux.h"
|
||||||
@ -1427,7 +1427,6 @@ int cDolbyRepacker::BreakAt(const uchar *Data, int Count)
|
|||||||
#define MMAX_PLENGTH (64*MAX_PLENGTH) // some stations send PES packets that are extremely large, e.g. DVB-T in Finland or HDTV 1920x1080
|
#define MMAX_PLENGTH (64*MAX_PLENGTH) // some stations send PES packets that are extremely large, e.g. DVB-T in Finland or HDTV 1920x1080
|
||||||
|
|
||||||
#define IPACKS 2048
|
#define IPACKS 2048
|
||||||
#define SUBTITLE_PACKS KILOBYTE(32)
|
|
||||||
|
|
||||||
// Start codes:
|
// Start codes:
|
||||||
#define SC_SEQUENCE 0xB3 // "sequence header code"
|
#define SC_SEQUENCE 0xB3 // "sequence header code"
|
||||||
@ -1750,13 +1749,13 @@ void cTS2PES::instant_repack(const uint8_t *Buf, int Count)
|
|||||||
case VIDEO_STREAM_S ... VIDEO_STREAM_E:
|
case VIDEO_STREAM_S ... VIDEO_STREAM_E:
|
||||||
case PRIVATE_STREAM1:
|
case PRIVATE_STREAM1:
|
||||||
|
|
||||||
if (mpeg == 2 && found == 9) {
|
if (mpeg == 2 && found == 9 && count < found) { // make sure to not write the data twice by looking at count
|
||||||
write_ipack(&flag1, 1);
|
write_ipack(&flag1, 1);
|
||||||
write_ipack(&flag2, 1);
|
write_ipack(&flag2, 1);
|
||||||
write_ipack(&hlength, 1);
|
write_ipack(&hlength, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mpeg == 1 && found == mpeg1_required) {
|
if (mpeg == 1 && found == mpeg1_required && count < found) { // make sure to not write the data twice by looking at count
|
||||||
write_ipack(&flag1, 1);
|
write_ipack(&flag1, 1);
|
||||||
if (mpeg1_required > 7) {
|
if (mpeg1_required > 7) {
|
||||||
write_ipack(&flag2, 1);
|
write_ipack(&flag2, 1);
|
||||||
@ -1870,6 +1869,29 @@ void cTS2PES::ts_to_pes(const uint8_t *Buf) // don't need count (=188)
|
|||||||
instant_repack(Buf + 4 + off, TS_SIZE - 4 - off);
|
instant_repack(Buf + 4 + off, TS_SIZE - 4 - off);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --- cRingBufferLinearPes --------------------------------------------------
|
||||||
|
|
||||||
|
class cRingBufferLinearPes : public cRingBufferLinear {
|
||||||
|
protected:
|
||||||
|
virtual int DataReady(const uchar *Data, int Count);
|
||||||
|
public:
|
||||||
|
cRingBufferLinearPes(int Size, int Margin = 0, bool Statistics = false, const char *Description = NULL)
|
||||||
|
:cRingBufferLinear(Size, Margin, Statistics, Description) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
int cRingBufferLinearPes::DataReady(const uchar *Data, int Count)
|
||||||
|
{
|
||||||
|
int c = cRingBufferLinear::DataReady(Data, Count);
|
||||||
|
if (!c && Count >= 6) {
|
||||||
|
if (!Data[0] && !Data[1] && Data[2] == 0x01) {
|
||||||
|
int Length = 6 + Data[4] * 256 + Data[5];
|
||||||
|
if (Length <= Count)
|
||||||
|
return Length;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
// --- cRemux ----------------------------------------------------------------
|
// --- cRemux ----------------------------------------------------------------
|
||||||
|
|
||||||
#define RESULTBUFFERSIZE KILOBYTE(256)
|
#define RESULTBUFFERSIZE KILOBYTE(256)
|
||||||
@ -1883,7 +1905,7 @@ cRemux::cRemux(int VPid, const int *APids, const int *DPids, const int *SPids, b
|
|||||||
skipped = 0;
|
skipped = 0;
|
||||||
numTracks = 0;
|
numTracks = 0;
|
||||||
resultSkipped = 0;
|
resultSkipped = 0;
|
||||||
resultBuffer = new cRingBufferLinear(RESULTBUFFERSIZE, IPACKS, false, "Result");
|
resultBuffer = new cRingBufferLinearPes(RESULTBUFFERSIZE, IPACKS, false, "Result");
|
||||||
resultBuffer->SetTimeouts(0, 100);
|
resultBuffer->SetTimeouts(0, 100);
|
||||||
if (VPid)
|
if (VPid)
|
||||||
#define TEST_cVideoRepacker
|
#define TEST_cVideoRepacker
|
||||||
@ -1912,7 +1934,7 @@ cRemux::cRemux(int VPid, const int *APids, const int *DPids, const int *SPids, b
|
|||||||
if (SPids) {
|
if (SPids) {
|
||||||
int n = 0;
|
int n = 0;
|
||||||
while (*SPids && numTracks < MAXTRACKS && n < MAXSPIDS)
|
while (*SPids && numTracks < MAXTRACKS && n < MAXSPIDS)
|
||||||
ts2pes[numTracks++] = new cTS2PES(*SPids++, resultBuffer, SUBTITLE_PACKS, 0x00, 0x20 + n++);
|
ts2pes[numTracks++] = new cTS2PES(*SPids++, resultBuffer, IPACKS, 0x00, 0x20 + n++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2010,7 +2032,7 @@ int cRemux::Put(const uchar *Data, int Count)
|
|||||||
break;
|
break;
|
||||||
if (Data[i] != TS_SYNC_BYTE)
|
if (Data[i] != TS_SYNC_BYTE)
|
||||||
break;
|
break;
|
||||||
if (resultBuffer->Free() < SUBTITLE_PACKS)
|
if (resultBuffer->Free() < 2 * IPACKS)
|
||||||
break; // A cTS2PES might write one full packet and also a small rest
|
break; // A cTS2PES might write one full packet and also a small rest
|
||||||
int pid = GetPid(Data + i + 1);
|
int pid = GetPid(Data + i + 1);
|
||||||
if (Data[i + 3] & 0x10) { // got payload
|
if (Data[i + 3] & 0x10) { // got payload
|
||||||
|
18
ringbuffer.c
18
ringbuffer.c
@ -7,7 +7,7 @@
|
|||||||
* Parts of this file were inspired by the 'ringbuffy.c' from the
|
* Parts of this file were inspired by the 'ringbuffy.c' from the
|
||||||
* LinuxDVB driver (see linuxtv.org).
|
* LinuxDVB driver (see linuxtv.org).
|
||||||
*
|
*
|
||||||
* $Id: ringbuffer.c 1.24 2006/06/16 09:32:13 kls Exp $
|
* $Id: ringbuffer.c 1.25 2007/11/17 13:49:34 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ringbuffer.h"
|
#include "ringbuffer.h"
|
||||||
@ -187,6 +187,11 @@ cRingBufferLinear::~cRingBufferLinear()
|
|||||||
free(description);
|
free(description);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int cRingBufferLinear::DataReady(const uchar *Data, int Count)
|
||||||
|
{
|
||||||
|
return Count >= margin ? Count : 0;
|
||||||
|
}
|
||||||
|
|
||||||
int cRingBufferLinear::Available(void)
|
int cRingBufferLinear::Available(void)
|
||||||
{
|
{
|
||||||
int diff = head - tail;
|
int diff = head - tail;
|
||||||
@ -284,7 +289,6 @@ int cRingBufferLinear::Put(const uchar *Data, int Count)
|
|||||||
|
|
||||||
uchar *cRingBufferLinear::Get(int &Count)
|
uchar *cRingBufferLinear::Get(int &Count)
|
||||||
{
|
{
|
||||||
uchar *p = NULL;
|
|
||||||
int Head = head;
|
int Head = head;
|
||||||
if (getThreadTid <= 0)
|
if (getThreadTid <= 0)
|
||||||
getThreadTid = cThread::ThreadId();
|
getThreadTid = cThread::ThreadId();
|
||||||
@ -299,14 +303,14 @@ uchar *cRingBufferLinear::Get(int &Count)
|
|||||||
int cont = (diff >= 0) ? diff : Size() + diff - margin;
|
int cont = (diff >= 0) ? diff : Size() + diff - margin;
|
||||||
if (cont > rest)
|
if (cont > rest)
|
||||||
cont = rest;
|
cont = rest;
|
||||||
if (cont >= margin) {
|
uchar *p = buffer + tail;
|
||||||
p = buffer + tail;
|
if ((cont = DataReady(p, cont)) > 0) {
|
||||||
Count = gotten = cont;
|
Count = gotten = cont;
|
||||||
}
|
|
||||||
if (!p)
|
|
||||||
WaitForGet();
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
WaitForGet();
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
void cRingBufferLinear::Del(int Count)
|
void cRingBufferLinear::Del(int Count)
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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
|
#ifndef __RINGBUFFER_H
|
||||||
@ -60,6 +60,13 @@ private:
|
|||||||
int gotten;
|
int gotten;
|
||||||
uchar *buffer;
|
uchar *buffer;
|
||||||
char *description;
|
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:
|
public:
|
||||||
cRingBufferLinear(int Size, int Margin = 0, bool Statistics = false, const char *Description = NULL);
|
cRingBufferLinear(int Size, int Margin = 0, bool Statistics = false, const char *Description = NULL);
|
||||||
///< Creates a linear ring buffer.
|
///< Creates a linear ring buffer.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user