diff options
Diffstat (limited to 'dvbdevice.c')
-rw-r--r-- | dvbdevice.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/dvbdevice.c b/dvbdevice.c index 269c0a2..741848a 100644 --- a/dvbdevice.c +++ b/dvbdevice.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.c 1.117 2005/02/06 12:30:14 kls Exp $ + * $Id: dvbdevice.c 1.120 2005/02/13 14:26:37 kls Exp $ */ #include "dvbdevice.h" @@ -346,6 +346,7 @@ void cDvbTuner::Action(void) // --- cDvbDevice ------------------------------------------------------------ int cDvbDevice::devVideoOffset = -1; +bool cDvbDevice::setTransferModeForDolbyDigital = true; cDvbDevice::cDvbDevice(int n) { @@ -768,8 +769,8 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) ); bool StartTransferMode = IsPrimaryDevice() && !IsEncrypted && !DoTune - && (LiveView && HasPid(Channel->Vpid()) && pidHandles[ptVideo].pid != Channel->Vpid() // the PID is already set as DMX_PES_OTHER - || !LiveView && pidHandles[ptVideo].pid == Channel->Vpid() // a recording is going to shift the PIDs from DMX_PES_AUDIO/VIDEO to DMX_PES_OTHER + && (LiveView && HasPid(Channel->Vpid() ? Channel->Vpid() : Channel->Apid(0)) && (pidHandles[ptVideo].pid != Channel->Vpid() || pidHandles[ptAudio].pid != Channel->Apid(0))// the PID is already set as DMX_PES_OTHER + || !LiveView && (pidHandles[ptVideo].pid == Channel->Vpid() || pidHandles[ptAudio].pid == Channel->Apid(0)) // a recording is going to shift the PIDs from DMX_PES_AUDIO/VIDEO to DMX_PES_OTHER ); bool TurnOnLivePIDs = HasDecoder() && !StartTransferMode @@ -861,15 +862,24 @@ void cDvbDevice::SetDigitalAudioDevice(bool On) } } +void cDvbDevice::SetTransferModeForDolbyDigital(bool On) +{ + setTransferModeForDolbyDigital = On; +} + void cDvbDevice::SetAudioTrackDevice(eTrackType Type) { const tTrackId *TrackId = GetTrack(Type); if (TrackId && TrackId->id) { if (IS_AUDIO_TRACK(Type)) { - pidHandles[ptAudio].pid = TrackId->id; - SetPid(&pidHandles[ptAudio], ptAudio, true); + if (pidHandles[ptAudio].pid) { + pidHandles[ptAudio].pid = TrackId->id; + SetPid(&pidHandles[ptAudio], ptAudio, true); + } } else if (IS_DOLBY_TRACK(Type)) { + if (!setTransferModeForDolbyDigital) + return; // Currently this works only in Transfer Mode cChannel *Channel = Channels.GetByNumber(CurrentChannel()); if (Channel) |