mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Makes Workarounds command line configurable.
This commit is contained in:
parent
00cafd18ed
commit
8db8b68edd
4
audio.c
4
audio.c
@ -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) {
|
||||
if (!AudioAlsaDriverBroken) {
|
||||
Error(_("audio/alsa: broken driver %d\n"), avail);
|
||||
}
|
||||
usleep(5 * 1000);
|
||||
}
|
||||
}
|
||||
|
6
audio.h
6
audio.h
@ -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
|
||||
|
||||
/// @}
|
||||
|
19
softhddev.c
19
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 '-':
|
||||
|
Loading…
Reference in New Issue
Block a user