Sunday, December 28, 2008

Rygel and DVB

I had been working on adding a DVB plugin to Rygel lately so that people can easily watch TV on all their UPnP-capable Renderers without having to swap DVB cards around (people typically have one). Although I had finished the basic version of the plugin 1-2 weeks ago, the live streams never worked for me. Yesterday, I realized my mistake (wasn't handling the dynamic pads from the gst source element) and when i corrected that, here is what happend:




There are still some issues to fix, especially the artifacts that happen because RTP headers are not getting stripped off when Rygel proxies the RTSP stream over HTTP but I am hopeful I'll be able to fix them soon.

UPDATE: The artifects issue i mentioned above has already been fixed in the trunk so now you can enjoy a smooth live tv experience. :) Also! before you ask, no this doesn't work with PS3 yet (most probably because of some missing metadata in the DIDL-Lite fragments).

Tuesday, December 9, 2008

Rygel now part of maemo plan

So it is no secret anymore that Rygel will be part of maemo platform. If you are interested in contributing to maemo, here is yet another chance. I have a big pile of TODO for Rygel so if you are interested, do contact me. In case you prefer IRC like I do, I am always on #gupnp on irc.gimp.org.

Wednesday, December 3, 2008

DVB-T on Linux

One of the excuses I had to not implement DVB-Daemon integration in Rygel was that I didn't have the needed hardware to do so. Some days ago, I decided to get rid of this excuse by buying myself a Hauppauge Nova-T DVB-T stick. After a few days of trying different things, fiddling around and filing ivalid bugs, I finally manged to get it working with both DVB Daemon and Totem. Here is some advice based on my experience so far:


  • If you happen to have the same DVB card as I do, make sure you have the recent enough (>= 2.6.25) Linux kernel that provides the needed driver (dib0700)
    out of the box.


  • Get yourself the latest firmware from here and place it under /lib/firmware. The driver still looks for it by it's old filename so make a symlink in the same directory to this file by the name "dvb-usb-dib0700-1.10.fw".


  • Unless you know exactly what kind of channels file needs to be created, DO NOT use w_scan for creating a channels file. Use gnome-dvb-setup.py (part of DVB Daemon) to do that.


  • If gnome-dvb-setup.py is unable to find your local channels, concider the possibility that the small antenna provided with the DVB-T card might not be big enough to do the trick. I had this problem and I solved it by connecting to the cable from the bigger antenna on the top of my house.



Also, I must say I am very much impressed by how much great work Sebastian 'sebp' Pölsterl has put together in such a short amount of time. This could possibly be one of the best GSoC projects ever. It's not that it just works but the quality (architecture and design) of the code seems to be pretty good as well. Implementing featurefull software in a short amount of time without compromising quality is something even many very experienced developer can't seem to be able to do but Sebastian has done it.

Tuesday, November 25, 2008

Rygel update

For the past few weeks I have been cleaning-up and lately re-designing the source code. I am mostly finished with that and I can hopefully focus mostly on functional features piled in my todo now. The biggest change has been that plugins are now loaded into separate Media Servers and allowed to implement all kinds of resources (currently only service implementation is possible) instead of just providing a Media Provider interface. I decided to make it so when I realized that some plugins will need to implement additional services. For example a DVB plugin will want to implement a UPnP ScheduledRecording service rather than just exporting the channels.

On a side-note, our brave user (and now a contributor) Florian Steinel has got Rygel working with his PS3 already. According to him all his audio and image files are discovered and played/rendered without any problems but not all of his video files. Yes, there is still room for improvements but I was expecting quite a lot of work on making it work against a PS3 but glad to see that we are already very much compatible with it. Here are some screenshots of him playing with Rygel and PS3.









WARNING: If you want to try out Rygel with your PS3, you need to get tracker and vala from the SVN trunk.

UPDATE:Those weird looking titles in the screenshots turn out to be some Tracker-related issue:

<fsteinel> hhm, those name are already in the xml file lets see tracker...
<fsteinel> a tracker metadata bug nice, gstreamer gets it :-)
<fsteinel> gstreamer title: "El Reloj" -> tracker title: ÿþE a tracker reindex later and the error is gone :-)

Monday, November 3, 2008

Secure UPnP not a dream anymore

On last friday evening, while thinking about security and UPnP, I realized adding security might not be as hard as one might think. If HTTPS is used instead of HTTP together with authentication, Your neighbor should no longer be able to play his p0rn on your Media Renderer once he/she breaks into your wireless network. Giving it more thought, I then realized it might not be so hard to add this support into GUPnP and I was correct.

After a few hours of reading libsoup docs and hacking around this weekend, I managed to add support for HTTPS in GUPnP. Adding authorization doesn't need any changes in GUPnP since we expose both SoupSession and SoupServer so applications can very easily add that there. Also no changes were required in GUPnP for the control points to be able to deal with devices/services using HTTPS instead of HTTP, thanks to libsoup. Here is a bug that you can follow if you are interested in this topic.

WARNING: Use of HTTPS and/or authentication is not described in any existing UPnP specification that I know of so if you decide to use this in your device/service implementations, don't expect interoperability with other devices/services.

Tuesday, October 28, 2008

Rygel the GNOME UPnP Media Server

I am pleased to announce that gupnp-media-server project has been moved to GNOME SVN under the new name, Rygel. Currently it's a basic implementation on top of GUPnP and Tracker but I'll be putting a lot of time and love staring from next week to turn it into a very great project. Special emphases will be put into making it fit the UPnP needs of GNOME.

This would be a very good time to convince me to implement all the features you would want to see in a UPnP Media Server so I can add them to my TODO file. :)

UPDATE: While updating the jhbuild moduleset, I found out that rygel isn't buildable with latest vala/bindings. I'll try to correct the issue(s) tommorrow so don't panic if it doesn't build for you. It's just the demo effect. :)

Friday, October 17, 2008

Good news for the lazy

Jussi recently commited some major changes to Ross' gupnp-binding-tool and one of the new features is support for server-side bindings. This makes writing UPnP implementations in C even more easier. So laziness is becoming less and less of an excuse to not write UPnP stuff. :) Here is a nice document with a nice explanation of how to use it.

