mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Adds detached start mode.
This commit is contained in:
parent
09d8588588
commit
2c52955ac0
@ -1,6 +1,7 @@
|
||||
User johns
|
||||
Date:
|
||||
|
||||
Adds detached start mode.
|
||||
Fix bug: VDPAU looses preemption callback.
|
||||
Fix bug: X11 server keeps sending USR1 signals, which confuses suspend.
|
||||
Show message for hot-keys.
|
||||
|
16
softhddev.c
16
softhddev.c
@ -2198,7 +2198,8 @@ const char *CommandLineHelp(void)
|
||||
"\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"
|
||||
"\tignore-repeat-pict\tdisable repeat pict message\n";
|
||||
"\tignore-repeat-pict\tdisable repeat pict message\n"
|
||||
" -D\t\tstart in detached mode\n";
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2250,6 +2251,9 @@ int ProcessArgs(int argc, char *const argv[])
|
||||
case 's': // start in suspend mode
|
||||
ConfigStartSuspended = 1;
|
||||
continue;
|
||||
case 'D': // start in detached mode
|
||||
ConfigStartSuspended = -1;
|
||||
continue;
|
||||
case 'w': // workarounds
|
||||
if (!strcasecmp("no-hw-decoder", optarg)) {
|
||||
} else if (!strcasecmp("no-mpeg-hw-decoder", optarg)) {
|
||||
@ -2440,6 +2444,10 @@ void SoftHdDeviceExit(void)
|
||||
|
||||
/**
|
||||
** Prepare plugin.
|
||||
**
|
||||
** @retval 0 normal start
|
||||
** @retval 1 suspended start
|
||||
** @retval -1 detached start
|
||||
*/
|
||||
int Start(void)
|
||||
{
|
||||
@ -2469,9 +2477,11 @@ int Start(void)
|
||||
#ifndef NO_TS_AUDIO
|
||||
PesInit(PesDemuxAudio);
|
||||
#endif
|
||||
Info(_("[softhddev] ready%s\n"), ConfigStartSuspended ? " suspended" : "");
|
||||
Info(_("[softhddev] ready%s\n"),
|
||||
ConfigStartSuspended ? ConfigStartSuspended ==
|
||||
-1 ? "detached" : " suspended" : "");
|
||||
|
||||
return !ConfigStartSuspended;
|
||||
return ConfigStartSuspended;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1537,10 +1537,18 @@ bool cPluginSoftHdDevice::Start(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (!::Start()) {
|
||||
cControl::Launch(new cSoftHdControl);
|
||||
cControl::Attach();
|
||||
SuspendMode = SUSPEND_NORMAL;
|
||||
switch (::Start()) {
|
||||
case 1:
|
||||
cControl::Launch(new cSoftHdControl);
|
||||
cControl::Attach();
|
||||
SuspendMode = SUSPEND_NORMAL;
|
||||
break;
|
||||
case -1:
|
||||
SuspendMode = SUSPEND_DETACHED;
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user