diff options
author | Johns <johns98@gmx.net> | 2012-02-04 16:38:10 +0100 |
---|---|---|
committer | Johns <johns98@gmx.net> | 2012-02-04 16:38:10 +0100 |
commit | 8db8b68edd6043b73fbe601a9567b0d4979b7195 (patch) | |
tree | dbf6c95913d86844ba928fce6a685115804d8f74 | |
parent | 00cafd18edd2b5624c8ba8f7f2924b1fb1e1644c (diff) | |
download | vdr-plugin-softhddevice-8db8b68edd6043b73fbe601a9567b0d4979b7195.tar.gz vdr-plugin-softhddevice-8db8b68edd6043b73fbe601a9567b0d4979b7195.tar.bz2 |
Makes Workarounds command line configurable.
-rw-r--r-- | audio.c | 6 | ||||
-rw-r--r-- | audio.h | 6 | ||||
-rw-r--r-- | softhddev.c | 19 |
3 files changed, 28 insertions, 3 deletions
@@ -123,6 +123,8 @@ static const AudioModule NoopModule; ///< forward definition of noop module // Variables //---------------------------------------------------------------------------- +char AudioAlsaDriverBroken; ///< disable broken driver message + static const char *AudioModuleName; ///< which audio module to use /// Selected audio module. @@ -334,7 +336,9 @@ static int AlsaPlayRingbuffer(void) if (first) { // happens with broken alsa drivers if (AudioThread) { - Error(_("audio/alsa: broken driver %d\n"), avail); + if (!AudioAlsaDriverBroken) { + Error(_("audio/alsa: broken driver %d\n"), avail); + } usleep(5 * 1000); } } @@ -47,4 +47,10 @@ extern void AudioSetDeviceAC3(const char *); ///< set Passthrough device extern void AudioInit(void); ///< setup audio module extern void AudioExit(void); ///< cleanup and exit audio module +//---------------------------------------------------------------------------- +// Variables +//---------------------------------------------------------------------------- + +extern char AudioAlsaDriverBroken; ///< disable broken driver message + /// @} diff --git a/softhddev.c b/softhddev.c index 8dadd84..32a21b9 100644 --- a/softhddev.c +++ b/softhddev.c @@ -1165,7 +1165,11 @@ const char *CommandLineHelp(void) " -d display\tdisplay of x11 server (fe. :0.0)\n" " -f\t\tstart with fullscreen window (only with window manager)\n" " -g geometry\tx11 window geometry wxh+x+y\n" - " -x\t\tstart x11 server\n" " -s\t\tstart in suspended mode\n"; + " -x\t\tstart x11 server\n" " -s\t\tstart in suspended mode\n" + " -w workaround\tenable/disable workarounds\n" + "\tno-hw-decoder\t\tdisable hw decoder, use software decoder only\n" + "\tno-mpeg-hw-decoder\tdisable hw decoder for mpeg only\n" + "\talsa-driver-broken\tdisable broken alsa driver message\n"; } /** @@ -1180,7 +1184,7 @@ int ProcessArgs(int argc, char *const argv[]) // Parse arguments. // for (;;) { - switch (getopt(argc, argv, "-a:p:d:fg:xs")) { + switch (getopt(argc, argv, "-a:d:fg:p:sw:x")) { case 'a': // audio device AudioSetDevice(optarg); continue; @@ -1207,6 +1211,17 @@ int ProcessArgs(int argc, char *const argv[]) case 's': // start in suspend mode ConfigStartSuspended = 1; continue; + case 'w': // workarounds + if (!strcasecmp("no-hw-decoder", optarg)) { + } else if (!strcasecmp("no-mpeg-hw-decoder", optarg)) { + } else if (!strcasecmp("alsa-driver-broken", optarg)) { + AudioAlsaDriverBroken = 1; + } else { + fprintf(stderr, _("Workaround '%s' unsupported\n"), + optarg); + return 0; + } + continue; case EOF: break; case '-': |