Page 1 of 1

Extension to the plugin api

PostPosted: Tue Jan 31, 2012 3:16 pm
by crowly
I've been looking at adding a plugin to support the iptv gateway we use. However I could do with an extension to the plugin api (it could done as a new type of plugin).

Firstly the method extractItems() needs to be called for each UPnP client, with information about each client passed to the method. This is needed as the iptv gateway has a different list of channels based on the calling ip addr, and also a different list of recordings based on the calling ip.

Secondly a method that is called for each item a UPnP client plays would need to be added. This method would allow the plugin handle the actual network streaming, the method would need to be passed all the details about the request (quality, stream off-set etc) and well as the details about the client (ip, profile etc). This method could call an inherited method with chunked data that the method has streamed.

These extensions would make it possible to add support for the iptv gateway we use (and many others), as well as allowing many more classes of network service to be wrapped via a plugin and served to UPnP clients.

Re: Extension to the plugin api

PostPosted: Tue Jan 31, 2012 5:21 pm
by zip
could you not do it in a static way by passing a predefined set of attributes in the resource URL?

Like: http://mystreamip:port/something?param1=bla&param2=bla2

You could then get the param values in extractItems() and possibly pass down to the per-item extraction method

Re: Extension to the plugin api

PostPosted: Wed Feb 01, 2012 10:59 am
by crowly
This unfortunately will not work, unless extractItem is passed details about the client ip (i.e. the ip of the UPnP tv requesting the list of items). The call to the iptv would be in the form http://ip/simpleproxy.php?clientip=IP&c ... hannellist so the data would be needed to provided the data for clientip.

Also the iptv gateways streaming format (unicast and multicast udp) is not supported by serviio, which is why I would need the plugin to have the ability to handle the network streaming.

Re: Extension to the plugin api

PostPosted: Wed Feb 01, 2012 11:23 am
by zip
this does not fit in, at the time the plugin is invoked Serviio doesn't know anything about the clients, current or future.

Re: Extension to the plugin api

PostPosted: Wed Feb 01, 2012 11:40 am
by crowly
Any chance of adding the network streaming methods ?

As a could serve only the content that is available to all.

Re: Extension to the plugin api

PostPosted: Wed Feb 01, 2012 11:53 am
by zip
It's the same, plugin is processed long time before the content is played.

Re: Extension to the plugin api

PostPosted: Wed Feb 01, 2012 11:57 am
by crowly
I take it that a reference to the source plugin is lost once the list of items it returned.

Re: Extension to the plugin api

PostPosted: Wed Feb 01, 2012 12:52 pm
by zip
the plugin is processed first, rsults stored in a cache and when you actually browse on the TV it uses the cached objects rather than invoking the plugin again

Re: Extension to the plugin api

PostPosted: Wed Feb 01, 2012 12:56 pm
by crowly
I see, I take it having a plugin class that is called per request for the title list is not an easy thing to accomplish.

Re: Extension to the plugin api

PostPosted: Wed Feb 01, 2012 1:01 pm
by zip
that would be a different kind of plugins with a different API and it's not in the scope ATM