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:
parent
a481a5200c
commit
3b871f8bb6
@ -807,6 +807,7 @@ Christian Jacobsen <christian.jacobsen@stageholding.de>
|
|||||||
for making the LIRC interface skip keys that come in too fast
|
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 handling the '-E' options in version 1.3.18
|
||||||
for reporting a problem in case a station defines all 32 audio PIDs
|
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>
|
Andreas Mair <Andreas.Mair@linogate.com>
|
||||||
for reporting a short display of the main menu if a plugin displays its own OSD and
|
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>
|
Wolfgang Rohdewald <wolfgang@rohdewald.de>
|
||||||
for pointing out that primaryDevice = NULL should be done before deleting the devices
|
for pointing out that primaryDevice = NULL should be done before deleting the devices
|
||||||
in cDevice::Shutdown()
|
in cDevice::Shutdown()
|
||||||
|
|
||||||
|
Chad Flynt <hoochster@sofnet.com>
|
||||||
|
for suggestions and experiments regarding the buffer reserve in cTransfer
|
||||||
|
4
HISTORY
4
HISTORY
@ -3399,3 +3399,7 @@ Video Disk Recorder Revision History
|
|||||||
- Added DeviceClrAvailableTracks() and DeviceSetCurrentAudioTrack() to cPlayer
|
- Added DeviceClrAvailableTracks() and DeviceSetCurrentAudioTrack() to cPlayer
|
||||||
(thanks to Marco Schlüßler).
|
(thanks to Marco Schlüßler).
|
||||||
- Fixed a typo in detecting UTF-8 (thanks to Reinhard Nissl).
|
- 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).
|
||||||
|
9
dvbosd.c
9
dvbosd.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: 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"
|
#include "dvbosd.h"
|
||||||
@ -48,6 +48,13 @@ cDvbOsd::cDvbOsd(int Left, int Top, int OsdDev)
|
|||||||
cap.cmd = OSD_CAP_MEMSIZE;
|
cap.cmd = OSD_CAP_MEMSIZE;
|
||||||
if (ioctl(osdDev, OSD_GET_CAPABILITY, &cap) == 0)
|
if (ioctl(osdDev, OSD_GET_CAPABILITY, &cap) == 0)
|
||||||
osdMem = cap.val;
|
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
|
#endif
|
||||||
// must clear all windows here to avoid flashing effects - doesn't work if done
|
// must clear all windows here to avoid flashing effects - doesn't work if done
|
||||||
// in Flush() only for the windows that are actually used...
|
// in Flush() only for the windows that are actually used...
|
||||||
|
13
transfer.c
13
transfer.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: 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"
|
#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)
|
void cTransfer::Action(void)
|
||||||
{
|
{
|
||||||
int PollTimeouts = 0;
|
int PollTimeouts = 0;
|
||||||
uchar *p = NULL;
|
uchar *p = NULL;
|
||||||
int Result = 0;
|
int Result = 0;
|
||||||
#define FW_NEEDS_BUFFER_RESERVE_FOR_AC3
|
|
||||||
#ifdef FW_NEEDS_BUFFER_RESERVE_FOR_AC3
|
#ifdef FW_NEEDS_BUFFER_RESERVE_FOR_AC3
|
||||||
bool GotBufferReserve = false;
|
bool GotBufferReserve = false;
|
||||||
|
int RequiredBufferReserve = KILOBYTE(DvbCardWith4MBofSDRAM ? 288 : 576);
|
||||||
#endif
|
#endif
|
||||||
active = true;
|
active = true;
|
||||||
while (active) {
|
while (active) {
|
||||||
@ -74,7 +81,7 @@ void cTransfer::Action(void)
|
|||||||
//XXX audio is mostly to early in comparison to video).
|
//XXX audio is mostly to early in comparison to video).
|
||||||
//XXX To resolve this, the remuxer or PlayPes() should synchronize
|
//XXX To resolve this, the remuxer or PlayPes() should synchronize
|
||||||
//XXX audio with the video frames. 2004/09/09 Werner
|
//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
|
cCondWait::SleepMs(20); // allow the buffer to collect some reserve
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user