mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Removed the "buffer reserve" in Transfer Mode - it's no longer necessary with recent driver/firmware versions
This commit is contained in:
parent
1530b5647b
commit
5e623525e9
2
HISTORY
2
HISTORY
@ -4251,3 +4251,5 @@ Video Disk Recorder Revision History
|
|||||||
- Increased the timeout in cInterface::GetKey() to avoid problems with remote
|
- Increased the timeout in cInterface::GetKey() to avoid problems with remote
|
||||||
controls that don't deliver "repeat" keypresses very fast (problem with the new
|
controls that don't deliver "repeat" keypresses very fast (problem with the new
|
||||||
handling of k_Repeat keypresses in channel switching reported by Udo Richter).
|
handling of k_Repeat keypresses in channel switching reported by Udo Richter).
|
||||||
|
- Removed the "buffer reserve" in Transfer Mode - it's no longer necessary with
|
||||||
|
recent driver/firmware versions.
|
||||||
|
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.29 2005/12/30 15:41:54 kls Exp $
|
* $Id: dvbosd.c 1.30 2006/01/28 14:24:04 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbosd.h"
|
#include "dvbosd.h"
|
||||||
@ -48,13 +48,6 @@ 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...
|
||||||
|
37
transfer.c
37
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.31 2006/01/21 14:13:16 kls Exp $
|
* $Id: transfer.c 1.32 2006/01/28 14:23:38 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "transfer.h"
|
#include "transfer.h"
|
||||||
@ -49,41 +49,12 @@ 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;
|
||||||
#ifdef FW_NEEDS_BUFFER_RESERVE_FOR_AC3
|
|
||||||
bool GotBufferReserve = false;
|
|
||||||
GotBufferReserve = true; //XXX remove this line if you absolutely need the buffer reserve
|
|
||||||
int RequiredBufferReserve = KILOBYTE(DvbCardWith4MBofSDRAM ? 288 : 576);
|
|
||||||
#endif
|
|
||||||
while (Running()) {
|
while (Running()) {
|
||||||
#ifdef FW_NEEDS_BUFFER_RESERVE_FOR_AC3
|
|
||||||
if (needsBufferReserve && !GotBufferReserve) {
|
|
||||||
//XXX For dolby we've to fill the buffer because the firmware does
|
|
||||||
//XXX not decode dolby but use a PCM stream for transport, therefore
|
|
||||||
//XXX the firmware has not enough buffer for noiseless skipping early
|
|
||||||
//XXX PCM samples (each dolby frame requires 6144 bytes in PCM and
|
|
||||||
//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() < 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;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
GotBufferReserve = true;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
int Count;
|
int Count;
|
||||||
uchar *b = ringBuffer->Get(Count);
|
uchar *b = ringBuffer->Get(Count);
|
||||||
if (b) {
|
if (b) {
|
||||||
@ -98,9 +69,6 @@ void cTransfer::Action(void)
|
|||||||
remux->Clear();
|
remux->Clear();
|
||||||
PlayPes(NULL, 0);
|
PlayPes(NULL, 0);
|
||||||
p = NULL;
|
p = NULL;
|
||||||
#ifdef FW_NEEDS_BUFFER_RESERVE_FOR_AC3
|
|
||||||
GotBufferReserve = false;
|
|
||||||
#endif
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Count = remux->Put(b, Count);
|
Count = remux->Put(b, Count);
|
||||||
@ -133,9 +101,6 @@ void cTransfer::Action(void)
|
|||||||
remux->Clear();
|
remux->Clear();
|
||||||
PlayPes(NULL, 0);
|
PlayPes(NULL, 0);
|
||||||
p = NULL;
|
p = NULL;
|
||||||
#ifdef FW_NEEDS_BUFFER_RESERVE_FOR_AC3
|
|
||||||
GotBufferReserve = false;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user