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

Improved sending all frames to devices that can handle them in fast forward trick speeds, including subtitles

This commit is contained in:
Klaus Schmidinger 2008-02-09 15:12:55 +01:00
parent 6520725bb2
commit 7ad17726d8
3 changed files with 19 additions and 12 deletions

View File

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

View File

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

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.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))
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))
if (playMode == pmStill || playMode == pmFast || (playMode == pmSlow && playDir == pdBackward)) {
if (!(DeviceHasIBPTrickSpeed() && playDir == pdForward))
Empty();
}
DevicePlay();
playMode = pmPlay;
playDir = pdForward;
@ -572,6 +576,7 @@ void cDvbPlayer::Forward(void)
// run into pmPlay
case pmPlay: {
LOCK_THREAD;
if (!(DeviceHasIBPTrickSpeed() && playDir == pdForward))
Empty();
DeviceMute();
playMode = pmFast;