Tuesday, October 14, 2008

Claudio has bad memory

Claudio has bad memory so here is my feelings about both of these places in my own words:


  • Meritähti: I really like that place, nice food in a very affordable price. Also it is very near to our office, which makes it the first choice to go to for a meal before we hit another bar for good beers. However, it is most definitely not the best restaurants or bar in Helsinki. Not even one of the best ones. There are lots of very excellent restaurants in the city but of course they charge a lot more.

  • Molly Malone's: That is one of the best bars in Helsinki, lots of nice beers, nice friendly atmosphere and live concert every evening.



BTW, Bastien just committed my patch to nautilus-sendto trunk that adds support for sending files to UPnP Media Servers. I've only tested in against Nokia N81 and Media Server provided by Intel tools for UPnP but it should work for most of the Media Servers that support uploading.

Thursday, October 9, 2008

GUPnP: achievements and way forward

As most of you probably know already, GUPnP is now officially part of Maemo and therefore future internet tablets. This is a major milestone and gives a big boost to my motivation to continue my UPnP adventure. Although I try to put as much of the bits and peaces of spare time i get from my job into UPnP work and I am pretty sure the Intel (former OH) will continue their work as well, we could certainly use more hands to accelerate the development.

If you want to help, here is a short list of TODOs that you might want to have a look at and decide if you could help on any of these:


  • Bindings: Although the more bindings we have the more worlds we can conquer but what we definitely need is bindings for most popular languages in GNOME/Maemo world, namely C#/mono, Java and Python. If you are interested in helping with this, I strongly suggest you take the g-i-r route. Also if you are only interested in C# bindings, I suggest you talk to Jerome Halton who already have a half-baked solution.

  • Integration: GUPnP can't possibly become the standard UPnP framework of the GNOME world until we have:

    • plugins for Totem, Rhythmbox and Banshee enabling these apps to browse and search contents on UPnP MediaServer (MS), export playback control on the UPnP network by implementing a MediaRenderer (MR) and to redirect playback of contents to other MRs.

      You might notice that I didn't mention sharing of contents on the network, the reason for which is that I believe (and Jorn agrees) that that should be the responsibility of a dedicated MS (gupnp-media-server) as part of the desktop session. Having a dedicated MR OTOH hardly makes any sense.


    • GVFS backend for UPnP, allowing the GIO world to browse, copy and move contents to/from UPnP MS as if it was just a local filesystem.


    • PulseAudio integration: Wouldn't it be nice if I could redirect all audio output of my laptop/internet tablet to my cool UPnP-enabled speakers or my desktop machine running Totem, Rhythmbox, Banshee or better yet PulseAudio itself (which would mean p-a implements both an MR and an MR control point (CP)? This is actually part of Lennart's great plan to conquer the world so I thought I mention it here in case someone does it before Lennart gets the time to do it himself.






UPDATE: Forgot to mention a very imporant task: Porting to platforms other than Linux. We mostly use glib, libxml2 and libsoup so this shouldn't be a huge task. The only platform-specific code in the whole stack that I know of is the networking bits.

Tuesday, September 30, 2008

Fire in the hole!

Many thanks to Olivier Crête, we now have a nice small library for firing holes through firewalls using a part of UPnP IGD API. This library also provides a convenient way to do all that without having to use a gmainloop. While Olivier will most probably use it in his farsight2, I am sure this will be useful for other projects (I did not say Ekiga :)) as well.

Friday, September 26, 2008

We want MiniObject

My last blog post managed to attract the attention of some of our beloved GNOME developers, especially the ones working on/with embedded systems. That made me realize that I am not (at least completely) on crack and decided to file a nice big bug for addition of something similar to GstMiniObject to core gobject library. Lets see what happens next. :)

Monday, September 22, 2008

Think before you create GObjects

I had always been hearing that GObjects are slow and it's not always a good idea to use/write them but I never saw any evidence to support that. I had this desire to write a test application to get this evidence but felt too lazy to do it in C. I realized a few days ago that I can write such an app very easily in Vala without giving up much on my laziness. :) So here is an app that I wrote last evening after returning from vacation. Here are the results on my laptop:

$ ./test-perf
0.000182 seconds taken in creating 10000 structs.
0.001598 seconds taken in creating 10000 instances (compact).
0.003522 seconds taken in creating 10000 instances.
0.090455 seconds taken in creating 10000 instances (GObject).


The ranking is exactly how I expected it to be but didn't expect such a big difference between them all.

Back from Italy

What a beautiful country. The people were very nice and the food was just amazing.

Saturday, September 13, 2008

Regarding closures

After reading/watching Stuart's nice slides on Closures in the context of JavaScript, I have started to like JavaScript. Personally, I don't accept any language as a high-level scripting language if it doesn't support closures. Python is therefore straight out of my window. Although Vala isn't a scripting language, it would be nice to have such support in there as well. It already supports lambda functions with no restrictions and Jürg has concrete plans to support closures, it's more a matter of when rather than why or how. When that support is there, just try and stop me from loving Vala. :)

UPDATE: Thanks to Anonymous, I now stand corrected that Python does fully support closures. Although I still don't like the fact that it restricts lambda functions to be one-liner but at least it's not straight out of the window anymore. :)

UPDATE#2: Andy Wingo informs me that python doesn't really fully support closures. He even put up a small code fragment to make his point. So I hereby throw python out the window, again. :)

Monday, September 8, 2008

Go Havoc

Since I totally agree with last two blog entries of Havoc, I originally started to write this entry to get them to the planets I am on and he is not (yes, there are some) but then I couldn't resist adding my own thoughts. :)

Regarding "embeddable" scripting languages, I came-up with the exact same conclusion 4-5 year ago. When I looked around at that time, I realized that GNU had realized that long time ago and had a nice embeddable implementation of the easiest yet powerful language, Scheme. Guile was the name of that implementation. I soon became a firm believer of "Most of the implementation in C, while the highest-level (only) logic written in Scheme/Guile". While I was acting on my belief, I couldn't help but notice that the only other person in the whole GNOME community that had similar vision was Andy Wingo. Many (if not most) had been going for Python. Some of them even took this scripting language as far as coding complete frameworks in it.

