diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2005-02-12 15:54:06 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2005-02-12 15:54:06 +0100 |
commit | 3b871f8bb6726ce0aff6a410abc236fc2b800e00 (patch) | |
tree | 30135327a0a105e1f3aeca60287c2ba7432b3ddd /transfer.c | |
parent | a481a5200c266dd387d1dca8a0253abfb208f031 (diff) | |
download | vdr-3b871f8bb6726ce0aff6a410abc236fc2b800e00.tar.gz vdr-3b871f8bb6726ce0aff6a410abc236fc2b800e00.tar.bz2 |
Now using twice the buffer reserve in cTransfer if the primary DVB card is an unmodified version with only 2MB of SDRAM
Diffstat (limited to 'transfer.c')
-rw-r--r-- | transfer.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: transfer.c 1.26 2005/02/12 13:51:21 kls Exp $ + * $Id: transfer.c 1.27 2005/02/12 15:54:06 kls Exp $ */ #include "transfer.h" @@ -54,14 +54,21 @@ void cTransfer::Receive(uchar *Data, int Length) } } +#define FW_NEEDS_BUFFER_RESERVE_FOR_AC3 +#ifdef FW_NEEDS_BUFFER_RESERVE_FOR_AC3 +//XXX This is a very ugly hack to allow cDvbOsd to reduce the buffer +//XXX requirements in cTransfer if it detects a 4MB full featured DVB card. +bool DvbCardWith4MBofSDRAM = false; +#endif + void cTransfer::Action(void) { int PollTimeouts = 0; uchar *p = NULL; int Result = 0; -#define FW_NEEDS_BUFFER_RESERVE_FOR_AC3 #ifdef FW_NEEDS_BUFFER_RESERVE_FOR_AC3 bool GotBufferReserve = false; + int RequiredBufferReserve = KILOBYTE(DvbCardWith4MBofSDRAM ? 288 : 576); #endif active = true; while (active) { @@ -74,7 +81,7 @@ void cTransfer::Action(void) //XXX audio is mostly to early in comparison to video). //XXX To resolve this, the remuxer or PlayPes() should synchronize //XXX audio with the video frames. 2004/09/09 Werner - if (ringBuffer->Available() < 3 * KILOBYTE(192) / 2) { // used to be MAXFRAMESIZE, but the HDTV value of KILOBYTE(512) is way too much here + if (ringBuffer->Available() < RequiredBufferReserve) { // used to be MAXFRAMESIZE, but the HDTV value of KILOBYTE(512) is way too much here cCondWait::SleepMs(20); // allow the buffer to collect some reserve continue; } |