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

Fixed switching audio tracks in 'Transfer Mode' on the primary DVB device

This commit is contained in:
Klaus Schmidinger 2002-10-26 10:12:34 +02:00
parent 2c311093ba
commit a51f4e83f0
3 changed files with 14 additions and 2 deletions

View File

@ -155,6 +155,7 @@ Stefan Huelswitt <huels@iname.com>
for adding a missing StripAudioPackets() to cDvbPlayer::Action() for adding a missing StripAudioPackets() to cDvbPlayer::Action()
for improving skipping channels that are (currently) not available for improving skipping channels that are (currently) not available
for fixing checking the Ca() status of a cDevice for fixing checking the Ca() status of a cDevice
for helping to fix switching audio tracks in 'Transfer Mode' on the primary DVB device
Ulrich Röder <roeder@efr-net.de> Ulrich Röder <roeder@efr-net.de>
for pointing out that there are channels that have a symbol rate higher than for pointing out that there are channels that have a symbol rate higher than
@ -444,3 +445,6 @@ Jaakko Hyv
Dennis Noordsij <dennis.noordsij@wiral.com> Dennis Noordsij <dennis.noordsij@wiral.com>
for reporting a small glitch when switching channels for reporting a small glitch when switching channels
Steffen Barszus <st_barszus@gmx.de>
for reporting a bug in switching audio tracks in 'Transfer Mode' on the primary DVB device

View File

@ -1634,3 +1634,6 @@ Video Disk Recorder Revision History
by 1000 until it is larger than 1000000. by 1000 until it is larger than 1000000.
- Fixed skipping unavailable channels when zapping downwards. - Fixed skipping unavailable channels when zapping downwards.
- Fixed checking the Ca() status of a cDevice (thanks to Stefan Huelswitt). - Fixed checking the Ca() status of a cDevice (thanks to Stefan Huelswitt).
- Fixed switching audio tracks in 'Transfer Mode' on the primary DVB device
(thanks to Steffen Barszus and Stefan Huelswitt for reporting this one and
helping to fix it).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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" #include "dvbdevice.h"
@ -742,7 +742,7 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
CHECK(ioctl(fd_audio, AUDIO_SET_AV_SYNC, true)); CHECK(ioctl(fd_audio, AUDIO_SET_AV_SYNC, true));
} }
else if (StartTransferMode) 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: // Start setting system time:
@ -777,6 +777,8 @@ int cDvbDevice::NumAudioTracksDevice(void) const
const char **cDvbDevice::GetAudioTracksDevice(int *CurrentTrack) const const char **cDvbDevice::GetAudioTracksDevice(int *CurrentTrack) const
{ {
if (Ca())
return NULL; // a Ca recording session blocks switching live audio tracks
if (NumAudioTracks()) { if (NumAudioTracks()) {
if (CurrentTrack) if (CurrentTrack)
*CurrentTrack = (pidHandles[ptAudio].pid == aPid1) ? 0 : 1; *CurrentTrack = (pidHandles[ptAudio].pid == aPid1) ? 0 : 1;
@ -790,8 +792,11 @@ const char **cDvbDevice::GetAudioTracksDevice(int *CurrentTrack) const
void cDvbDevice::SetAudioTrackDevice(int Index) void cDvbDevice::SetAudioTrackDevice(int Index)
{ {
if (0 <= Index && Index < NumAudioTracks()) { 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); DelPid(pidHandles[ptAudio].pid);
AddPid(Index ? aPid2 : aPid1, ptAudio); AddPid(Index ? aPid2 : aPid1, ptAudio);
AddPid(vpid, ptVideo);
} }
} }