summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2005-02-13 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2005-02-13 18:00:00 +0100
commitdbacda8274e2d76b0ea42f90b94353b672fa9343 (patch)
treed3ae7234a22dddafc04d95893bc2b2f1c2898472 /device.c
parent4d477cd144c8df2b3791b60f15337448292066fe (diff)
downloadvdr-patch-lnbsharing-dbacda8274e2d76b0ea42f90b94353b672fa9343.tar.gz
vdr-patch-lnbsharing-dbacda8274e2d76b0ea42f90b94353b672fa9343.tar.bz2
Version 1.3.21vdr-1.3.21
- Fixed cDvbDevice::SetAudioTrackDevice() to avoid a blank screen after switching back to live mode if a recording is currently active on the primary device. - Fixed a possible freeze in pause mode in case a device's PlayPesPacket() function permanently returns 0 (thanks to Reinhard Nissl and Olaf Titz). - Completed the Finnish OSD texts (thanks to Rolf Ahrenberg). - Restricted the "setting audio track" log message to automatic changes during replay. - Fixed handling Transfer Mode for radio channels (thanks to Andreas Regel for reporting this one). - Fixed handling symbolic links in cRecordings::ScanVideoDir() (thanks to Stefan Huelswitt). - Completed the Danish OSD texts (thanks to Mogens Elneff). - Forcing a new resync after a call to cRemux::Clear() (suggested by Marco Schlüßler). - The cAudio::Play() function now has an additional parameter 'uchar Id' which tells the function the substream id of the given audio packet, so that a plugin can take the right action for the various kinds if audio data - which now also includes "normal" audio with ids 0xC0...0xDF (based on suggestions by Werner Fink and Macro Schlüßler). - Removed the "Cleared/PlayPes(NULL, 0)" handling from cTransfer::Action(), since this is now done when attaching the player to the device (thanks to Marco Schlüßler). - Making sure the buffer reserve in cTransfer::Action() is re-established after clearing the buffer. - Added DeviceClrAvailableTracks() and DeviceSetCurrentAudioTrack() to cPlayer (thanks to Marco Schlüßler). - Fixed a typo in detecting UTF-8 (thanks to Reinhard Nissl). - Now using twice the buffer reserve in cTransfer if the primary DVB card is an unmodified version with only 2MB of SDRAM, to avoid audio stuttering when playing Dolby Digital over the DVB card (thanks to Christian Jacobsen and Chad Flynt for suggestions and experiments in that area). - Making sure the first audio packet is not dropped when switching to "pre 1.3.19 Dolby Digital compatibility mode". - The 'plugins-clean' target of the Makefile now only deletes the actual plugin library files from this version of VDR (suggested by Andreas Brachold). - Added a missing 'resultSkipped = 0' to cRemux::Clear() (thanks to Marco Schlüßler for reporting this one). - The new function cDvbDevice::SetTransferModeForDolbyDigital() can be used by plugins that implement Dolby Digital output and thus want to prevent the cDvbDevice from starting Transfer Mode in order to replay DD over the DVB device. - Added missing reset of the 'repacker' to cTS2PES::Clear() (thanks to Marco Schlüßler for reporting this one).
Diffstat (limited to 'device.c')
-rw-r--r--device.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/device.c b/device.c
index 46e23bc..f270b5a 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.87 2005/02/06 14:10:37 kls Exp $
+ * $Id: device.c 1.92 2005/02/13 09:51:48 kls Exp $
*/
#include "device.h"
@@ -756,7 +756,8 @@ void cDevice::EnsureAudioTrack(bool Force)
// Make sure we're set to an available audio track:
const tTrackId *Track = GetTrack(GetCurrentAudioTrack());
if (Force || !Track || !Track->id || PreferredTrack != GetCurrentAudioTrack()) {
- dsyslog("setting audio track to %d", PreferredTrack);
+ if (!Force) // only log this for automatic changes
+ dsyslog("setting audio track to %d", PreferredTrack);
SetCurrentAudioTrack(PreferredTrack);
}
}
@@ -882,8 +883,11 @@ 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 && c == availableTracks[currentAudioTrack].id) {
w = PlayAudio(Start, d);
+ if (FirstLoop)
+ Audios.PlayAudio(Data, Length, c);
+ }
break;
case 0xBD: { // private stream 1
int PayloadOffset = Data[8] + 9;
@@ -892,6 +896,7 @@ int cDevice::PlayPesPacket(const uchar *Data, int Length, bool VideoOnly)
uchar SubStreamIndex = SubStreamId & 0x1F;
// Compatibility mode for old VDR recordings, where 0xBD was only AC3:
+pre_1_3_19_PrivateStreamDeteced:
if (pre_1_3_19_PrivateStream) {
SubStreamId = c;
SubStreamType = 0x80;
@@ -907,15 +912,18 @@ int cDevice::PlayPesPacket(const uchar *Data, int Length, bool VideoOnly)
SetAvailableTrack(ttDolby, SubStreamIndex, SubStreamId);
if (!VideoOnly && SubStreamId == availableTracks[currentAudioTrack].id) {
w = PlayAudio(Start, d);
- if (FirstLoop && !(SubStreamId & 0x08)) // no DTS
- Audios.PlayAudio(Data, Length);
+ if (FirstLoop)
+ Audios.PlayAudio(Data, Length, SubStreamId);
}
}
break;
case 0xA0: // LPCM
SetAvailableTrack(ttAudio, SubStreamIndex, SubStreamId);
- if (!VideoOnly && SubStreamId == availableTracks[currentAudioTrack].id)
+ if (!VideoOnly && SubStreamId == availableTracks[currentAudioTrack].id) {
w = PlayAudio(Start, d);
+ if (FirstLoop)
+ Audios.PlayAudio(Data, Length, SubStreamId);
+ }
break;
default:
// Compatibility mode for old VDR recordings, where 0xBD was only AC3:
@@ -923,6 +931,7 @@ int cDevice::PlayPesPacket(const uchar *Data, int Length, bool VideoOnly)
dsyslog("switching to pre 1.3.19 Dolby Digital compatibility mode");
ClrAvailableTracks();
pre_1_3_19_PrivateStream = true;
+ goto pre_1_3_19_PrivateStreamDeteced;
}
}
}
@@ -984,7 +993,7 @@ int cDevice::PlayPes(const uchar *Data, int Length, bool VideoOnly)
int w = PlayPesPacket(Data + i, l, VideoOnly);
if (w > 0)
i += l;
- else if (w < 0)
+ else
return i == 0 ? w : i;
}
else