Tuesday, December 11, 2007

Regarding Jeff Waugh

Only wanted to apologise for *unconsciously* creating the impression that I agree with all the points mentioned by Murray Cumming against Jeff. That is not the case and I only agree to what I myself also observed based on my own experience that I described in my blog.

GUPnP AV CP

They say, a picture is worth a thousand words, so here is the gupnp-av-cp playing a song from my n81 on the coherence media renderer:




Many thanks to Frank Scholz and Visa Smolander for helping me in making sense out of UPnP specs, otherwise I still would have been confused on how to implement them. The CP is not yet ready but I will try to complete it before the end of the year 2007.

I would like to avail this opportunity to make it very clear to everyone that I have nothing against Coherence project and/or python, in fact I have been using Coherence myself extensively to test my GUPnP code. The reason people get the impression that I am against coherence/python is that I express the following reservations of mine regarding python, quite often and I end-up giving a wrong impression:

1. I do not believe that python is ready for embedded systems yet and vice versa. Both python and embedded systems need some time before they can be happily married.

2. There is also the fact that when I would write (or support) a framework, I would like that to be equally attractive for all kinds of developers and the best way to do that would be to write it in C. That way, once I have the framework ready, I can provide wrappers for all kinds of languages, including python. OTOH, when writing an application, I might want to do it in python myself (assuming that I don't expect it to be used on embedded systems).

On a side-note, I have been talking about UPnP so much that Ansku recently had a dream in which someone was talking to her about it. :)

Monday, November 26, 2007

Thanks to dobey as well

Just writing this blog entry to make my gratitude to dobey for putting my hackergotchie on planet.gnome.org, very public. :)

Thanks Murray

I couldn't have said it better. What made me really pissed is his lying tactics. I once mentioned on the gnome foundation ml about me waiting for his replies for more than an year (literally) and I got a quick reply from him telling me that he has sent me replies. I believed him (after all he is the director of gnome foundation), assuming that his mails must have ended up in spam folder for some reason but all of a sudden my spam filter started see his mails as not spam. After a little conversation, he promised to put my hackergotchie on the planet and after that I started to receive complete silence from him again. I send him reminders from time to time but I never got any response (it's been 2.5 months now). I am sure, he'll tell me that he has been sending me responses if he reads this blog entry or if I make it an issue on the gnome foundation ml again but I see no reason to believe his word anymore.

P.S. If the 'reply-to' header of an email only contains the addresses of the receivers only, I won't blame my spam filter to treat the email as spam. :) I notified Jeff about this and this was his reply:

>>P.S can you please set the correct reply-to header in your emails.

My client does what it's told to do.

Friday, November 23, 2007

In search for Bertrand Russell

In search for Bertrand Russell on video.google.com, I found two video clips that I wouldn't have expected, one is a clip from an old bollywood movie where the hero is given an opportunity to conduct an interview with Russell and another is video of the song 'Jihad' by Singing Fools. The former is a bit surprising but I didn't quite catch the jihad song and it's connection with Russell. Also
I knew that americans were supporting Jihad in the 80's but didn't know they were so loude and active in that.

clutter-gst

After I was informed about the existence of ClutterGstVideoSink, I quickly modified my super-video application to make it use that. But as soon as i did that, i stopped getting even the static image. After careful analysis for days, I figured that I was supposed to call gst_bus_add_signal_watch() on the pipeline bus since ClutterGstVideoSink uses messages on the bus combined with signal handlers to render the frames in the application thread. This is obviously a 'dirty' hack; a hack because gst elements are supposed to do all the media processing in the pipeline thread, dirty because gst bus is not meant for media transport.

After this realization, I had been working on it from time to time. First I tried to make the actual rendering happen in the gst pipeline thread by using the clutter's thread safety primitives and that worked quite nicely in the end except for one minor problem: The call to clutters rendering thread blocks if it happens after the clutter main loop has been exited and that is exactly when you set the pipeline to NULL state. If anyone have any clue on how to solve this problem, do let me know. In the meanwhile, I have made the hack non-dirty (or should I say, less dirty) by replacing 1. pipeline bus usage with an internal async queue and 2. bus signal handlers with idle functions (read g_idle_add()). This one was way easier to implement and it worked without any problems with all the test applications I have. I've submitted the patches upstream via a bug. If you are interested, please try them out and report your observations to the bug.

