switching in other parts of the code
Previously, the channel switching from the OSD dialog didn't check if there was a URL linked to the channel. If this is the case, the switching uses the PlayFile call. This is now consistent with the code in GUIWindowPVRCommon.
I've been investigating some more issues with channel switching in combination with the DVBLink addon and I'm a bit confused by all the different ways there are for switching channels.
Sometimes a switch is just executed as a PlayFile() call, while other times there's some more elaborate checking to see if the channel has a URL or not and then make a decision based on that.
The easiest way would of course be to 'just' use the PlayFile() call (which is what actually happens from CGUIDialogPVRGuideInfo), but there must be good reasons for implementing it different in the other places.
What is the preferred way?
use PlayFile() when nothing is playing, and ACTION_CHANNEL_SWITCH when a pvr stream is playing. PlayFile() will work, but it's slow as it always stop and restarts the player, which isn't always needed
Well, in this specific case, URLs are being used, which seems to imply there always needs to be a PlayFile() call. Some more digging seemed to indicate that the long delay I'm debugging may be caused by the 'CloseStream' in CPVRClients.SwitchChannel.
You may want to hold off on this PR until I've done some more research.
[PVR] Change to make switching channels behave better
I've researched this issue some further, and the slow channel changing seems to be caused by the 'early' closing of the stream when a URL-stream is being used. This seems to confuse the dvdplayer, where it keeps waiting until some timeout, sometimes up to 60 seconds. Moving the 'CloseStream' into the non-URL stream codepath fixes this issue for the DVBLink-based URL streams and doesn't change behaviour for the non-URL streams.
right that's nasty. got a patch?
Well, my patch is included in this pull request. Seems a safe way to go for me, just don't know if it's the best way...
right, thought you had some other patch and didn't read this one. sorry, was late :)