summaryrefslogtreecommitdiff
path: root/dvbdevice.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-10-26 10:12:34 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2002-10-26 10:12:34 +0200
commita51f4e83f0f03d06d52275af719635da92740103 (patch)
treeef80d67b3f1df71a1928eeae90477497ce279bc0 /dvbdevice.c
parent2c311093babab83b93dfdd64826b6a2e82462440 (diff)
downloadvdr-a51f4e83f0f03d06d52275af719635da92740103.tar.gz
vdr-a51f4e83f0f03d06d52275af719635da92740103.tar.bz2
Fixed switching audio tracks in 'Transfer Mode' on the primary DVB device
Diffstat (limited to 'dvbdevice.c')
-rw-r--r--dvbdevice.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/dvbdevice.c b/dvbdevice.c
index 184720a1..b68c16e3 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.26 2002/10/20 14:10:49 kls Exp $
+ * $Id: dvbdevice.c 1.27 2002/10/26 09:44:49 kls Exp $
*/
#include "dvbdevice.h"
@@ -742,7 +742,7 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
CHECK(ioctl(fd_audio, AUDIO_SET_AV_SYNC, true));
}
else if (StartTransferMode)
- cControl::Launch(new cTransferControl(this, Channel->Vpid(), Channel->Apid1(), 0, 0, 0));
+ cControl::Launch(new cTransferControl(this, Channel->Vpid(), Channel->Apid1(), Channel->Apid2(), Channel->Dpid1(), Channel->Dpid2()));
// Start setting system time:
@@ -777,6 +777,8 @@ int cDvbDevice::NumAudioTracksDevice(void) const
const char **cDvbDevice::GetAudioTracksDevice(int *CurrentTrack) const
{
+ if (Ca())
+ return NULL; // a Ca recording session blocks switching live audio tracks
if (NumAudioTracks()) {
if (CurrentTrack)
*CurrentTrack = (pidHandles[ptAudio].pid == aPid1) ? 0 : 1;
@@ -790,8 +792,11 @@ const char **cDvbDevice::GetAudioTracksDevice(int *CurrentTrack) const
void cDvbDevice::SetAudioTrackDevice(int Index)
{
if (0 <= Index && Index < NumAudioTracks()) {
+ int vpid = pidHandles[ptVideo].pid; // need to turn video PID off/on to restart demux
+ DelPid(vpid);
DelPid(pidHandles[ptAudio].pid);
AddPid(Index ? aPid2 : aPid1, ptAudio);
+ AddPid(vpid, ptVideo);
}
}