summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README1
-rw-r--r--device.c5
-rw-r--r--pvrinput.c1
-rw-r--r--setup.c1
-rw-r--r--setup.h1
5 files changed, 9 insertions, 0 deletions
diff --git a/README b/README
index be6659a..14eff92 100644
--- a/README
+++ b/README
@@ -331,6 +331,7 @@ pvrinput.StreamType = 0 //V4L2_MPEG_STREAM_TYPE_MPEG2_PS
pvrinput.TunerAudioMode = 4 //bilingual
pvrinput.UseOnlyCard = 8 //use all cards
pvrinput.UseExternChannelSwitchScript = 0 //don't call externchannelswitch.sh
+pvrinput.ExternChannelSwitchSleep = 0 //sleep x seconds after call of externchannelswitch.sh
pvrinput.VideoBitrateTV = 6000 //6 MBit/s
Using filters may increase the picture quality, but the default value of 8
diff --git a/device.c b/device.c
index 646bb1c..998ef48 100644
--- a/device.c
+++ b/device.c
@@ -1064,6 +1064,11 @@ bool cPvrDevice::OpenDvr(void) {
log(pvrERROR, "OpenDvr: executing %s failed", *cmd);
}
log(pvrDEBUG1, "OpenDvr: returned from %s", *cmd);
+ if (PvrSetup.ExternChannelSwitchSleep > 0) {
+ log(pvrDEBUG2, "OpenDvr: sleeping for %d seconds...", PvrSetup.ExternChannelSwitchSleep);
+ usleep(PvrSetup.ExternChannelSwitchSleep * 1000000);
+ log(pvrDEBUG2, "OpenDvr: waking up");
+ }
}
if (! SetInput(newInput)) return false;
diff --git a/pvrinput.c b/pvrinput.c
index 1d66d4c..be56ebc 100644
--- a/pvrinput.c
+++ b/pvrinput.c
@@ -121,6 +121,7 @@ bool cPluginPvrInput::SetupParse(const char * Name, const char * Value) {
else if (!strcasecmp(Name, "TsBufferSizeMB")) PvrSetup.TsBufferSizeMB = atoi(Value);
else if (!strcasecmp(Name, "TsBufferPrefillRatio")) PvrSetup.TsBufferPrefillRatio = atoi(Value);
else if (!strcasecmp(Name, "UseExternChannelSwitchScript")) PvrSetup.UseExternChannelSwitchScript = atoi(Value);
+ else if (!strcasecmp(Name, "ExternChannelSwitchSleep")) PvrSetup.ExternChannelSwitchSleep = atoi(Value);
else if (!strcasecmp(Name, "HDPVR_AudioEncoding")) PvrSetup.HDPVR_AudioEncoding.value = atoi(Value) + 3;
else if (!strcasecmp(Name, "HDPVR_AudioInput")) PvrSetup.HDPVR_AudioInput = atoi(Value);
else
diff --git a/setup.c b/setup.c
index 3019fa1..dc1e1a1 100644
--- a/setup.c
+++ b/setup.c
@@ -9,6 +9,7 @@ cPvrSetup::cPvrSetup(void) {
AudioVolumeTVExceptionCard = 8; // AudioVolumeTVCommon for all cards
SliceVBI = 1; // Slice VBI data into mpeg stream
UseExternChannelSwitchScript = 0; // don't call externchannelswitch.sh on external inputs
+ ExternChannelSwitchSleep = 0; // sleep x seconds after call of externchannelswitch.sh
TsBufferSizeMB = 3; // ring buffer size
TsBufferPrefillRatio = 0; // wait with delivering packets to vdr till buffer is filled
/* first initialization of all v4l2 controls,
diff --git a/setup.h b/setup.h
index 1ba2dd1..d1a746e 100644
--- a/setup.h
+++ b/setup.h
@@ -19,6 +19,7 @@ public:
int SliceVBI;
int AudioVolumeTVExceptionCard;
int UseExternChannelSwitchScript;
+ int ExternChannelSwitchSleep;
int TsBufferSizeMB;
int TsBufferPrefillRatio;
valSet Brightness;