SoK : UPnP Media Server and Client; Its integration into PlasmaMediacenter
It’s been a long time since I wrote my last post. In my last post, I had described my SoK project, how DLNA/UPnP media client works and my plans about implementing DLNA/UPnP media server.
If you have not read my previous post, then here you go.
I have completed the implementation of both DLNA/UPnP Media Server and Client as standalone applications and I have merged these applications into the plasma-mediacenter too but some errors are yet to be resolved related to C wrappers in C++
So, I currently can’t show DLNA/UPnP working inside the plasma-mediacenter but as soon as those errors would be resolved, I will update about it and currently you can check these standalone applications working good :)
The basic working of DLNA/UPnP Media Client is somewhat like this. Whenever new media server is found on the network and user clicks on expand button of a container, “Browse” Action is invoked, passing various standard arguments like Object ID(container id), starting index etc. and binding callback function. When media server sends the response, call back function is called with arguments having response data from the server. The XML response from the server is parsed, which gives the all the data and meta-data of the media files.
This whole procedure is done for each container or directory present on the Server. The libraries which has been used in the implementation are gupnp-1.0 gtk+-2.0 gssdp-1.0 gupnp-av-1.0 libxml-2.0
Above whole explanation holds true for the standalone application but there are minute changes in this if we talk upnp in context of PMC. Whenever any media server is found, it is going to scan each and every directory recursively, get all the information of the each and every media and store it into the MediaLibrary of plasma mediacenter which is built everytime pmc starts. Although there is limitation of MediaLibrary that we cannot remove any media from it once added and if DLNA/UPnP media server goes offline then, it would show those media files but would not play them. So, It need some changes to support removing media too and that’s where my role comes in. I will make changes in MediaLibrary and would be looking further to contribute into KDE :D
UPnP Media Server
And regarding the working of DLNA/UPnP Media Server, it just has to give response to all the actions invoked by the client application. That response include all the information about the media, didl container or item etc. according to the arguments passed to it. The libraries which I have used in upnp server implementation are gupnp-1.0 gupnp-av-1.0 libsoup-2.4
I really enjoyed this program and would like to contribute to this awesome and supporting community.
And last but not the least, my mentors Shantanu and Bhushan are very helping and supporting, and it was really not possible for me to implement this without them. A big thanks to them :)