As I mentioned in my previous blog entries, I did hack in Python for a while but the more I coded in it, the more I hated it. Now that I think back on that experience I realize that I wouldn't have hated it so much if the projects I had worked on where not completely written in it and it had used Python as what it is, a scripting language.

But lets not make this yet another anti-Python rant and agree with the conclusions drawn by Havoc for us. :)

Sunday, September 7, 2008

More Network Light fun

When I wrote GUPnP Network Light, I thought of it as just a simple example application that demonstrates how easy it is to implement UPnP devices and services using GUPnP. However there is one man, Mr. Hugo Baldasano Calleja who being an electrical engineer is very much interested in light bulbs and has recently been writing control point for Network Light.

While discussing about his code with him on IRC, I started to wonder how would a simple control point GUI for Network Light look like. I realized that it would look exactly the same as the Network Light itself. Since Hugo had already made it possible for multiple instances of Network Light to co-exist happily on the same network/machine, I decided to turn Network Light GUI to be a Control Point that controls all the Lights on the network, not just itself. The change is already in the trunk and will be released soon. Here is a screenshot:

Sunday, August 31, 2008

GSSDP 0.6.2 and GUPnP 0.12.2 released

Jorn made minor releases of GSSDP and GUPnP today. The main purpose of which is to fix the build on Rawhide. Here is the release announcement:

GSSDP 0.6.2
===========

- Reannounce resources after max_age / 2 - 1 instead of after max_age.
[Peter Christensen, Jorn Baayen]
- Remove unnecessary call to g_thread_init(). [Zeeshan Ali]


GUPnP 0.12.2
============

- Support returning actions outside of the 'action-invoked' signal handler
in service implementations. [Zeeshan Ali, Jorn Baayen]
- Add explicit dependency on gthread. [Zeeshan Ali, Jorn Baayen]

Sunday, August 24, 2008

XChat or irssi+screen+ssh?

Ever since I started to IRC from my Linux machine, not only I had been a happy (almost) user of XChat for years but also I wrote an XChat plugin for Guile. All that changed when I moved to Finland three years ago and was educated about the benefits of the combination of irssi+screen+ssh, the biggest (perhaps the only one) of them being the persistence connection to IRC. Since then I had been using that combination. After three years, I am having doubts about the choice I made at that time.

XChat might not be able to provide me with a persistent connection to the IRC world but it still provides lots of small features that irssi does not (and in some cases can not) provide that really does matter in the end and one would expect in a modern IRC client, e.g hard-to-miss notifications when I get new messages, saving of logs and DCC-sent-files directly on my local-machine etc.

I switched to back to XChat a few days ago. I mostly feel good about coming back to it but still miss the persistent connection to IRC. Especially when I suspend/resume my laptop. After resuming, XChat happily assumes that everything is exactly how it was before I suspended the laptop and it takes a while in realizing that it needs to re-connect to all networks. In most cases the network connection doesn't take long but in case of very busy networks like ircnet, it takes a lot of time and is therefore a source of annoyance.

The reason I am discussing this here and not doing anything about it is that I currently don't have time do anything about it and if someone has already solved this problem somehow, I would like to know.

Wednesday, August 13, 2008

GUPnP soon in Fedora

Peter Robinson had made RPMS for GUPnP package for a while now but it was until recently that someone got a chance to review them. The first (and IIRC the only) issue that came out was that the build was breaking for all our apps. Here is what was happening:

We call g_thread_init() in each of the application because libsoup requires us to do that. If I understand correctly, libsoup needs the threading system to be initialized for locking stuff that is actually a part of glib. While we don't mind putting this call in each of our app, we assumed that libsoup requiring us to make this call will itself link to libgthread-2.0. That assumption is true about libsoup-2.4 built/installed from vanilla release tarballs, subversion repo and debian/ubuntu packages but on Rawhide, it turned out to be false.

I (and a bunch of other developer hanging out on #gnome-hackers) had a chat with Dan Winship about this and in the end he agreed to put gthread-2.0 in libsoup-2.4 pkg-config. He said that it will be a while before he can make a release so we decided that we ourself link the apps to gthread-2.0 until then.

Peter has already put the required patches into his packages. Here is page to track the status of the packages and as of this writing two of the packages have already been approved. A big thanks to Peter for his efforts to make GUPnP easily available to Fedora world.

Tuesday, August 5, 2008

We have plugins

Just pushed my commits to gupnp-media-server SVN trunk. Now we support plugable media providers, which can be written either in Vala or C. Also included in these commits is gstreamer-based metadata-extractor. Still not done (due to lack of time :() is a standalone media provider based on this extractor, GIO and SQLite.

Tuesday, July 29, 2008

Now a GNOME foundation member

I just received e-mail informing me about the successful processing of my application for GNOME foundation membership. Thanks to all the people who vouched for me. My agenda as a member will be to:


  • continue contributing wherever/whenever possible.

  • make sure GNOME has full-blown support/integration for UPnP.

  • not let the people who think of Mango Lassi as an original desi drink and are agaisnt the idea of GUADEC in Finland, gain power in the foundation. :P

Monday, July 28, 2008

back from finnish forest




I am back. Had a very relaxing one week in the Finnish summer cottage. Lots of fishing and plenty of nice food to eat. Yes! there was Sauna almost everyday and yes! 'swimming in the lake naked' breaks were included. I had a crappy GPRS connection so I did some twittering for the past few days.

Saturday, July 19, 2008

Out in the forest for a week

I am on a one week vacation starting from tomorrow afternoon. I'll be in a summer cottage in the middle of a forest and might not have any internet connection at all. I am taking my laptop with me, but I'll try to resist hacking. Lets see how successful I am. :)

Trouble with gmail and o-hand.com

I hadn't been getting replies to any of my mails to o-hand dudes but I just thought they are either on vacation or just too busy doing more important stuff. Yesterday I caught Matthew on IRC and it turned out that he did reply to my mail(s). I became a bit worried and searched my "Spam" and "Trash" to see if it ended-up there for some reason but i didn't find them there. I got a bit worried and looked into the archives of o-hand hosted mailing lists that i am subscribed to. It turned out that I haven't been able to receive any mail after 10th of June from o-hand.com mail server.

Getting really worried, I hit the "Help" link in gmail. Turns out that I can either go through a stupid automated troubleshooting procedure that didn't help at all or I can post my problem to a discussion forum that is sometimes visited by the gmail admins but mostly they assume that your problem will be solved by a user. I did post about my problem there but since this morning I am unable to find that forum anymore. Err..

I don't know on which end the problem exists but if you are reading this mail and you work at either o-hand or google, kindly investigate this issue.

UPDATE: I figured out the issue. Eric created this cool looking "@gstreamer.net" alias for me once and I had been advertising that all around. Turns out that I even used this alias/redirection to subscribe to (o-hand) mailing lists. I subscribed to clutter ml using '@gmail.com' address and I instantly got the messages from the list. I'll write to Eric in hope of getting the lost mails but I must stop using this alias/redirection no matter how cool it is.

Sunday, July 13, 2008

The Istanbul story

Time flies and it's already been a few days that I am back from Istanbul. It was a lot of fun. Great presentations, discussions and hacks in the mornings and Shisha and beer in the evenings.

Had lots of discussion with a lot of people about GUPnP, how it can be used for UPnP integration in GNOME and what features they would like to see in gupnp-media-server. My talk went pretty well and this time the demo really did work on the wireless network available at that time. :) The only issue was that it was scheduled at the same time as the Lightning talks and because of that only a few (~10) people could attend.

