Travels music, friends and some more stuff

After coming back to Chile I went for a weekend to Berlin. My friend Luis is living there and also Mario did a little trip from KΓΆln to Berlin. The funny thing is that it was supposed to be a surprise for Luis, but they parents were visiting him _the same_ weekend. So finally we managed to get dinner and stuff all togheter. The surprise for me was that Diamanda Galas was singing (she tours rarely) that Saturday on a church at Berlin!. We mamaged to get ticket, and I enjoyed it very very much. Quite impressive to see/listen to her live.

I am really proud of my friend Luis Carlos: he is hacking a wireless driver for the linux kernel for OLPC.I still remember when we went to Seville Guadec and our hacking action at Eurielec

During this week I had a severe sleep disorder, ending with this Friday not being able to sleep until 8 or 9am and then waking up at 17pm without hearing the alarm clock. Really bad πŸ™

Finally I went to Tallinn on Saturday/Sunday. I really love that city. Nice coffeshops, nice shopping, nice restaurants and good Sushi!

No, the ending was the song of the week: Coin, Operated boy by Dresden dolls.

Posted in Uncategorized | Leave a comment

Encuentro Linux Chile, Talca

We are having nice talks and hacking sessions here in Talca. I did yesterday my presentation about GNOME past, present future. This evening g mariano is talking more about GNOME projects.On Saturday, during the GNOME day I’ll talk about maemo. Nice people, nice place and nice food.

Posted in Uncategorized | Leave a comment

Gtk+ performance

Xan has been measuring gtk+ performance on ARM using some different gtk+ flavours:

  • maemo-gtk (2.6)
  • stock gtk+ 2.10 + stock cairo
  • gtk+ 2.10 patched to use XFT for text rendering
  • gtk+ 2.10 + cairo patched to use the magic number tecnique for the fixed_from_double

Interesting results. Read it: Gtk+ Performance Measurement (I)

Posted in Uncategorized | Leave a comment

Scripting your desktop with dogtail

Today I was preparing some slides for my upcoming talks at 7th Encuentro Linux 2006 in Chile. I had planned to use some music in sync with some slides. However embbeding music in OpenOffice Impress is not easy. Also I’d prefer to use a PDF with evince in presentation mode. Solution? Using evince for display slides and totem for playing the music, both syncronized using a dogtail script. Here are the fundamentals:
Guess what page evince is displaying from:

If the page has changed, check in an array if the new slide has music. If no music associated, press pause button on totem. If music associated, search totem playlist for the song and press play button. That’s all: 30 lines of python where you can embbed your music array:

#!/usr/bin/python


import gtk
from dogtail.tree import root

music = {}
music['3'] = '03. Nina Simone - Pirate Jenny'
music['5'] = '04-raimon - diguem no.mp3'

current = '0'

def check_music():
        global music, page, play, totem, current

        if current == page.text:
                return True
        else:
                current = page.text


        if music.has_key(page.text):
                entry = totem.child(roleName='table cell', name=music[page.text])
                entry.doAction('activate')
                if play.name == 'gtk-media-play':
                        play.click()
        else:
                if play.name == 'gtk-media-pause':
                        play.click()

        return True


evince = root.application('evince')
toolbar = evince.child(roleName='tool bar')
page = toolbar.child(roleName='text')

totem = root.application('totem')
play = totem.child(name='gtk-media-play')

tag = gtk.timeout_add (500, check_music)

gtk.main()

Next improvement would be adding a gui for creating playlists, associating PDF presentation and slides, lauching evince and launching totem with the created playlist

Posted in Uncategorized | Leave a comment

dyckola: bye bye

Last Thursday I was watching a really bad spanish movie on my computer when it just died. No power up, so I though that it was a problem with the power suply or the motherboard. It was a really old computer: 1998. I upgraded it twice, with a new hd and later, two years ago with an old motherboard/micro that my friend Luis Mago gave me. So it was a good time to buy a new desktop computer. On Friday I went to verkkokauppa, a computer store very close to Nokia NCR in Helsinki, with moi. So on Saturday morning I set up my new computer, with a very big surprise: my old hard disk was also dead. Only a little bit of noise on power on, and nothing, no more. Everything lost: my music, my documents, my writtings, my pictures… 8 years of stuff. It is a big coincidence, because some days ago Jesus warned me about hard disk failures, so I bought a dvd writer for doing backups. But I got this lumbago pain so I delayed the dvdrw instalation a few days…and then it died! πŸ™

The instalation of the new machine was funny, I got a asus motherboard with the JMB363 SATA chipset. None of my on-cd distros (thanks Novell for the SuSE boxes) recognized this chipset, and the DVD drive was not functional. I googled a bit, and I needed some brand-new kernel to make it work with the all-generic-ide param. No luck. I tried Fedora Core 6test2 with a pretty kernel panic. I need to hack a little bit to get a Fedora rawhide 2.6.17-1.2586 kernel booting on my machine and inside a bootable CD. After that I tried to do a network installation. FTP failed a lot, so I finally got the minimal installation with HTTP.

Now it’s time to try to recover all my data from the dead hd. So, lazy web:
Do you have any experience with data recovering companies?
It’s a 120 GiB HD with 7 ext3 partitions. Something giving me the full data on DVDs and not very expensive would be great. If you can recommend me any company it would be great.Thanks!

Posted in Uncategorized | Leave a comment

Wireless music at home

