uPnP Client build instructions

Since I gotten a few requests about binaries and while I tried to find a host I realized that its probably better to just let those interested doing the build themselves. This to ensure we don’t get ghosts and false bug reports (due to missing dependencies and such).

So please, only try this guide if you already have tried and successfully compiled banshee git version. I’d prefer to only have to answer questions regarding my code mistakes 🙂 For those who aren’t on Linux or aren’t interested in building, the code will hopefully circle back into mainline and part of official releases soon enough.

I’ll keep the build instructions for Linux as this is my weapon of choice, it should work on Windows too (obviously built in another way) but I haven’t confirmed it yet.

First we begin by building Mono.UPnP as its a dependency of the addin, and to do that we need the code.
git clone git://github.com/topfs2/Mono.Upnp.git
Since the build patches required for package config sits in an experimental branch we will have to switch:
cd Mono.Upnp
git checkout -b extreme_clean origin/extreme_clean

Now to begin building
./autogen.sh --prefix=$HOME/mono.upnp-out
make install
cd ..

The prefix part is optional but lets keep it in home for now since its such experimental code, no need to pollute the system without good cause 🙂

When Mono.UPnP has been built we move onto banshee, we begin by cloning banshee and then add mono-soc-2011 fork:
If you already have banshee cloned you can skip this step, else you need to do it:
git clone git://git.gnome.org/banshee
cd banshee

Next we add the mono-soc-2011 remote and checkout the branch
git remote add mono-soc-2011 git://github.com/mono-soc-2011/banshee.git
git fetch mono-soc-2011
git checkout -b upnp_client mono-soc-2011/upnp_client

To compile we need to setup the environment needed by adding mono-upnp to pkg-config and the mono gac
export MONO_PATH=$MONO_PATH:$HOME/mono.upnp-out/lib/mono-upnp/
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$HOME/mono.upnp-out/lib/pkgconfig/

Now we can finally begin compiling:

To run you simply do
make run
And enable the addin in preferences. You need to have the environment setup to be able to run the addin. When packagers get the code they will do the setup of the environment for you, reason we need to play this game is because Mono.UPnP is not yet packaged. For information about building banshee read http://banshee.fm/contribute/write-code/

Please let me know your results.

Till next time, yours truly, Tobias.


Anyone ever wanted to watch movies from their uPnP MediaServer in Banshee? Well, I can!

After doing quite a bit of cleaning of the code I have been able to do two things, first bring performance up significantly and secondly find more than one media type on a server. I have used this to add video support to the client and it works quite well!

With this code clean it should be very simple to add other media types uPnP supports such as AudioBooks, AudioBroadcasts, VideoBroadcasts and even Playlist.

Next on the list is to add some quirk managing to further speed up parsing on servers not implementing search properly (way to many sadly). After that I’ll start tackling the server part.

Till next time, yours truly, Tobias.

Why can’t servers follow standards? a.k.a Client progress

I think its time for a long overdo progress report, and I’ll get right into it with a picture!

As you can see the client is shaping up quite nicely, at least on MediaServers which are implemented properly. Sadly I must say that it’s a jungle out there, very few actually implement it properly. Seems like most just implement enough to appease the Microsoft client, shame on you! I have during this first part of the project reading the documents regarding the MediaServer:1, which is what I am aiming for, and I must say its one of the best pieces of documents I’ve seen in a long time, and yet very few implement it properly. This makes me very sad and make implementation of clients a lot harder than it needs to be.

As you may notice I have made the design choice to make the actual container structure invisible and focus on whats important in the client, the media. This is what have caused troubles in the implementation, first and foremost it can take quite some time to parse a server (which is possible to deal with by caching) but the most problematic part have been to identify duplicates. In the MediaServer standard any item which is a duplicate is meant to have a tag called refId, very few MediaServers seems to implement this feature, why I can’t understand as it ought to be a simple addition.

Next is to add support for videoitems. Later I hope to implement support for the more obscure items also like radio broadcasts, playlists and audiobooks (If anyone know a MediaServer implementing them please let me know).

Till next time, yours truly, Tobias.

GSoC 2011 Banshee uPnP server/client integration

First off I must say its such an honor being picked by the mono community for this years Google summer of Code. The project will be adding uPnP Client/Server support to the incredible Banshee Media Player, an application I love and use very much in my daily life.

My main media consumption consists of Banshee for playing music and XBMC for video playback (on my TV), this is why I feel uPnP would be such an interesting project as it would allow me to have the same content available with the same standard on all devices and only needing to manage them in one location and from one application.

The goal of the project is as said to integrate a uPnP server and client into Banshee, making it possible to both share media and consume media from other devices simply and dynamically. Banshee is already a very simple application to use in managing media and given that more and more portable devices supports uPnP, it can and should easily serve them with that media. My proposal can be viewed fully here but I will go through the key points here nevertheless.

Every day it becomes more and more common to have multiple computers in a household and even more so to have multiple portable devices like tablets, phones and even laptops which all may have media to share or media you want them to be able to acquire from a local server. Given that media is such an integral part of many users’ use of a desktop, the consuming of this media needs to fit the dynamic lifestyle we expect these devices to conform to.

User scenarios:

  • A friend comes over to your house with his Banshee powered laptop bursting with songs he wants you to hear. Instead of copying these files over to you or plugging his laptop into the stereo, you simply ask him to connect to your network, navigate to his computer from yours, and starts the playback.
  • You sit out on the porch with your cellphone, listening to the music files on the phone’s local drive. Your banshee powered laptop is already started in a room all the way on the other side of your home, and you get the urge to listen to a song you do not yet have synced to your device. You simply start the uPnP client on the device and begin listening to what your laptop has shared.
  • You have a few friends over to watch a movie which is sitting on your Banshee powered laptop. Instead of watching this movie on the small laptop screen, you start your uPnP powered TV and navigate to the movie. Playback starts at the touch of a button.

This proposal consists of two separate parts, one being the client and one being the server. Let us begin with the server. First and foremost I must consider the fact that most users who intend to share media will wish to continue sharing the media even while Banshee isn’t running. As such, Banshee role is state what to be shared and the metadata regarding it where some other instance share the files. Given this requirement it might make sense to leverage a session wide server and with the guidance of the nice people from Banshee and Gnome I have been pointed to the Gnome project Rygel. As noted in the mailing list communication, when the instance hooked up to D-Bus disconnects, the media stops being shared, this is by design from Rygel, and, as suggested, this could be circumvented by creating a thin client feeding Rygel the data which Banshee controls.

As for the client, a C# project called mono uPnP exists which can be used to power Banshee to acquire media in a manner similar to many of the other extensions found in Banshee already. While this project (and Banshee alone) most likely can power the server part as well, it may make more sense to use Rygel. That aspect is something which will need further discussion and examination, which is why the following timeline has Server Implementation scheduled for a later stage of programming. The intervening time will allow for all necessary discussion.

I hope that after this summer is done Banshee will be able to play along nicely with all your other media devices. During the summer I will keep you all up to date with progress on this blog. Most of the stuff will most likely be very technical but isn’t that the most interesting anyways 🙂

Till next time, yours truly, Tobias.

Some introductions are in order …

My name is Tobias Arrskog. I am 25 years old and working towards my master of science in computer science, currently in my fourth year.
I am born and raised in Sweden but have spent a year abroad on exchange studies at the University of Waterloo, Ontario.

I created this blog as a home for my ramblings and weekly reports for GSoC 2011 with Banshee but it will most likely contain other projects I work on but under other categories.