diff options
| author | Lars Hanisch <dvb@flensrocker.de> | 2010-03-17 20:12:36 +0100 |
|---|---|---|
| committer | Lars Hanisch <dvb@flensrocker.de> | 2010-03-17 20:12:36 +0100 |
| commit | 74b2bcef2a7c9576a4c841d8a1d256cb59f4acc1 (patch) | |
| tree | 55dc06422f9415ae4d0e00bb77bc97bafadf7996 | |
| parent | c71752e240b8739eefa182f0c1ab8b497a1f8032 (diff) | |
| download | vdr-plugin-pvrinput-74b2bcef2a7c9576a4c841d8a1d256cb59f4acc1.tar.gz vdr-plugin-pvrinput-74b2bcef2a7c9576a4c841d8a1d256cb59f4acc1.tar.bz2 | |
Add optional sleep after call of externchannelswitch.sh
Some cards like the HD PVR needs some time to stabilize the video stream.
On some installations a sleep in the external script doesn't seem to work.
| -rw-r--r-- | README | 1 | ||||
| -rw-r--r-- | device.c | 5 | ||||
| -rw-r--r-- | pvrinput.c | 1 | ||||
| -rw-r--r-- | setup.c | 1 | ||||
| -rw-r--r-- | setup.h | 1 |
5 files changed, 9 insertions, 0 deletions
@@ -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 @@ -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; @@ -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 @@ -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, @@ -19,6 +19,7 @@ public: int SliceVBI; int AudioVolumeTVExceptionCard; int UseExternChannelSwitchScript; + int ExternChannelSwitchSleep; int TsBufferSizeMB; int TsBufferPrefillRatio; valSet Brightness; |
