From 36b285b5f7351836f0ad6a364c3d4743549a99c7 Mon Sep 17 00:00:00 2001 From: Johns Date: Mon, 19 Dec 2011 17:03:40 +0100 Subject: Audio/video sync improvements. Configurable audio delay. Use monotonic pts. Support old libav or ffmpeg libraries. --- softhddevice.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'softhddevice.cpp') diff --git a/softhddevice.cpp b/softhddevice.cpp index 260cc5f..ff675c9 100644 --- a/softhddevice.cpp +++ b/softhddevice.cpp @@ -51,6 +51,7 @@ static class cSoftHdDevice *MyDevice; static char ConfigMakePrimary; ///< config primary wanted static char ConfigVideoDeinterlace; ///< config deinterlace static char ConfigVideoScaling; ///< config scaling +static int ConfigVideoAudioDelay; ///< config audio delay static char DoMakePrimary; ///< flag switch primary ////////////////////////////////////////////////////////////////////////////// @@ -261,6 +262,7 @@ class cMenuSetupSoft:public cMenuSetupPage int MakePrimary; int Deinterlace; int Scaling; + int AudioDelay; protected: virtual void Store(void); public: @@ -286,6 +288,8 @@ cMenuSetupSoft::cMenuSetupSoft(void) Add(new cMenuEditStraItem(tr("Deinterlace"), &Deinterlace, 5, deinterlace)); Scaling = ConfigVideoScaling; Add(new cMenuEditStraItem(tr("Scaling"), &Scaling, 4, scaling)); + AudioDelay = ConfigVideoAudioDelay; + Add(new cMenuEditIntItem(tr("Audio delay (ms)"), &AudioDelay, -1000, 1000)); } /** @@ -298,6 +302,8 @@ void cMenuSetupSoft::Store(void) VideoSetDeinterlace(ConfigVideoDeinterlace); SetupStore("Scaling", ConfigVideoScaling = Scaling); VideoSetScaling(ConfigVideoScaling); + SetupStore("AudioDelay", ConfigVideoAudioDelay = AudioDelay); + VideoSetAudioDelay(ConfigVideoAudioDelay); } ////////////////////////////////////////////////////////////////////////////// @@ -766,6 +772,10 @@ bool cPluginSoftHdDevice::SetupParse(const char *name, const char *value) VideoSetScaling(ConfigVideoScaling = atoi(value)); return true; } + if (!strcmp(name, "AudioDelay")) { + VideoSetAudioDelay(ConfigVideoAudioDelay = atoi(value)); + return true; + } return false; } -- cgit v1.2.3