mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Modified switching to Dolby Digital audio in live mode
This commit is contained in:
parent
609a4cd6cf
commit
2cae2ed28c
@ -290,6 +290,8 @@ Werner Fink <werner@suse.de>
|
|||||||
for reporting a problem with ensuring there is a current audio track in case there
|
for reporting a problem with ensuring there is a current audio track in case there
|
||||||
is only one track
|
is only one track
|
||||||
for enabling a device to detach all receivers for a given PID
|
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>
|
Rolf Hakenes <hakenes@hippomi.de>
|
||||||
for providing 'libdtv' and adapting the EIT mechanisms to it
|
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üßler).
|
repeating timer (thanks to Marco Schlüßler).
|
||||||
- No longer removing superfluous hyphens in EPG data - would become too
|
- No longer removing superfluous hyphens in EPG data - would become too
|
||||||
language dependent to handle all kinds of exceptions.
|
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
|
* 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.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"
|
#include "dvbdevice.h"
|
||||||
@ -659,6 +659,11 @@ eVideoSystem cDvbDevice::GetVideoSystem(void)
|
|||||||
return VideoSystem;
|
return VideoSystem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool cDvbDevice::SetAudioBypass(bool On)
|
||||||
|
{
|
||||||
|
return ioctl(fd_audio, AUDIO_SET_BYPASS_MODE, On) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
// ptAudio ptVideo ptPcr ptTeletext ptDolby ptOther
|
// 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 };
|
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:
|
// PID settings:
|
||||||
|
|
||||||
if (TurnOnLivePIDs) {
|
if (TurnOnLivePIDs) {
|
||||||
|
SetAudioBypass(false);
|
||||||
if (!(AddPid(Channel->Ppid(), ptPcr) && AddPid(Channel->Vpid(), ptVideo) && AddPid(Channel->Apid(0), ptAudio))) {
|
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);
|
esyslog("ERROR: failed to set PIDs for channel %d on device %d", Channel->Number(), CardIndex() + 1);
|
||||||
return false;
|
return false;
|
||||||
@ -910,7 +916,8 @@ void cDvbDevice::SetAudioTrackDevice(eTrackType Type)
|
|||||||
{
|
{
|
||||||
const tTrackId *TrackId = GetTrack(Type);
|
const tTrackId *TrackId = GetTrack(Type);
|
||||||
if (TrackId && TrackId->id) {
|
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) {
|
if (pidHandles[ptAudio].pid && pidHandles[ptAudio].pid != TrackId->id) {
|
||||||
DetachAll(pidHandles[ptAudio].pid);
|
DetachAll(pidHandles[ptAudio].pid);
|
||||||
pidHandles[ptAudio].pid = TrackId->id;
|
pidHandles[ptAudio].pid = TrackId->id;
|
||||||
|
@ -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.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
|
#ifndef __DVBDEVICE_H
|
||||||
@ -69,6 +69,8 @@ public:
|
|||||||
|
|
||||||
// PID handle facilities
|
// PID handle facilities
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool SetAudioBypass(bool On);
|
||||||
protected:
|
protected:
|
||||||
virtual bool SetPid(cPidHandle *Handle, int Type, bool On);
|
virtual bool SetPid(cPidHandle *Handle, int Type, bool On);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user