Dear visitor, welcome to VDR Portal. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
--- vdr-1.3.22.org/transfer.c 2005-02-19 15:58:43.845022928 +0100
+++ vdr-1.3.22/transfer.c 2005-02-19 16:00:37.981671520 +0100
@@ -20,7 +20,7 @@
{
ringBuffer = new cRingBufferLinear(TRANSFERBUFSIZE, TS_SIZE * 2, true, "Transfer");
remux = new cRemux(VPid, APids, Setup.UseDolbyDigital ? DPids : NULL, SPids);
- needsBufferReserve = Setup.UseDolbyDigital && VPid != 0 && DPids && DPids[0] != 0;
+ needsBufferReserve = true; //Setup.UseDolbyDigital && VPid != 0 && DPids && DPids[0] != 0;
active = false;
}
@@ -68,7 +68,7 @@
int Result = 0;
#ifdef FW_NEEDS_BUFFER_RESERVE_FOR_AC3
bool GotBufferReserve = false;
- int RequiredBufferReserve = KILOBYTE(DvbCardWith4MBofSDRAM ? 288 : 576);
+ int RequiredBufferReserve = KILOBYTE(1024);
#endif
active = true;
while (active) {
|
Quoted
#ifdef FW_NEEDS_BUFFER_RESERVE_FOR_AC3
if (needsBufferReserve) {
if (IsAttached() && !Cleared) {
PlayPes(NULL, 0);
Cleared = true;
}
//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 (!GotBufferReserve) {
if (ringBuffer->Available() < 3 * KILOBYTE(192) / 2) { // used to be MAXFRAMESIZE, but the HDTV value of KILOBYTE(512) is way too much here
cCondWait:leepMs(20); // allow the buffer to collect some reserve
continue;
}
else
GotBufferReserve = true;
}
}
#endif
Quoted
Original von thmu
Hallo Lars,
ich würde es ja gern ausprobieren, leider sehen die Zeilen bei meiner Version = 1.3.20 ein wenig anders aus.
Wie würdest du folgenden Code umbauen??
Quoted
#ifdef FW_NEEDS_BUFFER_RESERVE_FOR_AC3
if (needsBufferReserve) {
if (IsAttached() && !Cleared) {
PlayPes(NULL, 0);
Cleared = true;
}
//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 (!GotBufferReserve) {
if (ringBuffer->Available() < 3 * KILOBYTE(192) / 2) { // used to be MAXFRAMESIZE, but the HDTV value of KILOBYTE(512) is way too much here
cCondWait:leepMs(20); // allow the buffer to collect some reserve
continue;
}
else
GotBufferReserve = true;
}
}
#endif
Quoted
Original von thmu
Du hast ja gesagt, das du das eigentlich selektiv nur für die analogen Kanäle habe möchtest.
Wieso?? Gibt's mit dieser Einstellung Probleme oder Nebenwirkungen bei den Digitalen, z.B. langsameres Umschalten??
This post has been edited 1 times, last edit by "thmu" (Mar 16th 2005, 9:46am)
Quoted
Original von PanamaJack
Optimal wäre es natürlich wenn diese Änderungen nur bei einem Kanal vom analogtv-Plugin aktiviert würden. Mir ist aber noch keine Möglichkeit eingefallen, wie man innerhalb von cTransfer::cTransfer oder cTransfer::Action feststellen kann, ob der aktuelle Kanal vom analogtv-Plugin geliefert wird.
Lars



