1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Now using twice the buffer reserve in cTransfer if the primary DVB card is an unmodified version with only 2MB of SDRAM

This commit is contained in:
Klaus Schmidinger 2005-02-12 15:54:06 +01:00
parent a481a5200c
commit 3b871f8bb6
4 changed files with 26 additions and 4 deletions

View File

@ -807,6 +807,7 @@ Christian Jacobsen <christian.jacobsen@stageholding.de>
for making the LIRC interface skip keys that come in too fast
for reporting a problem in handling the '-E' options in version 1.3.18
for reporting a problem in case a station defines all 32 audio PIDs
for suggestions and experiments regarding the buffer reserve in cTransfer
Andreas Mair <Andreas.Mair@linogate.com>
for reporting a short display of the main menu if a plugin displays its own OSD and
@ -1263,3 +1264,6 @@ Rolf Groppe <rolf@groppe.de>
Wolfgang Rohdewald <wolfgang@rohdewald.de>
for pointing out that primaryDevice = NULL should be done before deleting the devices
in cDevice::Shutdown()
Chad Flynt <hoochster@sofnet.com>
for suggestions and experiments regarding the buffer reserve in cTransfer

View File

@ -3399,3 +3399,7 @@ Video Disk Recorder Revision History
- Added DeviceClrAvailableTracks() and DeviceSetCurrentAudioTrack() to cPlayer
(thanks to Marco Schlüßler).
- Fixed a typo in detecting UTF-8 (thanks to Reinhard Nissl).
- Now using twice the buffer reserve in cTransfer if the primary DVB card is an
unmodified version with only 2MB of SDRAM, to avoid audio stuttering when
playing Dolby Digital over the DVB card (thanks to Christian Jacobsen and Chad
Flynt for suggestions and experiments in that area).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbosd.c 1.25 2004/11/20 14:29:25 kls Exp $
* $Id: dvbosd.c 1.26 2005/02/12 15:36:31 kls Exp $
*/
#include "dvbosd.h"
@ -48,6 +48,13 @@ cDvbOsd::cDvbOsd(int Left, int Top, int OsdDev)
cap.cmd = OSD_CAP_MEMSIZE;
if (ioctl(osdDev, OSD_GET_CAPABILITY, &cap) == 0)
osdMem = cap.val;
#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.
extern bool DvbCardWith4MBofSDRAM;
DvbCardWith4MBofSDRAM = osdMem >= 1000000;
#endif
#endif
// must clear all windows here to avoid flashing effects - doesn't work if done
// in Flush() only for the windows that are actually used...

View File

@ -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;
}