1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

cDvbPlayer::Goto() now appends a Sequence End Code to get the image shown immediately with softdevices

This commit is contained in:
Klaus Schmidinger 2005-07-30 10:04:18 +02:00
parent a6f3a325d7
commit 856f22dbf1
3 changed files with 29 additions and 2 deletions

View File

@ -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

View File

@ -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).

View File

@ -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;