summaryrefslogtreecommitdiff
path: root/softhddevice.cpp
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2012-01-07 03:05:43 +0100
committerJohns <johns98@gmx.net>2012-01-07 03:05:43 +0100
commit45a34a33811123eaf8f3d35f246f79c9219a30a6 (patch)
tree4b4519eb7e5603b2c002a37caa23b1fb4851eeff /softhddevice.cpp
parent92ffd978b00e1d7138fc965edbf84032192f3fbd (diff)
downloadvdr-plugin-softhddevice-45a34a33811123eaf8f3d35f246f79c9219a30a6.tar.gz
vdr-plugin-softhddevice-45a34a33811123eaf8f3d35f246f79c9219a30a6.tar.bz2
Add support for ac3 audio pass through.
Diffstat (limited to 'softhddevice.cpp')
-rw-r--r--softhddevice.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/softhddevice.cpp b/softhddevice.cpp
index b87b422..ec65bf2 100644
--- a/softhddevice.cpp
+++ b/softhddevice.cpp
@@ -37,6 +37,7 @@ extern "C"
{
#include "video.h"
extern void AudioPoller(void);
+ extern void CodecSetAudioPassthrough(int);
}
//////////////////////////////////////////////////////////////////////////////
@@ -57,6 +58,7 @@ static int ConfigVideoDenoise; ///< config denoise
static int ConfigVideoSharpen; ///< config sharpen
static char ConfigVideoScaling; ///< config scaling
static int ConfigVideoAudioDelay; ///< config audio delay
+static int ConfigAudioPassthrough; ///< config audio pass-through
static volatile char DoMakePrimary; ///< flag switch primary
//////////////////////////////////////////////////////////////////////////////
@@ -273,6 +275,7 @@ class cMenuSetupSoft:public cMenuSetupPage
int Sharpen;
int Scaling;
int AudioDelay;
+ int AudioPassthrough;
protected:
virtual void Store(void);
public:
@@ -290,6 +293,9 @@ cMenuSetupSoft::cMenuSetupSoft(void)
static const char *const scaling[] = {
"Normal", "Fast", "HQ", "Anamorphic"
};
+ static const char *const passthrough[] = {
+ "None", "AC-3"
+ };
// cMenuEditBoolItem cMenuEditBitItem cMenuEditNumItem
// cMenuEditStrItem cMenuEditStraItem cMenuEditIntItem
@@ -313,6 +319,9 @@ cMenuSetupSoft::cMenuSetupSoft(void)
AudioDelay = ConfigVideoAudioDelay;
Add(new cMenuEditIntItem(tr("Audio delay (ms)"), &AudioDelay, -1000,
1000));
+ AudioPassthrough = ConfigAudioPassthrough;
+ Add(new cMenuEditStraItem(tr("Audio pass-through"), &AudioPassthrough, 2,
+ passthrough));
}
/**
@@ -334,6 +343,8 @@ void cMenuSetupSoft::Store(void)
VideoSetScaling(ConfigVideoScaling);
SetupStore("AudioDelay", ConfigVideoAudioDelay = AudioDelay);
VideoSetAudioDelay(ConfigVideoAudioDelay);
+ SetupStore("AudioPassthrough", ConfigAudioPassthrough = AudioPassthrough);
+ CodecSetAudioPassthrough(ConfigAudioPassthrough);
}
//////////////////////////////////////////////////////////////////////////////
@@ -837,6 +848,10 @@ bool cPluginSoftHdDevice::SetupParse(const char *name, const char *value)
VideoSetAudioDelay(ConfigVideoAudioDelay = atoi(value));
return true;
}
+ if (!strcmp(name, "AudioPassthrough")) {
+ CodecSetAudioPassthrough(ConfigAudioPassthrough = atoi(value));
+ return true;
+ }
return false;
}