Talking of talks, my favorite was Michael's talk about Moonlight. There were many other nice talks as well like Quim's BoF, where he nicely explained Nokia's relationship with Open Source world in general and GNOME in specific, and OH people's talk on Clutter and the cool new features in Clutter 0.8.

There was a big debate going around on git vs bazaar. Although I was on git's side myself, I couldn't help but appreciate how reasonable the bazaar advocates/developers were. I had a lot of discussion with them and bombarded them with lots of straight questions. Unfortunately, I felt that I failed to convey my concerns about bazaar and how they (my concerns) can not just go away by simply me trying out bazaar myself.

Regarding next year's GUADEC/Akademy on one hand, I am very sad about Tampere's bid to be rejected but on the other hand I am really glad that it'll be in Canaries. Before you get me wrong, I don't think Galicia would have been less than perfect spot either. One thing that many people don't know about Canaries is that it's "the" vacation spot for Finnish people. So if you look even a bit Finnish or hanging around with Finnish (looking) friends in there, don't be surprised if the locals start to talk to you in (very broken) Finnish. :) Seriously, I am speaking from experience. So much for keeping GUADEC away from Finland. :)

Friday, July 11, 2008

Cute Lennart




Lennart enjoys Federico's talk.

UPDATED: I didn't repost this, I only update the older blog entry with a rotated by 90 degrees clockwise version of the same image. Blame planet GNOME if you don't like seeing this again. :)

Tuesday, July 8, 2008

GUPnP MediaServer 0.1 released

GUPnP is an object-oriented open source framework for creating UPnP devices and control points, written in C using GObject and libsoup. The GUPnP API is intended to be easy to use, efficient and flexible.

GUPnP MediaServer is an implementation of the UPnP MediaServer V 2.0
specification based on GUPnP and tracker. It is written (mostly) in Vala language.

Download at http://gupnp.org/sources/gupnp-media-server/

Monday, June 30, 2008

GUPnP Media Renderer 0.1 released

- Initial release. This is a reference implementation of the UPnP MediaRenderer version 1 device type, written in Vala. For rendering it uses the video widget from libowl-av. GUPnP Media Renderer can be downloaded here

Sunday, June 29, 2008

GUPnP Network Camera

This is the announcement of the GUPnP Network Camera project, an implementation of the UPnP Digital Security Camera specification, based on GUPnP.

The GUPnP Network Camera package contains applications that enables V4L cameras to be shared on the network as UPnP devices, and control point software for controlling and viewing images from such cameras.

The software can be downloaded at: http://www.kristell.se/network-camera/

Some facts

Regarding my last blog entry, I thought I should get some things straight:


  • I am not a native english speaker so sometimes it's hard to choose the right words and sometimes this leads to confusion. Fortunately! I try to learn from my mistakes and comments on my blog entries really help me in that.


  • I've been a big fan of Ubuntu ever since the project started and have been (and still) am a very happy Ubuntu user. In fact I was having the usual Ubuntu is better than Fedxxx debate with him the other day when Karl told me of this. Also I am writing this blog entry using Ubuntu.


  • Disregarding what someone said about Ubuntu, I truely appreciate their work and efforts for Free Software and especially GNOME in specific. The world would be a much worse place if Ubuntu hadn't existed.


  • The motivation behind this blog entry was not 'anger' but 'disappointment' being an Ubuntu user and advocate myself.



Regarding the discussion between Mark Shuttleworth and Karl-Lattimer, I must agree with Karl that Mark having to defend the 'GNOME About dialog' in the menu doesn't reflect good things about Ubuntu developers (the ones who were against this). On the the hand, I must ask Karl not to resort to insulting language even though I feel he has the right to be angry here (Something Mark also recognized).

Friday, June 27, 2008

Shame Ubuntu shame

I am no more a fan of Ubuntu. The reason is their recent demonstration of lack of community spirit. Here is the release announcement of Ubuntu hardy alpha6. If you scroll-down you can see the gnome-system-monitor's new cool "Resources" view featured with a nice screenshot. Since Karl-Lattimer worked really hard to make this happen, he asked to be given personal credit on that page. Don't know about others but I see this as a very reasonable thing to ask. The result of this request can be seen in the announcement of hardy beta. They just removed the feature from the announcement. Shame Ubuntu shame.

UPDATE:It's interesting how most of the comments that are from people who got pissed without actually caring to understand the main point of this blog entry (which me and Karl-Lattimer tried to emphasize in the comments) are posting as Anonymous. :) Acknowledging the possibility that they might not think comments are worth reading before commenting, let me make it clear here: The main point not being that they don't give credit to all the people behind the software they market but silently removing a nice feature from the release announcement after being asked to be given credit. If all the contributors ask for credit, would they remove all features from their announcement? I don't think so.

