Posts: 6,255
Joined: Jun 2009
Reputation:
115
da-anda
Team-Kodi Member
Posts: 6,255
depends on the UPNP server I guess. I'm not using UPNP myself yet, so can't tell. Just give it a shoot and enable the UPNP server in XBMC and use it from another XBMC or mount it to itself to see what's currently possible.
Posts: 3,077
Joined: Jun 2009
Hi there,
Before starting to dig in Xbmc UPNP code I'm wondering if it's possible to generate upnp url that can be read by a renderer without going through the complete upnp negotiation ?
I suppose url like upnp://uuid would not but perhaps via the http service this is possible or does the protocol does not allow that.
The underlying idea is to add the missing link beetween JSON and UPNP for example watch content on tablets without browsing via upnp or push to a renderer.
Posts: 3,077
Joined: Jun 2009
Yes I have seen that in the code but I guess if we use BuildSafeResourceUri it will fill the hash map so then the uPnp server can server the file ?
The goal is not to store those url it's to query for example the now playing item via JSON gets the uPnp url and fill the upnp server, so then the user can continue watching the now playing item on his phone.
From what I have read in the code I can get the UUID and the uri and generate an url like upnp://uudi/%25%/MD5/ but is this url enough for a player to render it ?
Posts: 265
Joined: Feb 2008
Reputation:
6
2013-03-08, 19:22
(This post was last modified: 2013-03-08, 19:23 by alcoheca.)
Are you talking about trying to switch the current playing item on an xbmc player onto a different non-upnp player?
EDIT: As switching to another UPnP device is planned already and will not use JSON.
Posts: 3,077
Joined: Jun 2009
This was a sample but to an upnp compatible player.
The goal it to try to add the missing link between upnp and JSON.
JSON is the protocol to browse all the app content get now playing, playlist and such but there's no way to then start those content on an upnp player.
Posts: 3,077
Joined: Jun 2009
Well I guess that you don't understand the need
The problem is not for me to implement an Upnp library or play with JSON what I was talking about is to extend JSON Api in Xbmc, I have already made a few PR and was more looking to propose more.
Xbmc have a database with item and ID, remotes can get those without any problems via JSON, but they can't start the playing of those items anywhere else than on Xbmc itself since JSON and current HTTP implementation does not support streaming (mainly because of the lack of support of Partial Content and Range Request).
So Upnp is the only link left for that. So the need is how to link the JSON object to TransportUI served by Xbmc Upnp server itself.
Since we can advertise by JSON the uuid or any upnp needed field that uniquely identify this server starting the media and the negotiation after is not the problem either.
A very simple need that would open great things for remote makers.
Posts: 265
Joined: Feb 2008
Reputation:
6
Now that I understand what you're suggesting, you need to rethink your approach.
The "http://hostname:port/%25/<path sha5>/filename.ext" you're trying to piece together is dynamic and could/should be specific to the client. It is only valid once a client browses the library.
Your best bet is creating a JSON RPC which plays a library item on another UPnP renderer. The code to play media on another renderer is in trunk. That way you can deal with just library IDs, and some enumeration of available players.
Posts: 3,077
Joined: Jun 2009
Well this would solve a part of the problem but not to start the media on a phone where the upnp client would be started after the command
Posts: 265
Joined: Feb 2008
Reputation:
6
Yes it does.
xbmc starts.
remote browses
phone starts
remote requests playback of media on phone - the RPC I was talking about
xbmc starts playback on phone
Clearly the phone needs to be on when the remote requests playback on the phone