summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Hanisch <dvb@flensrocker.de>2010-03-14 16:43:41 +0100
committerLars Hanisch <dvb@flensrocker.de>2010-03-14 16:43:41 +0100
commitda4e4031e6af413d2d4bd400c8a66a5bdc36ea02 (patch)
tree1911837270e210c2d9601a6d294608e97034ba01
parent73d3a8400706a7703153e76463a905c8364a1cfa (diff)
downloadvdr-plugin-pvrinput-da4e4031e6af413d2d4bd400c8a66a5bdc36ea02.tar.gz
vdr-plugin-pvrinput-da4e4031e6af413d2d4bd400c8a66a5bdc36ea02.tar.bz2
add frequency as parameter to externchannelswitch.sh
This is possibly needed, because the SID now have a more important meaning. It is updated from the vdr in relation to the PAT/PMT so it's not a good idea to store important values there. Use the frequency.
-rw-r--r--README13
-rw-r--r--device.c4
-rwxr-xr-xexample/externchannelswitch.sh.example2
3 files changed, 15 insertions, 4 deletions
diff --git a/README b/README
index f8cf736..be6659a 100644
--- a/README
+++ b/README
@@ -117,9 +117,15 @@ And it's better to tell vdr the type of video (H.264 has a stream type of 27).
If you use the digital input of the box, you must switch the audio encoding to AAC even
if it gets AC3, for the RCA inputs you should set the encoding to AC3, since the vdr seems
to have diffibulties with handling AAC audio.
+The SID must be 1, since this is the program number in the PMT the device generates.
+For the frequency you can enter any value you want as long as it's distinct.
+It will be passed to the externchannelswitch-sh script.
-for example:
-HD PVR:1:PVRINPUT|COMPONENT:P:0:4113+4097=27:0;4352:0:0:2919:1:0:0
+for example (>= vdr 1.7.13):
+HD PVR:1:COMPONENT:P:0:4113+4097=27:0;4352:0:0:1:1:0:0
+
+for example (<= vdr 1.7.12):
+HD PVR:1:PVRINPUT|COMPONENT:P:0:4113+4097=27:0;4352:0:0:1:1:0:0
NID and TID can be 0. The following method is used by wirbelscan and w_scan
@@ -380,7 +386,7 @@ externchannelswitch
You may want to use a Digital Receiver connected to the external inputs of the
PVR device.
You can use more than one channels.conf entries for the same input, as long as the
-SID (Service-ID) is unique:
+combination of frequency, NID, TID and SID (Service-ID) is unique:
Digibox Channel 1:1:PVRINPUT|SVIDEO1:P:0:301=2:300:305:0:9001:0:0:0
Digibox Channel 10:1:PVRINPUT|SVIDEO1:P:0:301=2:300:305:0:9010:0:0:0
@@ -392,6 +398,7 @@ an external input, pvrinput will call this script with three arguments:
-SID
-vdr channel number
-card number (/dev/videoX) of the choosen PVR device
+-frequency
It is up to you what you want to do in this script. For example, you could
use the lirc irsend command. The scripts contains an exampe for usage of dct6200.
diff --git a/device.c b/device.c
index 30069dd..e52b39f 100644
--- a/device.c
+++ b/device.c
@@ -1051,7 +1051,9 @@ bool cPvrDevice::OpenDvr(void) {
}
if (PvrSetup.UseExternChannelSwitchScript) {
- cString cmd = cString::sprintf("%s %d %d %d", *externChannelSwitchScript, currentChannel.Sid(), currentChannel.Number(), number);
+ cString cmd = cString::sprintf("%s %d %d %d %d",
+ *externChannelSwitchScript, currentChannel.Sid(), currentChannel.Number(),
+ number, currentChannel.Frequency());
log(pvrDEBUG1, "OpenDvr: calling %s", *cmd);
if (system(*cmd) < 0) {
log(pvrERROR, "OpenDvr: executing %s failed", *cmd);
diff --git a/example/externchannelswitch.sh.example b/example/externchannelswitch.sh.example
index 76a57c7..5fe9117 100755
--- a/example/externchannelswitch.sh.example
+++ b/example/externchannelswitch.sh.example
@@ -8,6 +8,7 @@ DEBUG="true"
declare SID="$1"
declare VDRCHANNEL="$2"
declare VIDEONUMBER="$3"
+declare FREQUENCY="$4"
declare EXTERNCHANNEL
let "EXTERNCHANNEL = SID % 1000" #last three digits from SID without leading 0
@@ -17,5 +18,6 @@ if test "$DEBUG" == "true"; then
logger -s "DEBUG pvrinput externchannelswitch: Variable SID has value \"$SID\""
logger -s "DEBUG pvrinput externchannelswitch: Variable VDRCHANNEL has value \"$VDRCHANNEL\""
logger -s "DEBUG pvrinput externchannelswitch: Variable VIDEONUMBER has value \"$VIDEONUMBER\""
+ logger -s "DEBUG pvrinput externchannelswitch: Variable FREQUENCY has value \"$FREQUENCY\""
logger -s "DEBUG pvrinput externchannelswitch: Variable EXTERNCHANNEL has value \"$EXTERNCHANNEL\""
fi