diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2005-11-11 16:13:19 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2005-11-11 16:13:19 +0100 |
commit | 2cae2ed28c0b6055b504e6fd00a79bba176d0637 (patch) | |
tree | af4e713252d9f4209b78ad897e7157431f22b4e3 /dvbdevice.c | |
parent | 609a4cd6cfd4baa6e56c6e2c8befaf77903dc887 (diff) | |
download | vdr-2cae2ed28c0b6055b504e6fd00a79bba176d0637.tar.gz vdr-2cae2ed28c0b6055b504e6fd00a79bba176d0637.tar.bz2 |
Modified switching to Dolby Digital audio in live mode
Diffstat (limited to 'dvbdevice.c')
-rw-r--r-- | dvbdevice.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/dvbdevice.c b/dvbdevice.c index 3f9e144e..b59076cd 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.136 2005/08/21 09:17:20 kls Exp $ + * $Id: dvbdevice.c 1.137 2005/11/11 14:53:52 kls Exp $ */ #include "dvbdevice.h" @@ -659,6 +659,11 @@ eVideoSystem cDvbDevice::GetVideoSystem(void) return VideoSystem; } +bool cDvbDevice::SetAudioBypass(bool On) +{ + return ioctl(fd_audio, AUDIO_SET_BYPASS_MODE, On) == 0; +} + // ptAudio ptVideo ptPcr ptTeletext ptDolby ptOther dmx_pes_type_t PesTypes[] = { DMX_PES_AUDIO, DMX_PES_VIDEO, DMX_PES_PCR, DMX_PES_TELETEXT, DMX_PES_OTHER, DMX_PES_OTHER }; @@ -841,6 +846,7 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) // PID settings: if (TurnOnLivePIDs) { + SetAudioBypass(false); if (!(AddPid(Channel->Ppid(), ptPcr) && AddPid(Channel->Vpid(), ptVideo) && AddPid(Channel->Apid(0), ptAudio))) { esyslog("ERROR: failed to set PIDs for channel %d on device %d", Channel->Number(), CardIndex() + 1); return false; @@ -910,7 +916,8 @@ void cDvbDevice::SetAudioTrackDevice(eTrackType Type) { const tTrackId *TrackId = GetTrack(Type); if (TrackId && TrackId->id) { - if (IS_AUDIO_TRACK(Type)) { + SetAudioBypass(false); + if (IS_AUDIO_TRACK(Type) || (IS_DOLBY_TRACK(Type) && SetAudioBypass(true))) { if (pidHandles[ptAudio].pid && pidHandles[ptAudio].pid != TrackId->id) { DetachAll(pidHandles[ptAudio].pid); pidHandles[ptAudio].pid = TrackId->id; |