Thursday, 6 August 2015

Akademy 2015 and `Mi Experiencias`

Well I attended my first Akademy this year and it was really AWESOME. 
Wait, what did you just say? I have a typo in my first line/title of my blog post? 
No...I really meant Akademy, not Academy. Akademy is the annual world summit of KDE which was held this year in A Coruña, Spain. 

I reached Rialta Hotel on 24th at night. So, I missed some kind of Spanish ceremony/tradition but my friend, Pinak has clicked some photographs and it really looked cool. 

Next two days were for talks. I attended most of the talks and the one which I found most interesting was Plasma Mobile by Sebastian Kügler. We also had group photo over there. At the end of the second day, Akademy awards were given to VDG group for amazing looks of plasma 5, Millian Wolff for his great work on KDevelop, Albert Vaca for creating awesome application KDE Connect and Akademy Organizers for their work and efforts.

From next day, BoFs were conducted and I attended the ones I was interested in. We also had a BoF session on kdeconnect in which we discussed about keeping single code base and making it cross platform and discussed the problems which we might face in that. More details of that BoF can be found in kdeconnect Mailing Archives. I also shared my idea of creating Synchronization Plugin for kdeconnect which would sync the specific folder across the devices and I already have created it but I'm having problems in testing and debug it out.

Other than that, I worked on Plasma Mediacenter and did some to-do from Bhushan's list like fake media source, plugin infrastructure etc. I was the only one from PMC developers. I wished Bhushan, Shantanu and others could have joined me. I wasn't able to work much because my laptop charger didn't plug into European style socket. So, I always had to borrow it from someone else whenever it was free.
We also had a night party somewhere, I don't remember the name of the place. Everyone had drinks, I only took soft ones ;P . We also had food over there and then dance as well. I interacted with other people there, with whom I didn't get chance earlier to meet because of arriving late night at Rialta on 24th. It was really amazing.

I learnt about the cool architecture of baloo from Vishesh, met awesome/entertaining guy Àlex Fiestas, got to know more about KDE Frameworks from David Faure and much more. I got opportunity to meet other people from KDE India community, talked to people in person with whom I had only conversed online before and made new friends over there :D 

I would also like to share some thoughts about my journey to Spain. Spain is very good place and I really enjoyed my whole journey. It was overall very good experience. I went from Madrid Airport to Bus Station via metro and then took bus from there to A Coruña. During return journey from A Coruña to Madrid, I traveled on train. I didn't know Spanish but people were really helpful and Google Translate also helped me a bit. One thing that surprised me in Spain was sunset time. While traveling to A Coruña from Madrid by bus, there was clear sunlight even at 10:00 PM. I checked timezone twice on my phone and then browsed Internet if there are two time zones in this country. I even asked time from one person, sitting near me who knew English, to confirm that my phone was showing correct time. So, Nights are shorter over there. I went to aquarium there and has clicked some photographs over there. I also visited Torre de Hércules but didn't go to top of it as I was feeling damn cold and I didn't want to stand in long queue to get over there. I also have created 180° view near Torre de Hércules. Both, Aquarium and Tower of Hercules, were part of day trip present in Akademy schedule. Weather was really nice in A Coruña. It was the first city where I saw coastline as well as mountains at single place. I had some problem there to find food as I am a vegetarian, um, not exactly. I am actually a Lacto-Ovo-Vegetarian. So, most of the food items which I saw had meat. 

I would like to thank José Millán Soto as well as other organizers for organizing such a well planned event. Looking forward to Akademy 2016!

Thanks a lot to KDE e.V. for the sponsorship without which it would not have had possible for me to attend such an awesome summit.

Tuesday, 3 February 2015

SoK : UPnP Media Server and Client; Its integration into PlasmaMediacenter

Hello everyone,
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 :)

UPnP Media Client:

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 :)

Sunday, 23 November 2014

SoK : UPnP Support in PMC progress report

Well, it's been a great experience working on an awesome project Plasma Media Center. Till now I have learnt a lot of things, from which using C library in C++ using wrappers is the one I really like the most.
As PMC is being ported to Plasma 5, it would be worthless merging it in qt4 based branch of PMC. So, I am making standalone app based on Qt5 and would merge it later on once it gets ported completely.

I have used GUPnP library for this as it is the best and most stable library available to implement UPnP. I have used gupnp-tools as the reference. Till Now I have successfully finished the very first step of my project, i.e. show up the files of the MediaServer. I am able to browse the files on the Media Server successfully and that media is accessible over HTTP protocol using the URLs which is terminal output.
Here's the screen shots of the working application :



In the root of the tree in application, there's Device name being shown up in the first column and respective IDs in the other column. So, we can expand it down and browse the files further present on the media server. As we keep expanding it down, we will be getting URLs of all the audio, video, image and text files of those directories as the output on the terminal.

As I have got the URLs of the media, now I just have to pass those URLs to the existing PMC backend which would automatically be opening up the media file over the HTTP protocol, process up the metadata and shows all the controls like play, pause etc. But as I have said previously, I would be doing that integrating in PMC stuff later on.
If you wanna try it out, you can get the sources from here.

What's Next :
Now I am gonna work on implementation of Media Server in PMC using the same library. Using that, the user would be able to play the media files from PMC to any other device. I am using some boilerplate code from here which includes some of the examples of UPnP Standard Services like ContentDirectory, ConnectionManager and AVTransport.

Season of KDE participants are required to blog about the work progress report but I am really kinda lazy in that and this is my first blog post I have ever made in my life :p

At last I would like to thank my mentors Shantanu and Bhushan, who helped me in each and every problem where I got stuck.