summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2008-02-09 15:12:55 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2008-02-09 15:12:55 +0100
commit7ad17726d81f586307bcfba2cc9c05af0e7b6ef0 (patch)
tree0e8ebbc2ecd57eb2b4df940a54424e81b07321ff
parent6520725bb2e4baf2dfd67e19c2e6977a1a5f1af8 (diff)
downloadvdr-7ad17726d81f586307bcfba2cc9c05af0e7b6ef0.tar.gz
vdr-7ad17726d81f586307bcfba2cc9c05af0e7b6ef0.tar.bz2
Improved sending all frames to devices that can handle them in fast forward trick speeds, including subtitles
-rw-r--r--HISTORY4
-rw-r--r--device.c10
-rw-r--r--dvbplayer.c17
3 files changed, 19 insertions, 12 deletions
diff --git a/HISTORY b/HISTORY
index ab48e9a4..80b85eff 100644
--- a/HISTORY
+++ b/HISTORY
@@ -5465,7 +5465,7 @@ Video Disk Recorder Revision History
- Fixed a new[]/delete mismatch in cMenuEditStrItem::LeaveEditMode() (thanks to
Udo Richter).
- Implemented sending all frames to devices that can handle them in fast forward
- trick speeds (thansk to Timo Eskola).
+ trick speeds (thanks to Timo Eskola).
- Updated the Hungarian language texts (thanks to Thomas Günther).
- Fixed description of DeviceSetAvailableTrack() and cReceiver(), and added an
example ~cMyReceiver() in PLUGINS.html (thanks to Marco Schlüßler).
@@ -5597,3 +5597,5 @@ Video Disk Recorder Revision History
- Ignoring "repeat" and "release" keys in the time search entry mode during replay,
to avoid inadvertently leaving it in case a key is pressed too long (suggested
by Andreas Brugger).
+- Improved sending all frames to devices that can handle them in fast forward
+ trick speeds, including subtitles (thanks to Timo Eskola).
diff --git a/device.c b/device.c
index 3dfdf6b3..16b88a26 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 1.150 2008/02/08 13:48:31 kls Exp $
+ * $Id: device.c 1.151 2008/02/09 15:09:04 kls Exp $
*/
#include "device.h"
@@ -1231,7 +1231,7 @@ int cDevice::PlayPesPacket(const uchar *Data, int Length, bool VideoOnly)
break;
case 0xC0 ... 0xDF: // audio
SetAvailableTrack(ttAudio, c - 0xC0, c);
- if (!VideoOnly && c == availableTracks[currentAudioTrack].id) {
+ if ((!VideoOnly || HasIBPTrickSpeed()) && c == availableTracks[currentAudioTrack].id) {
w = PlayAudio(Start, d, c);
if (FirstLoop)
Audios.PlayAudio(Data, Length, c);
@@ -1261,13 +1261,13 @@ pre_1_3_19_PrivateStreamDeteced:
case 0x20: // SPU
case 0x30: // SPU
SetAvailableTrack(ttSubtitle, SubStreamIndex, SubStreamId);
- if (!VideoOnly && currentSubtitleTrack != ttNone && SubStreamId == availableTracks[currentSubtitleTrack].id)
+ if ((!VideoOnly || HasIBPTrickSpeed()) && currentSubtitleTrack != ttNone && SubStreamId == availableTracks[currentSubtitleTrack].id)
w = PlaySubtitle(Start, d);
break;
case 0x80: // AC3 & DTS
if (Setup.UseDolbyDigital) {
SetAvailableTrack(ttDolby, SubStreamIndex, SubStreamId);
- if (!VideoOnly && SubStreamId == availableTracks[currentAudioTrack].id) {
+ if ((!VideoOnly || HasIBPTrickSpeed()) && SubStreamId == availableTracks[currentAudioTrack].id) {
w = PlayAudio(Start, d, SubStreamId);
if (FirstLoop)
Audios.PlayAudio(Data, Length, SubStreamId);
@@ -1276,7 +1276,7 @@ pre_1_3_19_PrivateStreamDeteced:
break;
case 0xA0: // LPCM
SetAvailableTrack(ttAudio, SubStreamIndex, SubStreamId);
- if (!VideoOnly && SubStreamId == availableTracks[currentAudioTrack].id) {
+ if ((!VideoOnly || HasIBPTrickSpeed()) && SubStreamId == availableTracks[currentAudioTrack].id) {
w = PlayAudio(Start, d, SubStreamId);
if (FirstLoop)
Audios.PlayAudio(Data, Length, SubStreamId);
diff --git a/dvbplayer.c b/dvbplayer.c
index a072a445..64fa559b 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.47 2007/10/13 12:20:58 kls Exp $
+ * $Id: dvbplayer.c 1.48 2008/02/09 15:10:54 kls Exp $
*/
#include "dvbplayer.h"
@@ -537,8 +537,10 @@ void cDvbPlayer::Pause(void)
Play();
else {
LOCK_THREAD;
- if (playMode == pmFast || (playMode == pmSlow && playDir == pdBackward))
- Empty();
+ if (playMode == pmFast || (playMode == pmSlow && playDir == pdBackward)) {
+ if (!(DeviceHasIBPTrickSpeed() && playDir == pdForward))
+ Empty();
+ }
DeviceFreeze();
playMode = pmPause;
}
@@ -548,8 +550,10 @@ void cDvbPlayer::Play(void)
{
if (playMode != pmPlay) {
LOCK_THREAD;
- if (playMode == pmStill || playMode == pmFast || (playMode == pmSlow && playDir == pdBackward))
- Empty();
+ if (playMode == pmStill || playMode == pmFast || (playMode == pmSlow && playDir == pdBackward)) {
+ if (!(DeviceHasIBPTrickSpeed() && playDir == pdForward))
+ Empty();
+ }
DevicePlay();
playMode = pmPlay;
playDir = pdForward;
@@ -572,7 +576,8 @@ void cDvbPlayer::Forward(void)
// run into pmPlay
case pmPlay: {
LOCK_THREAD;
- Empty();
+ if (!(DeviceHasIBPTrickSpeed() && playDir == pdForward))
+ Empty();
DeviceMute();
playMode = pmFast;
playDir = pdForward;