Yesterday I assembled my new IKEA desk. It’s nice to have my computer again on a desk :). In Madrid I used to connect my computer audio output to my Hi-Fi system to be able to listen to my mp3/ogg/flac music on the living room with a long RCA audio wire. However that is not anymore possible in my new apartment. I though about some other solution to play my music. First I considered buying an Apple Airport Express: 130$. Then I realized that I already have a gadget with wireless and audio output: my Nokia 770 so let’s code it!.

  • First I need a music server: after some web crawling tangerine was the perfect piece of software, quick, easy and just works.
  • Then I needed some DAAP client code for the 770: python-daap looked great, so I could write a quick 770 python player.
  • I did some local testing on my computer and I had to hack python-daap to connect/disconnect after each request, because downloading more than one song was failing: ugly hack for python daap
  • Finally a quick and dirty test player in python for the 770, based on the Muine idea: Add — Play/Enqueue

So after ~200 lines of python I got it:

My Hi-Fi system with the 770 connected wih a jack2RCA wire


Main play window


Add Song window

Here are the files:

Currently DAAP server address is harcoded and stop button is not working, so there is lot of stuff to do:

  • add some Avahi python code to search for music servers
  • Make stop works
  • download next song 10 secs before playing it to avoid delays
  • Support for remote playlists (in client and tangerine)
  • Create real .deb packages with .desktop files so you don’t need to run it in a console with
    run-standalone.sh python2.4 ./n770.py
Posted in Uncategorized | Leave a comment

Hacking at GUADEC

Really nice GUADEC week here in Vilanova. Interesting talks and meetings. Of course, lot of party and hacking. Yesterday, with the help of Lorenzo Gil I added support to pygtk to report a bug with bug-buddy when an exception happens. Today Arturo, Antonio and me hacked a little application using the hdaps driver for IBM sensor to do funy things with compiz: gtollina.c: (click on it to watch the video)

Notice that this is version 0.1 (Codenamed “Lorenzo nos va a hacer un Gazpacho en la GUADEC”)

Posted in Uncategorized | Leave a comment

New country, new job, new team

Last Wednesday I arrived to Helsinki. I have joined nokia for working in the maemo team:

Simplified Bug Buddy usgin XML-RPC

Finally with the great help of Brent Smith and Olav Vitters we have a flamant bug-buddy 2.15.0 out of the door. It now makes really easy for the user to submit a bug (crash) report and no long need a sendmail installation working.

Posted in Uncategorized | Leave a comment

Encoding videos for Nokia 770 with GStreamer

Recently I have been traveling a lot. I use to sleep during train/plane/bus travels, but it is not always possible. Also recently I began to watch some TV shows that some friends of mine recommended to me:

  • Alias, by my friend Javi, AKA “Mini Kaster”
  • Desperate Housewives, by my frien Migue, AKA “qu3s0s”
  • Lost, by my friend Andreu, AKA “Aldeart”

So in my travels, when not sleeping it great to watch some of these tv show on my Nokia 770. I was using some scripts based on mplayer or ffmpeg to transcode them to a suitable format for the nokia, but as I wanted to use GStreamer I hacked some bits:

It is an small gst-python application, but if you want to use it, you need some more bits:

  • As nokia770 currently only supports avi, 3gp, mpeg and rm cointainers, you would need the upcoming port of avimuxer to gstreamer-0.10. The patch is for bug #332031, however you current n770 player only wants to demux avis containig “DIVX” fourcc on the avi header. When using mencoder, ffmpeg or transcode there are some hacks to force this fourcc (-ffourcc DIVX for mencoder, -vtag DIVX for ffmpeg or using avifix -F DIVX for transcode). So I added this hack too to this upcoming avimuxer. here is the combined patch against gst-plugins HEAD
  • Also there is a bug on gstreamer videoscale that doesn’t allow you to specify only one of height/witdh and get the other one generated to maintaing pixel-aspect-ratio: bug #338991. However I need to hack again the patch to get it working and also for maintainig both height and witdh being multiple of 16. Of course these size adjustements could be calculated on the transcoder application, but I wanted to use only a simple decodebin without worrying at all of the input file. So here is the combined patch against gst-plugins-base HEAD

Finally here is the python script:gnome-nokia770-encode.py. The UI is HORRIBLE, I just cooked it in some minutes, and the idea is that someone wanting to play with pygtk improve it. Here are some ideas:

  • Make a decent visual design
  • Use gnome-python thumbnail factory to get the thumbnail of the video
  • Add support for command-line options so it could be also a non-interactive script

Send patches!!!.
Many thanks to Thomas, Tim-Philipp Mueller and the other guys on #gstreamer for helping with my dumb questions about gst πŸ™‚

Update:I forgot to mention that also another patch is needed for making the transcode. It fixes a videorate bug which creates an infinite loop when changing fps: bug #339013

Posted in Uncategorized | Leave a comment

RAD in GNOME: We got it

In 1997 Miguel de Icaza and Federico Mena started the GNOME project. We got GNOME 1.0, then we got an usable and accesible Desktop with GNOME 2.0. Recently we got a GNOME 2.14, a desktop that my mum can use. Now, with the release of MonoDevelop 0.10 we finally got Rapid Application Development in GNOME:

  • Open MonoDevelop
  • Create a new project
  • Add some widgets to MainWindow
  • Add Handlers for events

and you got it, just in 3 minutes:

Posted in Uncategorized | Leave a comment