mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed setting the read index in cDvbPlayer::Goto() in case Still is false; The function cDvbPlayer::Goto() now automatically calls Play() if Still is false
This commit is contained in:
parent
63372cd4aa
commit
0a5eb88696
4
HISTORY
4
HISTORY
@ -8414,7 +8414,7 @@ Video Disk Recorder Revision History
|
||||
generated an index file with VDR version 2.0.6 you may want to do so again with this
|
||||
version to make sure the index is OK.
|
||||
|
||||
2015-01-31: Version 2.1.8
|
||||
2015-02-01: Version 2.1.8
|
||||
|
||||
- Updated the Italian OSD texts (thanks to Diego Pierotto).
|
||||
- Fixed "warning: invalid suffix on literal" with GCC 4.8 and C++11 (thanks to Joerg
|
||||
@ -8449,3 +8449,5 @@ Video Disk Recorder Revision History
|
||||
- Added ARGSDIR to the ONEDIR section of Make.config.template (suggested by Derek
|
||||
Kelly).
|
||||
- Made cRecording::GetResume() public (suggested by Stefan Braun).
|
||||
- Fixed setting the read index in cDvbPlayer::Goto() in case Still is false.
|
||||
- The function cDvbPlayer::Goto() now automatically calls Play() if Still is false.
|
||||
|
14
dvbplayer.c
14
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 3.2 2015/01/25 13:12:13 kls Exp $
|
||||
* $Id: dvbplayer.c 3.3 2015/02/01 10:45:41 kls Exp $
|
||||
*/
|
||||
|
||||
#include "dvbplayer.h"
|
||||
@ -852,7 +852,9 @@ void cDvbPlayer::Goto(int Index, bool Still)
|
||||
off_t FileOffset;
|
||||
int Length;
|
||||
Index = index->GetNextIFrame(Index, false, &FileNumber, &FileOffset, &Length);
|
||||
if (Index >= 0 && NextFile(FileNumber, FileOffset) && Still) {
|
||||
if (Index >= 0) {
|
||||
if (Still) {
|
||||
if (NextFile(FileNumber, FileOffset)) {
|
||||
uchar b[MAXFRAMESIZE];
|
||||
int r = ReadFrame(replayFile, b, Length, sizeof(b));
|
||||
if (r > 0) {
|
||||
@ -862,9 +864,15 @@ void cDvbPlayer::Goto(int Index, bool Still)
|
||||
ptsIndex.Put(isPesRecording ? PesGetPts(b) : TsGetPts(b, r), Index);
|
||||
}
|
||||
playMode = pmStill;
|
||||
}
|
||||
readIndex = Index;
|
||||
}
|
||||
}
|
||||
else {
|
||||
readIndex = Index - 1; // Action() will first increment it!
|
||||
Play();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cDvbPlayer::SetAudioTrack(eTrackType Type, const tTrackId *TrackId)
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: dvbplayer.h 2.1 2012/02/19 11:40:36 kls Exp $
|
||||
* $Id: dvbplayer.h 3.1 2015/02/01 11:20:54 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __DVBPLAYER_H
|
||||
@ -56,7 +56,7 @@ public:
|
||||
// and >0 if this is multi speed mode.
|
||||
void Goto(int Index, bool Still = false);
|
||||
// Positions to the given index and displays that frame as a still picture
|
||||
// if Still is true.
|
||||
// if Still is true. If Still is false, Play() will be called.
|
||||
};
|
||||
|
||||
#endif //__DVBPLAYER_H
|
||||
|
14
menu.c
14
menu.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: menu.c 3.34 2015/01/31 14:50:55 kls Exp $
|
||||
* $Id: menu.c 3.35 2015/02/01 10:42:11 kls Exp $
|
||||
*/
|
||||
|
||||
#include "menu.h"
|
||||
@ -5262,8 +5262,6 @@ void cReplayControl::TimeSearchProcess(eKeys Key)
|
||||
Seconds = min(Total - STAY_SECONDS_OFF_END, Seconds);
|
||||
bool Still = Key == kDown || Key == kPause || Key == kOk;
|
||||
Goto(SecondsToFrames(Seconds, FramesPerSecond()), Still);
|
||||
if (!Still)
|
||||
Play();
|
||||
}
|
||||
timeSearchActive = false;
|
||||
break;
|
||||
@ -5332,7 +5330,6 @@ void cReplayControl::MarkJump(bool Forward)
|
||||
int Speed;
|
||||
if (GetReplayMode(Playing, Fwd, Speed) && Playing && Forward && m->Position() < Total - SecondsToFrames(3, FramesPerSecond())) {
|
||||
Goto(m->Position());
|
||||
Play();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -5379,11 +5376,8 @@ void cReplayControl::MarkMove(int Frames, bool MarkRequired)
|
||||
Goto(m->Position(), true);
|
||||
marksModified = true;
|
||||
}
|
||||
else if (!MarkRequired) {
|
||||
else if (!MarkRequired)
|
||||
Goto(SkipFrames(Frames), !Play);
|
||||
if (Play)
|
||||
this->Play();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -5419,10 +5413,8 @@ void cReplayControl::EditTest(void)
|
||||
if (m) {
|
||||
if ((m->Index() & 0x01) != 0 && !Setup.SkipEdited) // when skipping edited parts we also need to jump to end marks
|
||||
m = marks.Next(m);
|
||||
if (m) {
|
||||
if (m)
|
||||
Goto(m->Position() - SecondsToFrames(3, FramesPerSecond()));
|
||||
Play();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user