Planet maemo: category "feed:427851df69d0f6bfd4661dcd0352af71"

Zeeshan Ali

Vala is great!

2008-05-20 02:19 UTC  by  Zeeshan Ali
0
0
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.
Zeeshan Ali

Moving in business

2008-05-20 02:19 UTC  by  Zeeshan Ali
0
0
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.
Zeeshan Ali

GUPnP 0.10 released

2008-05-15 03:19 UTC  by  Zeeshan Ali
0
0
- 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
Zeeshan Ali

GSSDP 0.6 released

2008-05-15 03:19 UTC  by  Zeeshan Ali
0
0
- 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
Zeeshan Ali

A week of Xbox fun

2008-05-12 02:10 UTC  by  Zeeshan Ali
0
0
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.
Zeeshan Ali

Karl Lattimer is my hero

2008-05-07 22:11 UTC  by  Zeeshan Ali
0
0
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. :)
Zeeshan Ali

python strikes back

2008-05-04 17:09 UTC  by  Zeeshan Ali
0
0
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
...
Zeeshan Ali

whats wrong with my python setup?

2008-04-28 22:13 UTC  by  Zeeshan Ali
0
0
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
Zeeshan Ali

gupnp-media-server coming soon..

2008-04-26 16:16 UTC  by  Zeeshan Ali
0
0
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:

Zeeshan Ali

History Meme

2008-04-17 19:14 UTC  by  Zeeshan Ali
0
0
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
Zeeshan Ali

talking of overnight changes

2008-04-12 12:11 UTC  by  Zeeshan Ali
0
0
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.
Zeeshan Ali

SOAP support dropped from libsoup

2008-04-12 11:21 UTC  by  Zeeshan Ali
0
0
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.