Message ID | 4D966FF0.6040202@gmx.de |
---|---|
State | New |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.69) (envelope-from <J.Riechardt@gmx.de>) id 1Q5oqy-0003Zt-VL for vdr@linuxtv.org; Sat, 02 Apr 2011 02:38:13 +0200 X-tubIT-Incoming-IP: 213.165.64.23 Received: from mailout-de.gmx.net ([213.165.64.23]) by mail.tu-berlin.de (exim-4.75/mailfrontend-1) with smtp for <vdr@linuxtv.org> id 1Q5oqy-0005vs-LZ; Sat, 02 Apr 2011 02:38:12 +0200 Received: (qmail invoked by alias); 02 Apr 2011 00:38:12 -0000 Received: from p54BF098F.dip0.t-ipconnect.de (EHLO [127.0.0.1]) [84.191.9.143] by mail.gmx.net (mp007) with SMTP; 02 Apr 2011 02:38:12 +0200 X-Authenticated: #1662389 X-Provags-ID: V01U2FsdGVkX1+8QikeY3+8pps+O/VjkToIEDqUHWmvUQr7gkrBdS uZPHonc8TpfB7i Message-ID: <4D966FF0.6040202@gmx.de> Date: Sat, 02 Apr 2011 02:38:08 +0200 From: Joerg Riechardt <J.Riechardt@gmx.de> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.14) Gecko/20110221 Lightning/1.0b2 Thunderbird/3.1.8 MIME-Version: 1.0 To: "vdr@linuxtv.org" <vdr@linuxtv.org> References: <4D949D6C.4000708@gmx.de> In-Reply-To: <4D949D6C.4000708@gmx.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 110401-2, 01.04.2011), Outbound message X-Antivirus-Status: Clean X-Y-GMX-Trusted: 0 X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2011.4.2.2718 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1800_1899 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MOZILLA_MSGID 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __USER_AGENT 0' X-LSpam-Score: -3.4 (---) X-LSpam-Report: No, score=-3.4 required=5.0 tests=AWL=0.215, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1 autolearn=ham Subject: Re: [vdr] vdr <-> vdr-xine <-> xine-lib and vdpau and HD recordings X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: VDR Mailing List <vdr@linuxtv.org> List-Id: VDR Mailing List <vdr.linuxtv.org> List-Unsubscribe: <http://www.linuxtv.org/cgi-bin/mailman/options/vdr>, <mailto:vdr-request@linuxtv.org?subject=unsubscribe> List-Archive: <http://www.linuxtv.org/pipermail/vdr> List-Post: <mailto:vdr@linuxtv.org> List-Help: <mailto:vdr-request@linuxtv.org?subject=help> List-Subscribe: <http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr>, <mailto:vdr-request@linuxtv.org?subject=subscribe> X-List-Received-Date: Sat, 02 Apr 2011 00:38:13 -0000 Status: O X-Status: X-Keywords: X-UID: 24595 |
Commit Message
Joerg Riechardt
April 2, 2011, 12:38 a.m. UTC
Problem solved with this patch: delete readFrame; // might not have been stored in the buffer in Action() readFrame = NULL; playFrame = NULL; @@ -388,6 +388,8 @@ int pc = 0; readIndex = Resume(); + int resume = readIndex; + bool firsttime = true; if (readIndex >= 0) isyslog("resuming replay at index %d (%s)", readIndex, *IndexToHMSF(readIndex, true, framesPerSecond)); @@ -452,6 +454,12 @@ else if (index) { uint16_t FileNumber; off_t FileOffset; + if (firsttime) { + if (readIndex == (resume + 32)) { + Goto((readIndex - 32));// prevents dropped frames in xine vdpau h264 + firsttime = false; + } + } if (index->Get(readIndex + 1, &FileNumber, &FileOffset, &readIndependent, &Length) && NextFile(FileNumber, FileOffset)) readIndex++; else @@ -760,7 +768,7 @@ if (Index > 0) Index = index->GetNextIFrame(Index, false, NULL, NULL, NULL, true); if (Index >= 0) - readIndex = Index - 1; // Action() will first increment it! + readIndex = Index; // prevents dropped frames in xine vdpau h264 } Play(); }
Comments
On 02.04.2011 02:38, Joerg Riechardt wrote: > Problem solved with this patch: > --- dvbplayer.c.orig 2010-03-07 15:24:26.000000000 +0100 > +++ dvbplayer.c 2011-04-02 01:57:21.016535946 +0200 > @@ -320,7 +320,7 @@ > if (nonBlockingFileReader) > nonBlockingFileReader->Clear(); > if (!firstPacket) // don't set the readIndex twice if Empty() is called more than once > - readIndex = ptsIndex.FindIndex(DeviceGetSTC()) - 1; // Action() will first increment it! > + readIndex = ptsIndex.FindIndex(DeviceGetSTC()); // prevents dropped frames in xine vdpau h264 > delete readFrame; // might not have been stored in the buffer in Action() > readFrame = NULL; > playFrame = NULL; > @@ -388,6 +388,8 @@ > int pc = 0; > > readIndex = Resume(); > + int resume = readIndex; > + bool firsttime = true; > if (readIndex >= 0) > isyslog("resuming replay at index %d (%s)", readIndex, *IndexToHMSF(readIndex, true, framesPerSecond)); > > @@ -452,6 +454,12 @@ > else if (index) { > uint16_t FileNumber; > off_t FileOffset; > + if (firsttime) { > + if (readIndex == (resume + 32)) { > + Goto((readIndex - 32));// prevents dropped frames in xine vdpau h264 > + firsttime = false; > + } > + } > if (index->Get(readIndex + 1, &FileNumber, &FileOffset, &readIndependent, &Length) && NextFile(FileNumber, FileOffset)) > readIndex++; > else > @@ -760,7 +768,7 @@ > if (Index > 0) > Index = index->GetNextIFrame(Index, false, NULL, NULL, NULL, true); > if (Index >= 0) > - readIndex = Index - 1; // Action() will first increment it! > + readIndex = Index; // prevents dropped frames in xine vdpau h264 > } > Play(); > } I can't help the feeling that this is a problem that should be addressed in xine, rather than working around it in VDR. Klaus
Am 02.04.2011 23:18, schrieb Klaus Schmidinger: > On 02.04.2011 02:38, Joerg Riechardt wrote: >> Problem solved with this patch: >> --- dvbplayer.c.orig 2010-03-07 15:24:26.000000000 +0100 >> +++ dvbplayer.c 2011-04-02 01:57:21.016535946 +0200 >> @@ -320,7 +320,7 @@ >> if (nonBlockingFileReader) >> nonBlockingFileReader->Clear(); >> if (!firstPacket) // don't set the readIndex twice if Empty() is >> called more than once >> - readIndex = ptsIndex.FindIndex(DeviceGetSTC()) - 1; // Action() will >> first increment it! >> + readIndex = ptsIndex.FindIndex(DeviceGetSTC()); // prevents dropped >> frames in xine vdpau h264 >> delete readFrame; // might not have been stored in the buffer in Action() >> readFrame = NULL; >> playFrame = NULL; >> @@ -388,6 +388,8 @@ >> int pc = 0; >> >> readIndex = Resume(); >> + int resume = readIndex; >> + bool firsttime = true; >> if (readIndex >= 0) >> isyslog("resuming replay at index %d (%s)", readIndex, >> *IndexToHMSF(readIndex, true, framesPerSecond)); >> >> @@ -452,6 +454,12 @@ >> else if (index) { >> uint16_t FileNumber; >> off_t FileOffset; >> + if (firsttime) { >> + if (readIndex == (resume + 32)) { >> + Goto((readIndex - 32));// prevents dropped frames in xine vdpau h264 >> + firsttime = false; >> + } >> + } >> if (index->Get(readIndex + 1, &FileNumber, &FileOffset, >> &readIndependent, &Length) && NextFile(FileNumber, FileOffset)) >> readIndex++; >> else >> @@ -760,7 +768,7 @@ >> if (Index > 0) >> Index = index->GetNextIFrame(Index, false, NULL, NULL, NULL, true); >> if (Index >= 0) >> - readIndex = Index - 1; // Action() will first increment it! >> + readIndex = Index; // prevents dropped frames in xine vdpau h264 >> } >> Play(); >> } > > I can't help the feeling that this is a problem that should > be addressed in xine, rather than working around it in VDR. > > Klaus I agree. I just thought, until that happens, it is nice for those concerned to have that patch. And maybe this patch gives an idea for a fix in xine. Joerg
--- dvbplayer.c.orig 2010-03-07 15:24:26.000000000 +0100 +++ dvbplayer.c 2011-04-02 01:57:21.016535946 +0200 @@ -320,7 +320,7 @@ if (nonBlockingFileReader) nonBlockingFileReader->Clear(); if (!firstPacket) // don't set the readIndex twice if Empty() is called more than once - readIndex = ptsIndex.FindIndex(DeviceGetSTC()) - 1; // Action() will first increment it! + readIndex = ptsIndex.FindIndex(DeviceGetSTC()); // prevents dropped frames in xine vdpau h264