Thursday, June 26, 2008

Git vs Bizaar/Bazaar

I will spit my vodka in your eyes if all you come up with is speed

WTF? If you can't compete on a very important (to me at least) point, you don't want to listen? Git (especially if you use git protocol) is so fast because they first sorted out the basics and design right and then worked on the UI. Git is not just faster but tons of magnitude faster than bizaar.

I used to think that 'speed' is irrelevant in this context but when I started to use Git, I realized how important it is for me as a developer.

Also the stories of learning curve of Git are extremely over-exaggerated. For example, i recommended Git to a darcs user (who was pissed at darcs taking hours do clone a repo) and after three hours he came to thank me for that. I was surprised to see how quickly he learnt it but then realized that if you just give a bit of information how it's different than other VCSs out there before a newbie actually starts to learn/try it, he/she finds his way very easily into the Git world.

Tuesday, June 24, 2008

I am not Zaheer

Zaheer and Zeeshan, though has lot of alphabets common are still two separate names. :) I always took it as a joke when people used to confuse us but recently someone was about to give my money to Zaheer and that i think is serious. :) Good that that dude got my IRC nick right, otherwise...

Saturday, June 21, 2008

A day in a finnish summer cottage

I had been hearing stories of Finnish summer cottages ever since I moved to Finland but never got a chance to spend some time in one, until yesterday when we went to spend a day/night at the summer place of Suvi (a good friend of Ansku) in a forest not so far from Tampere. It was really lovely to be there. I am now really looking forward to spend the last week of July in Ansku's summer place, which I've heard is even nicer.

Thursday, June 19, 2008

gupnp-vala 0.1 released

Initial release of gupnp-vala. Includes Vala bindings for the whole
gupnp stack:

* gssdp-1.0 0.6.1
* gupnp-1.0 0.12
* gupnp-ui-1.0 0.1
* gupnp-av-1.0 0.2.1

- Requires Vala 0.3.3
- custom GUPnP types (like GUPnPURI) are not supported yet, use plain
strings instead. Custom type support will return shortly in svn
version.

Tuesday, June 17, 2008

tracker dep will soon be dropped

This is just to inform everyone that I do realize that a hard dependency on tracker is not the way to go and this is just a temporary measure. I am writing a gstreamer/gio based metadata extractor as we speak. Although I'll try my best to get this done before GUADEC at least, it might take longer since I do this on my spare-time (something I don't have in abundance).

Disclaimer: I am not against tracker and I *will* keep the current tracker-based media source (as a plugin), though i might need to drop that as a temporary measure for while until i get the plugin system implemented.

GUPnP developer tools 0.6 released

network-light:
- Remove the unneeded periodic notification to susbscribers.
[Zeeshan Ali Khattak]
- Create a new UUID for each instance of network-light.
[Hugo Calleja, Zeeshan Ali Khattak]
- Use the new gupnp_root_device_new() API. [Jorn Baayen]

universal-cp:
- Display the device presentation URL [Ross Burton]

general:
- Fix `make distcheck`. [Zeeshan Ali Khattak]

GUPnP-AV 0.2.1 released

- Correct function prototype. Fixes #940. [Jorn Baayen]
- Include the glib header to satisfy vala-gen-introspect. [Zeeshan Ali Khattak]

GUPnP 0.12 released

- Add tool for generating convenience C wrappers for GUPnP service definitions.
[Ross Burton]
- Remove xmlDoc argument from gupnp_root_device_new() for simplicity.
(xmlDocs can still be passed to gupnp_root_device_new_full())
[Jorn Baayen]
- Better documentation, new tutorials and sample code. [Ross Burton]
- Improved support for Accept-Language header. [Jorn Baayen]
- Various internal improvements. [Zeeshan Ali, Jorn Baayen]

Sunday, June 15, 2008

gupnp-media-server now written in Vala

I finally managed to port all the existing C code to Vala. What did i achieve from this exercise? For one thing, the code got much simpler, with LOCs being reduced from 2101 to 1117 (46.8 %). Also this proves that (at least the server-side) GUPnP's Vala bindings are already in a stable/usable state.

Special thanks to Jürg Billeter, Ali Sabil and Jussi Kukkonen for their continuous support during this exercise and for quickly fixing bugs that I reported.

Thursday, June 5, 2008

Friday, May 30, 2008

Dear Python, leave me alone

So yet once again Mr python decide to tease me when i do `apt-get dist-upgrade`:

Setting up python-lxml (2.0.5-1) ...
/var/lib/dpkg/info/python-lxml.postinst: /usr/bin/pycentral: /usr/bin/python: bad interpreter: No such file or directory
dpkg: error processing python-lxml (--configure):
subprocess post-installation script returned error exit status 126
...
Errors were encountered while processing:
epiphany-extensions
bzr
gnome-media-common
libgnome-media0
gnome-media
pidgin
python-lxml
E: Sub-process /usr/bin/dpkg returned an error code (1)

My new personal hero

Meet my new personal hero, Jussi Kukkonen. The only o-hand employee in Finland who almost single-handedly created the Vala bindings of the whole GUPnP stack and ported all our test apps to Vala in a very short amount of time despite the fact that he was completely unfamiliar to Vala and GUPnP (and UPnP itself) when he started working on this task and the fact that the Vala documentation is hardly any complete (especially binding-generation).

Saturday, May 24, 2008

Why Vala?