UPDATE: Just tried the 'rendering in the pipeline thread' changes again and now I remember that there is another critical problem with that: the whole application hangs (both app and gst pipeline) when I seek and/or play and pause very quickly. :(

Monday, November 12, 2007

Playing video on ClutterTexture

I thought this would be an easy task and should be doable in a weekend but seems I wasn't completely correct in my assumption. What I did was to try to modify the super-oh example application to make it render frames from videotestsrc element of gstreamer, instead of the OH logo (no offense OH guys). For some reason the animation stops after I render the first frame. All I get is a static image like this:



My hunch is that I am just missing something small here so if anyone have a clue, please let me know. Here is the source.

I know that using fakesink's handoff signal isn't the recommended way to do this but I'll concider writing a cluttersink after I get this simple app. working.


UPDATE: I've been informed about the existance of ClutterGstVideoTexture and ClutterGstVideoSink by Emmanuele and Ross. Looking at the sources, I think I'll need to hack on it to support YUV (if it's available). That shouldn't be a problem but I would also want to try to implement this trick to bring hope to poor ATI grahics card users like me.

Sunday, October 28, 2007

From 28M to 2.7M

As some of you already know, I've been working on a simple AV-specific control-point as part of gupnp-tools. While at it, I've been trying to keep the UPnP AV parts as separate and generic as possible so that they could be move to a separate library later on. One of the first things that everyone wanted to create a nice wrapper for is the ugly DIDL-Lite. Jorn tried his best to convince me and others to not create a GObject for representing each DIDL-Lite object but I didn't listen and ended-up writing a very resource hungry API. To see what i mean, please look at memory usage of gupnp-av-cp after populating it's treeview with the content hierarchy exported by coherence:



I was quite sure that most of this 28M is taken by xmlDoc and I was right. Now that I have got rid of xmlDoc usage and replaced the gobjects with an API to deal with xmlNodes, here is how the memory usage looks like:




For people who are curious on how this simple AV control-point would look like, here is a screenshot:



One reason why the development of GUPnP might seem much slower compared to that of other UPnP projects out there is that we (especially Jorn) are trying our best to provide a nice and simple API while making sure that no part of the project is resource hungry as we are targeting embedded systems where saving bytes is more impotant than providing lots of features. Jorn already have a plan and some half-baked code for the handling of DIDL-Lite xml and contents on the server-side (ContentDirectory implementation) without wasting lots of memory and CPU.

Tuesday, October 16, 2007

I give-up!

Finally! I found a person who claims that Mango Lassi and Milk-shake taste different to him: Daf. So I see no choice but to change my claim to:

Mango-Lassi is the name of a typical 'western' drink that consists of two extremely delicious items: Lassi and Mango. However, the drink is completely unknown to people who are born and raised in a particular town in the south-eastern part of Sindh which is famous for it's production of Mangoes and a particular Lassi shop all around Pakistan. IMHO, those people should not be blamed for their ignorance since they are quite far from the western world to know about such new inventions.

Monday, October 15, 2007

My first LEGO rover





For some reason, I am unable to connect the mindstorm IDE to communicate with the mindstorm using bluetooth so I use USB for downloading my programs to NXT. Didn't get a lot of time to play with it but the first thing I would want to build is a rover that move in a straight line but turns left (or right) if something comes in front of it (already done) unless if it's a red ball in front of it and pick it up instead and keep going.

Tuesday, October 9, 2007

Mango and Lassi, two separate objects

There is no such thing as Mango Lassi. There is Lassi and then there is Mango, both very delicious but separate objects and both lose their taste as soon as you combine them. Unfortunately, many Indian/Nepalese restaurants in europe are spreading the wrong message just to simply their task of selling both on the same ignorant (of Indian cuisine) customer. I was already annoyed enough by the Waiter bringing me a Mango Lassi each time I order a Lassi in Nepalese restaurant and now I'll be seeing (maybe also using) a nice free software project by the same name. :(

GUPnPResourceFactory

As soon as I started to write gupnp-av-cp, I realized that I need to subclass resource (device and service) proxy classes but the resource proxies are created by the control point object on discovery and there was no way of telling control point to create objects of your subclass instead. The obvious solution that comes to mind is to add an API to control point for registering your subclass' gtype against a UPnP resource type. Unfortunately, that won't work since device proxies also create device proxies for embedded proxies and services.

So the final solution, which is already implemented and committed to svn is a separate class, GUPnPResourceFactory whose sole responsibility is to create resource and resource proxy objects and to provide an API for registering and unregistering UPnP resource type to gtype assignments. Each GUPnPControlPoint and GUPnPDeviceInfo-derived object is assigned a GUPnPResourceFactory object on creation. You can get a pointer to the factory used by the control point or root device by using the appropriate getter function. Once you have the factory, you can simply register and unregister your subclasses to it.

Monday, October 1, 2007

I hate Philip Van Hoof

What was he thinking when he mentioned this cool toy on planet gnome? Didn't he know that a few of p.g.o readers can't possibly resist it. Believe me i tried very hard but failed miserably to convince myself that I can't afford it yet. So I placed the order today. I should get it in a week or two. If I get lost in this toy, please send lots of hate mails to Philip, subscribe him to lots of porn websites etc etc.

Seems I'll be flashing the brick with brickOS at some point but I guess in the beginning I'll keep it's 'mind' running on my laptop, controlling it's body over bluetooth.

Sunday, September 23, 2007

GUPnP Release announcements


GUPnP Tools 0.2
===============

This release features Network Light, a UPnP-enabled software-based light bulb
that provides Switch Power and Dimming services, as defined by UPnP forum as
'DimmableLight v1.0". It is mainly intended to be a simple example of a UPnP
device based on GUPnP, and a demonstration of simplistic yet powerful GUPnP
API. It can also be used to debug generic and DimmableLight control points.

Changes to Universal Control Point in this release:

- Use of gtk stock icons wherever appropriate.
- New cool icons from Lapo Calamandrei, licensed under GPL
- Use icon from the Device, if available, to represent it.
- Subscribe to services, by default.
- Ability to copy&paste details and events.
- Lots of code cleanup and refactoring and misc fixes.

GUPnP 0.6
=========

- Added service signal autoconnection feature in the spirit of
glade_xml_signal_autoconnect(). [Zeeshan Ali]
- Fixed various bugs related to object destruction. Fixes #500, 503.
[Jorn Baayen]
- Accept 'yes' and 'no' boolean values. [Zeeshan Ali]
- More information in error messages. [Zeeshan Ali, Jorn Baayen]
- Mark GUPnPServiceIntrospectionCallback() 'error' argument as 'const'.
[Jorn Baayen]
- Fixed gupnp_device_info_get_model_number() to return the right value.
[Zeeshan Ali]
- Moved the uuid dependency to Requires.Private, and removed the
shared-mime-data build dependency. [Jorn Baayen]
- Various other minor fixes. [Zeeshan Ali, Jorn Baayen]

Special thanks to St├ęphane Loeuillet for stress-testing the library and
discovering many bugs. (Which are all fixed in this release. :) )

GSSDP 0.4.1
===========

- Pass the correct value to n_columns argument of gtk_list_store_new().
Fixes bug#501. [Zeeshan Ali]
- Move libsoup requirement to Requires.Private. [Jorn Baayen]
- Fix compiler warning. Fixes #421. [Priit Laes]


Downloads from: http://gupnp.org/sources/

Sunday, September 16, 2007

DAAP vs UPnP MediaServer

While I believe that Lennart's work on free implementation of Apple protocols is very important for the wide-spread acceptance of free software, I fail to see any fact(s) that could support his claims like "I believe that DAAP is the superior protocol in comparison to UPnP MediaServer". When he was visited our office for his presentation on Avahi, he claimed that Zeroconf is better than UPnP itself, his argument being that Zeroconf uses simple ASCII text files and that makes it much more compatible with other Internet protocols, while UPnP uses XML (corrections welcomed). Here are a few points for him to consider:

  • UPnP is much more than addressing and discovery: Zeroconf defines standards for the addressing and discovery of services on a network but do no define any means for description, control, event notification and presentation. While this allows the services to choose any mechanism for any or all of these, the point being that UPnP itself isn't really comparable to Zeroconf but only two of it's parts.

  • ASCII is superior to XML?: how come? Just because MS supports XML or other Internet protocols didn't choose to use it?

  • "Microsoft/Intel started to include a similar technology in UPnP, the UPnP MediaServer". Media Server is based on UPnP not part of it in any way.

  • It's pronounced GUPnP, not gUPnP (thats the logo). :)

  • GUPnP is *not* an implementation of any particular service or device but a framework to create control-points, devices and services on top of it.

  • RAOP is obviously not superior to Media Renderer as it uses modified RTSP/RTP, while Media Renderer (and Media Server) standards allow you to implement any number of protocols for streaming the media, while it mandates the HTTP protocol so all devices have at least one protocol in common. Since these technologies target streaming of non-live media between devices connected to local LAN, I really don't see any reason not to just use HTTP.
Blog moved to blogger.com

I am moving my blog to blogger.com so that people can comment on my blog. Nothing should change for subscribers of my blog as advogato has blog syndication feature.