summaryrefslogtreecommitdiff
path: root/softhddevice.cpp
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2012-04-20 18:28:25 +0200
committerJohns <johns98@gmx.net>2012-04-20 18:28:25 +0200
commitd26c34f34f77b860b2ac7faf0fda914ca2eeb39b (patch)
tree8057b11a263ac54bd3d7272a3aeb3deeb013f0a0 /softhddevice.cpp
parent24a8c7f763050a1054eef2f13faa9e584052fe8d (diff)
downloadvdr-plugin-softhddevice-d26c34f34f77b860b2ac7faf0fda914ca2eeb39b.tar.gz
vdr-plugin-softhddevice-d26c34f34f77b860b2ac7faf0fda914ca2eeb39b.tar.bz2
Always compile audio drift correction.
Add audio drift correction configuration to the setup.
Diffstat (limited to 'softhddevice.cpp')
-rw-r--r--softhddevice.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/softhddevice.cpp b/softhddevice.cpp
index 955a520..70eb4d0 100644
--- a/softhddevice.cpp
+++ b/softhddevice.cpp
@@ -39,6 +39,7 @@ extern "C"
#include "video.h"
extern const char *X11DisplayName; ///< x11 display name
+ extern void CodecSetAudioDrift(int);
extern void CodecSetAudioPassthrough(int);
extern void CodecSetAudioDownmix(int);
}
@@ -114,8 +115,9 @@ static int ConfigAutoCropDelay; ///< auto crop detection delay
static int ConfigAutoCropTolerance; ///< auto crop detection tolerance
static int ConfigVideoAudioDelay; ///< config audio delay
-static int ConfigAudioPassthrough; ///< config audio pass-through
-static int ConfigAudioDownmix; ///< config ffmpeg audio downmix
+static char ConfigAudioDrift; ///< config audio drift
+static char ConfigAudioPassthrough; ///< config audio pass-through
+static char ConfigAudioDownmix; ///< config ffmpeg audio downmix
static char ConfigAudioSoftvol; ///< config use software volume
static char ConfigAudioNormalize; ///< config use normalize volume
static int ConfigAudioMaxNormalize; ///< config max normalize factor
@@ -509,6 +511,7 @@ class cMenuSetupSoft:public cMenuSetupPage
int Audio;
int AudioDelay;
+ int AudioDrift;
int AudioPassthrough;
int AudioDownmix;
int AudioSoftvol;
@@ -581,6 +584,9 @@ void cMenuSetupSoft::Create(void)
static const char *const scaling[] = {
"Normal", "Fast", "HQ", "Anamorphic"
};
+ static const char *const audiodrift[] = {
+ "None", "PCM", "AC-3", "PCM + AC-3"
+ };
static const char *const passthrough[] = {
"None", "AC-3"
};
@@ -687,6 +693,8 @@ void cMenuSetupSoft::Create(void)
if (Audio) {
Add(new cMenuEditIntItem(tr("Audio/Video delay (ms)"), &AudioDelay,
-1000, 1000));
+ Add(new cMenuEditStraItem(tr("Audio drift correction"),
+ &AudioDrift, 4, audiodrift));
Add(new cMenuEditStraItem(tr("Audio pass-through"), &AudioPassthrough,
2, passthrough));
Add(new cMenuEditBoolItem(tr("Enable AC-3 downmix"), &AudioDownmix,
@@ -809,6 +817,7 @@ cMenuSetupSoft::cMenuSetupSoft(void)
//
Audio = 0;
AudioDelay = ConfigVideoAudioDelay;
+ AudioDrift = ConfigAudioDrift;
AudioPassthrough = ConfigAudioPassthrough;
AudioDownmix = ConfigAudioDownmix;
AudioSoftvol = ConfigAudioSoftvol;
@@ -904,6 +913,8 @@ void cMenuSetupSoft::Store(void)
SetupStore("AudioDelay", ConfigVideoAudioDelay = AudioDelay);
VideoSetAudioDelay(ConfigVideoAudioDelay);
+ SetupStore("AudioDrift", ConfigAudioDrift = AudioDrift);
+ CodecSetAudioDrift(ConfigAudioDrift);
SetupStore("AudioPassthrough", ConfigAudioPassthrough = AudioPassthrough);
CodecSetAudioPassthrough(ConfigAudioPassthrough);
SetupStore("AudioDownmix", ConfigAudioDownmix = AudioDownmix);
@@ -2014,6 +2025,10 @@ bool cPluginSoftHdDevice::SetupParse(const char *name, const char *value)
VideoSetAudioDelay(ConfigVideoAudioDelay = atoi(value));
return true;
}
+ if (!strcasecmp(name, "AudioDrift")) {
+ CodecSetAudioDrift(ConfigAudioDrift = atoi(value));
+ return true;
+ }
if (!strcasecmp(name, "AudioPassthrough")) {
CodecSetAudioPassthrough(ConfigAudioPassthrough = atoi(value));
return true;