When I told some people that I will write (which involves re-writing existing code first) the gupnp-media-server in Vala, their question was "Why Vala? Why not Python, Java or C#?". So here are the strong points of Vala, not all of which are found in these languages:


  • Statically-typed

    Back in the days, when I was hacking on Gazpacho I found the lack of types on variables and function/method parameters really annoying in Python. This can become quite a pain when you are reading other's code and that is exactly what I was doing most of the time. The fact that Johan and Kalle wrote very nice and readable code, helped a lot though.

  • No runtime dependency/overhead

    This might seem like a small point to many developers but as an embedded-systems developer, this is a big plus for me and I am sure to many (if not most) of the embedded-systems developers out there.


  • Easy integration with C/GObject

    A big plus for all the GObject/C developers out there. Besides, there are situations when writing code in any language other than C or C++ is not possible/viable and such easy integration would make life very easy. Recently a colleague of mine had to bind a gobject-based library for Python and it turned out to be a lot more pain than I imagined. This impression is based on the fact that so many of GNOME developers have taken python so serious and so many of the GNOME apps are being (re-)written in Python.

    This point is very important when it comes to writing frameworks and libraries since if you write them in a language that doesn't qualify as a LCD, you are pushing your choice of language on the application developers you aim to attract. Since Vala translates to a language that does qualify as LCD, it in turn also qualifies as one.

    An important bit here is that this integration is bi-directional, i-e one can use the classes written in Vala very easily from C. In fact this is much easier than doing it the other way around as you don't have to write any bindings.





UPDATE:I am sorry if my ideas hurt someones's feelings attached to some particular language. If i have hurt your feelings, there is no need for insults, I didn't force you to read my blog. Just writing this after removing an insulting comment from an 'Anonymous' dude.

Monday, May 19, 2008

GUPnP developer tools 0.4 released

- Use libsoup 2.4. [Jorn Baayen, Zeeshan Ali Khattak]
- Incremental browsing of containers. [Zeeshan Ali Khattak]

GUPnP-AV 0.2 released

- Use libsoup 2.4. [Jorn Baayen]
- Add DLNA support to DIDL writer. [Jorn Baayen]
- Some small fixes. [Jorn Baayen]

Sunday, May 18, 2008

Vala is great!

Ever since Jorn and Matthew mentioned the idea of Vala bindings for GUPnP, I have been eager to learn Vala and so this weekend I finally got around to introduce myself to it. It's really cool. To express my admiration, I have already created a "Vala programming language fan club" group on facebook. :) A few minutes after I mentioned to Emmanuele on IRC about my intention of binding GUPnP for Vala, Ali Sabil had already done the basic work and we already have bindings that work for such basic example application at least:

using GLib;
using GUPnP;

public class Browser: ControlPoint {
public MainLoop main_loop { get; private set; }

private void on_device_proxy_available(ControlPoint cp,
DeviceProxy proxy) {
stdout.printf("device %s found\n", proxy.get_friendly_name());
}

private bool on_timeout () {
this.main_loop.quit();

return false;
}

public Browser() {
this.client = new Context(null, null, 0);
this.target = "ssdp:all";
this.resource_factory = ResourceFactory.get_default();

this.main_loop = new MainLoop(null, false);
}

static int main(string[] args) {
Browser browser;

Thread.init();

browser = new Browser();

browser.device_proxy_available += browser.on_device_proxy_available;

browser.set_active(true);

var time = new GLib.TimeoutSource(5000);

time.set_callback(browser.on_timeout, null);
time.attach(browser.main_loop.get_context());

browser.main_loop.run();

return 0;
}
}


If you are really anxious to try it out, you can get it here but please keep in mind that it needs a bit (at least) of polishing/love before it could be taken seriously.

Moving in business

I am finally moving in with my girlfriend, Ansku. It's been 1.5 years we have been together and now we are moving in. The place we are moving into is in Helsinki and very near to the Helsinki center. A nice apartment very near to the railway station of Huopalahti. The good thing about this train station is that a lot of trains go through it so if you miss a train, there is another one to catch after 5 minutes and the slowest train takes 15 minutes to reach the Helsinki center.

We are supposed to move on 1st of june and some nice dedicated friends have already promised to help us carry stuff.

Wednesday, May 14, 2008

GUPnP 0.10 released

- Use libsoup 2.4. [Zeeshan Ali Khattak, Jorn Baayen]
- Use g_timeout_add_seconds(). [Jorn Baayen]
- Use GIO instead of xdgmime. [Jorn Baayen]
- Support HTTP Range header in the HTTP server. [Jorn Baayen]
- Use GMappedFile to mmap served files of read()ing them. [Jorn Baayen]
- Improved documentation. [Ross Burton]
- Spew HTTP messages to console when GUPNP_DEBUG is set. [Ross Burton]
- Various other fixes. [Ross Burton, Zeeshan Ali Khattak, Jorn Baayen]

download: http://gupnp.org/sources/gupnp/gupnp-0.10.tar.gz

GSSDP 0.6 released

- Use libsoup 2.4. [Zeeshan Ali Khattak, Jorn Baayen]
- Use g_timeout_add_seconds(). [Jorn Baayen]

download: http://gupnp.org/sources/gssdp/gssdp-0.6.tar.gz

Sunday, May 11, 2008

A week of Xbox fun

While my MediaServer implementation is still in it's very infancy, I was already asked by more than two people if it will work with Xbox. I didn't have a clue since I don't have an Xbox so I asked Naba if i can visit him on some weekend to find some clues but he was kind enough to lend it for a week instead. For the past one week I had been having lots of fun with it. This nice page by Frank Scholz gave me headstart and I was able to get Xbox see my MediaServer rather sooner. The only other achievement I had in the whole week is that Xbox is able to see the videos but can't play it (most probably because I don't give it all the metadata it requests).

The good thing is that now i have a very good idea of what Xbox expects from my MediaServer and I am very hopeful on getting my MediaServer working with Xbox at some point. Here is the log of all the SOAP messages I get from Xbox for anyone interested.

Wednesday, May 7, 2008

Karl Lattimer is my hero

I just can't help but appreciate how this dude comes to my desk and solves my complicated problem within minutes. My python problems were all solved when he removed the link (/usr/bin/python) to absolute path (/usr/bin/python2.5) and recreated it, only this time using relative path. Either he is too smart or I am too stupid. :)

Sunday, May 4, 2008

python strikes back

The joy of getting my python problems fixed on my debian testing were short lived. This time when i ran `apt-get dist-upgrade`, apt failed saying:


ValueError: /usr/bin/python does not match the python default version. It must be reset to point to python2.4
dpkg: error while cleaning up:
subprocess post-installation script returned error exit status 1
...
Errors were encountered while processing:
/var/cache/apt/archives/python-uno_1%3a2.4.0-5_i386.deb
/var/cache/apt/archives/deskbar-applet_2.22.1-1_i386.deb
/var/cache/apt/archives/python-ctypes_1.0.2-4_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


So removed the link to python2.5 and recreated it but this time pointing to pythong2.4. It should fix the problem, right? No! here is what apt says now:


ValueError: /usr/bin/python does not match the python default version. It must be reset to point to python2.5
...

Thursday, May 1, 2008

GUPnP presentation at GUADEC

So my GUPnP presentation for GUADEC has been accepted and scheduled for 14:30 on 11 Jul 2008. It will be essentially the same talk I delivered at FOSDEM but this time I'll try to make sure the demos really do work. :) If you missed it at FOSDEM, don't commit the same mistake at GUADEC. :)

