mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Modified switching to Dolby Digital audio in live mode
This commit is contained in:
		@@ -290,6 +290,8 @@ Werner Fink <werner@suse.de>
 | 
			
		||||
 for reporting a problem with ensuring there is a current audio track in case there
 | 
			
		||||
 is only one track
 | 
			
		||||
 for enabling a device to detach all receivers for a given PID
 | 
			
		||||
 for modifying switching to Dolby Digital audio in live mode, if the driver
 | 
			
		||||
 and firmware can handle live DD without the need of a Transfer Mode
 | 
			
		||||
 | 
			
		||||
Rolf Hakenes <hakenes@hippomi.de>
 | 
			
		||||
 for providing 'libdtv' and adapting the EIT mechanisms to it
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								HISTORY
									
									
									
									
									
								
							@@ -3947,3 +3947,8 @@ Video Disk Recorder Revision History
 | 
			
		||||
  repeating timer (thanks to Marco Schl<68><6C>ler).
 | 
			
		||||
- No longer removing superfluous hyphens in EPG data - would become too
 | 
			
		||||
  language dependent to handle all kinds of exceptions.
 | 
			
		||||
- Modified switching to Dolby Digital audio in live mode, if the driver
 | 
			
		||||
  and firmware can handle live DD without the need of a Transfer Mode (thanks
 | 
			
		||||
  to Werner Fink). Live DD mode requires a full featured DVB card and a
 | 
			
		||||
  LinuxDVB driver with firmware version 0x2622 or higher. Older versions will
 | 
			
		||||
  use Transfer Mode just like before.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										11
									
								
								dvbdevice.c
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								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;
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: dvbdevice.h 1.35 2005/08/20 15:20:15 kls Exp $
 | 
			
		||||
 * $Id: dvbdevice.h 1.36 2005/11/11 14:51:38 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef __DVBDEVICE_H
 | 
			
		||||
@@ -69,6 +69,8 @@ public:
 | 
			
		||||
 | 
			
		||||
// PID handle facilities
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
  bool SetAudioBypass(bool On);
 | 
			
		||||
protected:
 | 
			
		||||
  virtual bool SetPid(cPidHandle *Handle, int Type, bool On);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user