diff options
author | Johns <johns98@gmx.net> | 2012-04-14 21:16:01 +0200 |
---|---|---|
committer | Johns <johns98@gmx.net> | 2012-04-14 21:16:01 +0200 |
commit | 2c52955ac0536c7b31b75f98fa44768050c1d809 (patch) | |
tree | c1d677f8771672999f699adda0da0f7a22506b12 /softhddev.c | |
parent | 09d858858874d714f4d66c5eff8118b40878902e (diff) | |
download | vdr-plugin-softhddevice-2c52955ac0536c7b31b75f98fa44768050c1d809.tar.gz vdr-plugin-softhddevice-2c52955ac0536c7b31b75f98fa44768050c1d809.tar.bz2 |
Adds detached start mode.
Diffstat (limited to 'softhddev.c')
-rw-r--r-- | softhddev.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/softhddev.c b/softhddev.c index 2df19c9..1f0a453 100644 --- a/softhddev.c +++ b/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; } /** |