summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2012-07-03 15:48:44 +0200
committerJohns <johns98@gmx.net>2012-07-03 15:48:44 +0200
commite6ce7832bac42cd35119bfd06343fb4042c96939 (patch)
treef719eb08431c724013eead4b2a2a23a05b27fe36
parent696bb8e934bc8bd9c73df4f954d74e926dbeeadb (diff)
downloadvdr-plugin-softhddevice-e6ce7832bac42cd35119bfd06343fb4042c96939.tar.gz
vdr-plugin-softhddevice-e6ce7832bac42cd35119bfd06343fb4042c96939.tar.bz2
Add commandline support to disable hardware decoder.
-rw-r--r--ChangeLog1
-rw-r--r--softhddev.c2
-rw-r--r--video.c3
-rw-r--r--video.h1
4 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1948e42..14ba552 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@ User johns
Date:
Release Version 0.5.1
+ Add commandline support to disable hardware decoder.
Display frame statistics in plugin menu.
Fix bug: 100% CPU use during playback.
Fix bug: audio use 100% CPU during pause.
diff --git a/softhddev.c b/softhddev.c
index 849835e..7860198 100644
--- a/softhddev.c
+++ b/softhddev.c
@@ -2352,7 +2352,9 @@ int ProcessArgs(int argc, char *const argv[])
continue;
case 'w': // workarounds
if (!strcasecmp("no-hw-decoder", optarg)) {
+ VideoHardwareDecoder = 0;
} else if (!strcasecmp("no-mpeg-hw-decoder", optarg)) {
+ VideoHardwareDecoder = 1;
} else if (!strcasecmp("alsa-driver-broken", optarg)) {
AudioAlsaDriverBroken = 1;
} else if (!strcasecmp("ignore-repeat-pict", optarg)) {
diff --git a/video.c b/video.c
index 48543de..62440d1 100644
--- a/video.c
+++ b/video.c
@@ -298,7 +298,7 @@ static const VideoModule NoopModule; ///< forward definition of noop module
/// selected video module
static const VideoModule *VideoUsedModule = &NoopModule;
-static char VideoHardwareDecoder; ///< flag use hardware decoder
+char VideoHardwareDecoder = -1; ///< flag use hardware decoder
static char VideoSurfaceModesChanged; ///< flag surface modes changed
@@ -10380,7 +10380,6 @@ void VideoInit(const char *display_name)
found:
// FIXME: make it configurable from gui
- VideoHardwareDecoder = -1;
if (getenv("NO_MPEG_HW")) {
VideoHardwareDecoder = 1;
}
diff --git a/video.h b/video.h
index 9624e2d..2ad261d 100644
--- a/video.h
+++ b/video.h
@@ -34,6 +34,7 @@ typedef struct _video_hw_decoder_ VideoHwDecoder;
// Variables
//----------------------------------------------------------------------------
+extern char VideoHardwareDecoder; ///< flag use hardware decoder
extern char VideoIgnoreRepeatPict; ///< disable repeat pict warning
extern int VideoAudioDelay; ///< audio/video delay