summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-07-30 10:04:18 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-07-30 10:04:18 +0200
commit856f22dbf1ac274210ba5d4e12d7a5090fda1c94 (patch)
treec4d753e4a70efefd87e0932e12b7eb3e002916ea
parenta6f3a325d7c0d4d7e7857a1e7b561e488ef8055d (diff)
downloadvdr-856f22dbf1ac274210ba5d4e12d7a5090fda1c94.tar.gz
vdr-856f22dbf1ac274210ba5d4e12d7a5090fda1c94.tar.bz2
cDvbPlayer::Goto() now appends a Sequence End Code to get the image shown immediately with softdevices
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY2
-rw-r--r--dvbplayer.c27
3 files changed, 29 insertions, 2 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 45a446b2..683dcdaa 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -961,6 +961,8 @@ Reinhard Nissl <rnissl@gmx.de>
for implementing cVideoRepacker in remux.c to make sure every PES packet contains
only data from one frame
for fixing the call to Channels.Unlock() in cEITScanner::Process()
+ for making cDvbPlayer::Goto() append a Sequence End Code to get the image shown
+ immediately with softdevices
Richard Robson <richard_robson@beeb.net>
for reporting freezing replay if a timer starts while in Transfer Mode from the
diff --git a/HISTORY b/HISTORY
index 6777ba1e..c1cde750 100644
--- a/HISTORY
+++ b/HISTORY
@@ -3640,3 +3640,5 @@ Video Disk Recorder Revision History
device, which avoids a busy loop on very fast machines (thanks to Martin Wache).
- Modified the description of cDevice::Poll() to avoid misunderstandings.
- Updated Croatian language texts (thanks to Drazen Dupor).
+- cDvbPlayer::Goto() now appends a Sequence End Code to get the image shown
+ immediately with softdevices (thanks to Reinhard Nissl).
diff --git a/dvbplayer.c b/dvbplayer.c
index 3082e281..cd002a77 100644
--- a/dvbplayer.c
+++ b/dvbplayer.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbplayer.c 1.35 2005/07/30 09:20:08 kls Exp $
+ * $Id: dvbplayer.c 1.36 2005/07/30 10:00:24 kls Exp $
*/
#include "dvbplayer.h"
@@ -668,11 +668,34 @@ void cDvbPlayer::Goto(int Index, bool Still)
int FileOffset, Length;
Index = index->GetNextIFrame(Index, false, &FileNumber, &FileOffset, &Length);
if (Index >= 0 && NextFile(FileNumber, FileOffset) && Still) {
- uchar b[MAXFRAMESIZE];
+ uchar b[MAXFRAMESIZE + 4 + 5 + 4];
int r = ReadFrame(replayFile, b, Length, sizeof(b));
if (r > 0) {
if (playMode == pmPause)
DevicePlay();
+ // append sequence end code to get the image shown immediately with softdevices
+ if (r > 6) { // should be always true
+ b[r++] = 0x00;
+ b[r++] = 0x00;
+ b[r++] = 0x01;
+ b[r++] = b[3];
+ if (b[6] & 0x80) { // MPEG 2
+ b[r++] = 0x00;
+ b[r++] = 0x07;
+ b[r++] = 0x80;
+ b[r++] = 0x00;
+ b[r++] = 0x00;
+ }
+ else { // MPEG 1
+ b[r++] = 0x00;
+ b[r++] = 0x05;
+ b[r++] = 0x0F;
+ }
+ b[r++] = 0x00;
+ b[r++] = 0x00;
+ b[r++] = 0x01;
+ b[r++] = 0xB7;
+ }
DeviceStillPicture(b, r);
}
playMode = pmStill;