Monday, April 28, 2008

whats wrong with my python setup?

Can any python guru out there explain whats going on here:


$ /usr/bin/gnome-about
Traceback (most recent call last):
File "/usr/bin/gnome-about", line 35, in ?
import gtk
ImportError: No module named gtk

$ head -n 1 /usr/bin/gnome-about
#!/usr/bin/python

$ head -n 36 /usr/bin/gnome-about|tail -n +29

import pygtk
pygtk.require ('2.0')

import gobject
from gobject.option import OptionParser, make_option
import gtk

$ /usr/bin/python
Python 2.4.5 (#2, Mar 12 2008, 00:15:51)
[GCC 4.2.3 (Debian 4.2.3-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygtk
>>> import gtk
>>>

$ /usr/bin/python
Python 2.4.5 (#2, Mar 12 2008, 00:15:51)
[GCC 4.2.3 (Debian 4.2.3-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygtk
>>> pygtk.require ('2.0')
>>> import gtk
Traceback (most recent call last):
File "", line 1, in ?
ImportError: No module named gtk
>>>

UPDATE: Thanks to Karl-Lattimer, the problem was solved by:

# rm /usr/bin/python
# ln -s /usr/bin/python2.5 /usr/bin/python

Saturday, April 26, 2008

gupnp-media-server coming soon..

Next on my TODO is a desktop-wide UPnP MediaServer based on tracker. Basically, it will make all of your media availabe to other UPnP devices that is tagged as "shared via UPnP". I already have a working dummy implementation, based on code from Jorn's rhythmbox plugin. I call it "dummy" because ATM it only exports a hardcoded list of media files. Here is a screenshot of Windows Media Player playing music from it using on2share plugin:

Thursday, April 17, 2008

History Meme

I don't know what the hell is this all about but seems like a cool thing to do and in-fashion these days so here I go:

$ history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head
100 cd
78 make
58 ls
36 vim
22 ldd
21 ssh
12 git-diff
11 src/av-cp/gupnp-av-cp
10 git-log
10 ./autogen.sh

Saturday, April 12, 2008

talking of overnight changes

My last blog entry reminds me of what my bank (Sampo bank) recently did. They were recently bought by a Danish bank and as part of the integration process, the e-banking system of Sampo was replaced by a stupid system that Danish bank had been using. The biggest problem with it is that it doesn't work on every machine, not even all i386 running windows. The result was that a large number of customers moved there money to other banks. Fortunately for me their system do work on this Linux laptop I am using to write this blog entry but my 64-bit desktop is another story. :( According to Riku Voipio, the problem is that they are using some 'native code' in their JAVA applet, now how pathetic is that. These kinds of things happen when a bunch of no good managers with no (or not enough) technical knowledge make decisions about technology behind closed doors.

To add to my agony, their cross-border money transfer has some problems too and if I knew that I would never have used bank-to-bank transfer as the method to send money to my mother for her chemotherapy. I had to call my ex-boss to talk to his friend who works in the destination bank and he just told us that the Bank's branch number/name wasn't conveyed to them.

SOAP support dropped from libsoup

Soon after I announced the release of gupnp-tools/av, someone pointed out that libsoup-2.4 is already out and therefore gssdp and gupnp needs to be ported to the new API. I am already done with the porting of gssdp and most of the gupnp (thanks to Dan Winship for being so helpful) but then came the shock: the SOAP support has suddenly been dropped from libsoup. I blamed my ignorance on me not being subscribed to libsoup ML so I started to dig into the archives but failed to find any mention of this change.

I know how to solve this issue and I am sure Dan will help me out in this one as well but IMO APIs should be deprecated first and then removed in the next major release.

Tuesday, April 8, 2008

stupid blogger.com

If you have recently seen a post by the name "Back to Hel(sinki)", from me, please ignore that. It's just just blogger.com (or is it p.g.o?) punishing me for adding tags to a two week old post. :(

GUPnP Tools 0.3 released

This release features AV Control Point, a simple media player UI that enables one to discover and play multimedia contents available on a network. Hopefully a useful tool to test and debug UPnP MediaServer and MediaRenderer implementations. [Zeeshan Ali]

Other changes in this release:

- Desktop file for each tool. [Ross Burton, Zeeshan Ali]
- New Icons. [Vinicius Depizzol]
- Various misc improvements and fixes. [Zeeshan Ali]

Download from http://gupnp.org/sources/gupnp-tools/gupnp-tools-0.3.tar.gz

Here is a screenshot of GUPnP AV CP in action:

Introducing GUPnP A/V

The first release of GUPnP A/V is now available. GUPnP A/V is a small utility library that aims to ease the handling and implementation of UPnP A/V profiles.

GUPnP A/V is free software released under the GNU LGPL.

Saturday, March 29, 2008

Back to Hel(sinki)

I am back in Helsinki. Regarding my mom, when we last spoke to the specialist she said the Cancer is at the level 3 (4 is last) and therefore my mother has to go through extensive/expensive chemotherapy sessions which will last for 6 months or so. Now me and my canadian sister has to arrange the money and Saima is supposed to take care of the rest. Other than that, it feels good to be back with my love.

Sunday, March 23, 2008

GUPnP 0.8 released

While I was having fun with the extremely slow Internet connection here and other family issues, Jorn rolled-out another GUPnP release. Here is the release announcement:

GUPnP 0.8
=========

- New API allowing for subclassing of resource types.
[Zeeshan Ali, Jorn Baayen]
- GUPnPDeviceInfo returns subresources with version greater or equal than
requested version. [Jorn Baayen]
- Servers announce versions less or equal than implemented version.
[Jorn Baayen]
- Make gupnp_context_get_server() public. [Jorn Baayen]
- GError arguments added to all error signals. [Jorn Baayen]
- Improved resubscription handling. [Jorn Baayen]
- Various other fixes and internal improvements
[Ross Burton, Zeeshan Ali, Jorn Baayen].


One big reason to roll out a release at this point was to make way for a gupnp-av and gupnp-tools release, which will follow shortly so stay tuned. :)

Linux+Gtk-based ATM

Last year when i visited Karachi, I talked about Linux+Gtk-based ATM machines being actually deployed and used in my blog. Plenty of people asked me for any pictures but I didn't have any at that time. No worries, here you go:




If you are interested, please contact Aero-car which still makes these.

Last one week

I have been in Karachi for the last one week. My mom is much better now and seems to be recovering fast. The doctor says she still needs a few chemotherapy sessions are there are still some microscopic tumours left but she said this is nothing much to worry about.

We just got her an apt on rent in more secure and less polluted area which obviously costs a lot more money but I've agreed with my Canadian sister to only pay the rent and she'll pay the rest of the expenditure. The biggest reason for this was to move her so close to Saima that Saima could take care of her while her children are at school.

The most recent event is that yesterday, someone robbed my biggest sister (who also lives in Canada but is currently visiting pk) of her bag at gunpoint while she was travelling in a rickshaw. The bag contained amongst other things, all her documents and cards. Normally she doesn't carry important documents in that bag but since it was her last day, so she made an exception. Now most probably, she'll have to go through a long process to get a new passport and Visa. I wonder if the authorities can make an exception in this case and let her travel with some other temporary document but we'll only know till Tuesday because they are closed for easter tomorrow.

Thursday, March 13, 2008

Status update

My mom had the tumor removed on last monday but she might still need some chemotherapy. All my sisters are already there and I am leaving for Karachi on Monday morning to be there for two weeks.

They say that comedy is the best relief when you are feeling very sad and i think they are right because watching south park every evening really does make you feel better. Yes yes! it sounds very old school to all my western friends but it's not my fault that it was never broadcasted in Pakistan.

Tuesday, March 4, 2008

Lesson of the day

If you get a segfault, the debuggers are unable to give you a nice backtrace and g_slice is being used by your code or any library that your code links to, then don't forget to set the environment G_SLICE to 'always-malloc'

Sunday, March 2, 2008

Too much depression

As the only male child in the family, it was always considered to be my responsibility to take care of my mom and (mentally disabled) sister, Erum. Implicit in this assumption is another assumption that I will marry a girl that will be a house wife and would happily take care of everything at home while I would be busy making money. I could have made piece with the former assumption but the latter would obviously involve me enslaving another person and that simply goes against my basic principles of morality.

When i moved to Finland two years ago, i thought i will be able to live the rest of my life independent and free as at that time it seemed very likely that my mom and Erum will soon be moving to Canada with my sister, Uzma (Api) and her family. Unfortunately, the Canadian authorities denied them immigration an year after i moved to Finland (7 years after the application was submitted) based on the argument that they will be a burden on their social system despite Api's continuous assertion that she will take full responsibility of their common day needs. She is still fighting with the authorities. While, my western friends think very highly of me for sending a significant amount of my salary to my mom, all my relatives and most of my friends in pk think of me as a very bad person for not fulfilling my duties that i mentioned above.

Recently! My mom got diagnosed with cancer. They say that its at a very early stage but the surgery alone will cost a bit more than my salary. It should be possible for me to afford that with credit/loan though but the real problem is who will take care of Erum while my mom is sick. I just hope that she gets cured soon and the Canadian authorities do give them immigration.

To add to my agony, gupnp-av-cp has started to segfault on me. I get different backtraces, none of them making any sense to me. I thought it might be because of recent updates of gtk, glib or libsoup but i tried older versions of all of these but the segfault still remains. According to Mr. valgrind, this is a problem in libsoup.

Tuesday, February 26, 2008

GUPnP presentation at FOSDEM

My GUPnP presentation at FOSDEM turned out to be not so unsuccessful after all:



Anyone interested in the presentation material can get it here.

Sunday, January 13, 2008

FOSDEM2008

If you have been looking for a better reason to go all the way to Brussels to attend FOSDEM, look no further; I'll be presenting GUPnP there. :)

GUPnP news in c't

Recently the c't magazine mentioned our dear GUPnP project and published some pictures of my UI (I am hoping to see it tomorrow *if* Stefan remembers to bring it to office). That resulted in at least one person getting interested in our project. AFAIK, everything worked out of the box on his Fedora Core 6 but he was unable to see anything in any of the client-side tools. After a few mails and some help from Christian, it turned out to be the default firewall settings on fedora.

London trip

Since my sister was staying at London for a few days on her way back from Pakistan to Canada, I arrived at London around the same time to meet her and her family after 4 years or so. I hung around with her family and some relatives of my brother-in-law for the first 3 days in London and Oxford. The last day, I spent at Cambridge.

Mostly it was nice and fun but there were some things that just didn't seem right. It was quite hard to adapt to the "separate water taps for hot and cold water" system of theirs and the fact that you hardly get any water out of the shower when you want warm rather than cold water. I wonder why they take 90€ for a visit visa. Also! I thought Ansku was over-exaggerating when she used to tell me that pubs in Britain close at 11pm but to my surprise We were kicked out of the pub in Cambridge before we could finish our first pint. Err.. Then people say why would someone want to move to Finland.

New Job

From the start of 2008, I've been promoted to the role of Lead Developer/Architect in a new team (same organisation, same company). Although I need to prove myself before this appointment is made permanent, I am hoping I'll make it through.

X-mas fun

I spent this X-mas with Ansku and her family. I never had such a fun X-mas ever.

Divide and Conquer

As some of you might have noticed, I've started to divide each one of my blog entries into multiple logical entries. This is to allow the readers of my blog to be able to filter my blog better. For example, some reader might be interesting in my opinion on UPnP but not on the death of Benazir Bhutto.