I have a PVR500 with the PVRInput plugin running on my Backend.
I am using an old Hauppauge FF DVB-s card just as a frontend on another low powered system in order to throw the PVRInput channels to the kitchen. On the backend it's all working, however, switching between channels doesn't quite work, as the streamdev server will give the client the same channel over and over again regardless of what it requested, unless the device changes (ie, if I go from /dev/video1 to /dev/video2 it'll change channel).
how do you force switching the video device?
An example of the channel list is:
2-WTTW PBS_Affiliate ntsc;WTTW:67250:TV|NTSC:V:0:301+101=2:300=@4:0:0:30020:32:32:0 3-WREX NBC_Affiliate ntsc;WREX:67250:TV|NTSC:V:0:301+101=2:300=@4:305:0:30030:48:48:0 4-WTVO ABC_Affiliate ntsc;WTVO:67250:TV|NTSC:V:0:301+101=2:300=@4:0:0:30040:64:64:0 5-WIFR CBS_Affiliate ntsc;WIFR:67250:TV|NTSC:V:0:301+101=2:300=@4:0:0:30050:80:80:0 6-WQRF Fox_Affiliate ntsc;WQRF:67250:TV|NTSC:V:0:301+101=2:300=@4:0:0:30060:96:96:0
But, obviously all on the same line. I think this is probably an issue with streamdev rather than pvrinput as it works with Vomp happily.
I need it to detach and change channel in order to trigger the external channel changer script.
pvrinput does its channel settings (this includes executing the externchannelswitch-script) inside its function OpenDvr() while the encoder is still stopped. The settings will only be done if the bool ChannelSettingsDone is false. This bool is always false at first plugin start. I guess this is the reason why your channel settings were done once:
Jun 7 19:13:24 oac vdr: [8795] entering cPvrDevice::OpenDvr: Dvr of /dev/video1 (PVR500#1) is closed Jun 7 19:13:24 oac vdr: [8795] entering cPvrDevice::CloseDvr: Dvr of /dev/video1 (PVR500#1) is closed Jun 7 19:13:24 oac vdr: [8795] cPvrDevice::ResetBuffering(): tsBuffer prefill = 314524 for /dev/video1 (PVR500#1) Jun 7 19:13:24 oac vdr: [8795] channel is television. Jun 7 19:13:24 oac vdr: [8795] OpenDvr: calling /etc/vdr/plugins/pvrinput/externchannelswitch.sh 30040 4 1 67250 Jun 7 19:13:25 oac vdr: [8795] OpenDvr: returned from /etc/vdr/plugins/pvrinput/externchannelswitch.sh 30040 4 1 67250 Jun 7 19:13:25 oac vdr: [8795] OpenDvr: sleeping for 3 seconds... Jun 7 19:13:28 oac vdr: [8795] OpenDvr: waking up Jun 7 19:13:28 oac vdr: [8795] SetVBImode(525, 0) on /dev/video1
When leaving OpenDvr, the bool is set to true. It will only become false again during runtime, if vdr calls the pvrinput- function SetChannelDevice() and determines the needed settings.
And this is your problem. There are no debug messages from pvrinput's SetChannelDevice() or ProvidesChannel(), so vdr never calls these pvrinput functions - although a channel switch for a pvrinput device is requested.
But why? I have no idea. It works for you with vomp. It worked for me with streamdev when I tested this last year. But I had only streamdev-server running and used vlc to switch channels.
Maybe a streamdev developer reads this and has an idea or can explain possible interactions between streamdev-client, vdr and a receiving device.
On Wed, 8 Jun 2011 20:43:38 +0200, Martin Dauskardt wrote
When leaving OpenDvr, the bool is set to true. It will only become false again during runtime, if vdr calls the pvrinput- function SetChannelDevice() and determines the needed settings.
And this is your problem. There are no debug messages from pvrinput's SetChannelDevice() or ProvidesChannel(), so vdr never calls these pvrinput functions - although a channel switch for a pvrinput device is requested.
But why? I have no idea. It works for you with vomp. It worked for me with streamdev when I tested this last year. But I had only streamdev-server running and used vlc to switch channels.
Streamdev-client won't forward calls to SetChannelDevice and ProvidesChannel to the server, if the current channel and the requested new channel are on the same transponder. Instead it will just go ahead and later add the PIDs of the new channel to the current connection.
Pvrinput obviously uses the same frequencies (i.e. transponder) and even the same PIDs for different channels, so streamdev-clients current behaviour is bound to fail. According to an other posting in this thread, it is not possible to use different frequencies, so it seems the problem needs to be fixed in streamdev-client. Please try the following patch:
--- a/common.h +++ b/common.h @@ -23,7 +23,7 @@ # define Dprintf(x...) #endif
-#define TRANSPONDER(c1, c2) (c1->Transponder() == c2->Transponder()) +#define TRANSPONDER(c1, c2) (c1->Transponder() == c2->Transponder() && !c1->IsSourceType('V'))
#define MAXPARSEBUFFER KILOBYTE(16)
AFAIKT the problem is streamdev-client only. So HTTP streaming with e.g. VLC is not affected.
Regards, Frank
On 06/10/2011 02:26 AM, Frank Schmirler wrote:
On Wed, 8 Jun 2011 20:43:38 +0200, Martin Dauskardt wrote
When leaving OpenDvr, the bool is set to true. It will only become false again during runtime, if vdr calls the pvrinput- function SetChannelDevice() and determines the needed settings.
And this is your problem. There are no debug messages from pvrinput's SetChannelDevice() or ProvidesChannel(), so vdr never calls these pvrinput functions - although a channel switch for a pvrinput device is requested.
But why? I have no idea. It works for you with vomp. It worked for me with streamdev when I tested this last year. But I had only streamdev-server running and used vlc to switch channels.
Streamdev-client won't forward calls to SetChannelDevice and ProvidesChannel to the server, if the current channel and the requested new channel are on the same transponder. Instead it will just go ahead and later add the PIDs of the new channel to the current connection.
Pvrinput obviously uses the same frequencies (i.e. transponder) and even the same PIDs for different channels, so streamdev-clients current behaviour is bound to fail. According to an other posting in this thread, it is not possible to use different frequencies, so it seems the problem needs to be fixed in streamdev-client. Please try the following patch:
--- a/common.h +++ b/common.h @@ -23,7 +23,7 @@ # define Dprintf(x...) #endif
-#define TRANSPONDER(c1, c2) (c1->Transponder() == c2->Transponder()) +#define TRANSPONDER(c1, c2) (c1->Transponder() == c2->Transponder()&& !c1->IsSourceType('V'))
#define MAXPARSEBUFFER KILOBYTE(16)
AFAIKT the problem is streamdev-client only. So HTTP streaming with e.g. VLC is not affected.
I need to put something else somewhere else:
g++ -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses -fPIC -c -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DCONFDIR="/etc/vdr" -DUSE_ALTERNATECHANNEL -DUSE_CHANNELBIND -DUSE_MCLI -DUSE_PINPLUGIN -DUSE_PLUGINMISSING -DUSE_YAEPG -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"streamdev-client"' -I/usr/include -I/usr/include/vdr/include -I.. -I/usr/include/vdr -o device.o device.c device.c: In member function ‘virtual bool cStreamdevDevice::IsTunedToTransponder(const cChannel*)’: device.c:78:14: error: expected ‘;’ before ‘->’ token device.c:80:13: warning: statement has no effect device.c:78:7: error: label ‘Channel’ used but not defined device.c: In member function ‘virtual bool cStreamdevDevice::ProvidesChannel(const cChannel*, int, bool*) const’: device.c:109:38: error: expected primary-expression before ‘)’ token device.c:109:38: error: expected ‘;’ before ‘)’ token device.c: In member function ‘virtual bool cStreamdevDevice::SetChannelDevice(const cChannel*, bool)’: device.c:135:14: error: expected ‘;’ before ‘->’ token device.c:137:14: warning: statement has no effect device.c:135:7: error: label ‘Channel’ used but not defined make[1]: *** [device.o] Error 1 make[1]: Leaving directory `/usr/src/vdr-src/vdr-plugin-streamdev/client' make: *** [client] Error 2
On 06/10/2011 07:12 PM, Rob Davis wrote:
AFAIKT the problem is streamdev-client only. So HTTP streaming with e.g. VLC is not affected.
I need to put something else somewhere else:
Ooops, my fault. I forgot to take a bracket out.
Patch works..