Live tuning from DLNA IP client and stream disturbance
There seem to be some holes when streaming a live service to an IP client when disturbance in the stream occurs. By disturbance I mean tune unlock/lock, CA refusal etc.
Let's consider non-IP behavior first.
When you tune to a live service you do so with a ServiceContext and this can have listeners registered to handle disturbance. This can then be directed to an App that can show an OSD with either 'Please Wait' or 'You need to purchase this' etc. as it turns up as an ACEE.
Now, in an IP client there's no way we can get these events. The IP client doesn't have a context as such and the events aren't trapped by anything in the Stack for forwarding. So there's no way of telling the client that the stream is in trouble. And even if it did, what kind of event would we expect? DLNA? IP side channel?
Now, worse things happen. If you start RiExerciser and tune to the first channel and then publish it in the CDS and then use, for example, wget to start playback with this command:
You can start streaming to a file, just like a DLNA client. Now, login in to the telnet session and using the tuner diagnostics send an unlock event.
The download stops and closes the socket. That's because it thinks the stream has ended because the end-of-file is seen by the stack and that must mean the data is complete - but no! Not really.
OK, so now put a server side pause in the stream. And then inject an unlock event. And then a lock before the buffering ends and you'll see a bit of discontinuity. What should really happen here? Would we expect the server to fill with black, or join the streams together. And if there were some sort of event, what would it be?
The same can be said for CA Refusal, where the buffering stops when the CableCARD says no and the client reads to the end of the file.
In both cases, the client would expect to be able to rewind back into what they've just been watching.
And when an initial tune is created from the HTTP GET, would we expect a 401 if there's no lock or a CA Refusal or just black an event and then eventually data if it ever became available.
I've tried using the StreamingActivityListener and the provided NetworkInterface, but still can't quite get some way to stitch this all up.
Anyway, just something to think about.