Tuesday, May 20, 2008

Ogg Support on Canola2

With Canola2 beta9 finally out, people have asked about the ogg support for Canola. Well, let me first try to clarify things a bit: ogg support actually has not much to do with Canola itself, but more with lightmediascanner.

In our architecture, the component responsible for scanning the media, amongst other things, is canola deamon (canolad for short). Canola daemon is Free software, released under the GPL license since its very first version. You can get the source with a simple apt-get source command.

When the user marks a folder as "scannable" on the "Media Folder" section in canola settings, it will call canola daemon to add that folder to the list of folders it will have to scan. Canolad then invokes ligthmediascanner (lms for short) which will scan for media on those folders.

LMS makes use of a very clever plugin architecture implementation, where each plugin is responsible for gathering metadata from that specific type of file it was developed for. So far there are implementations for asf, flac, id3, jpeg, m3u, mp4, ogg, pls, png and rm files. Dummy implementations for audio and video files will index files of given file extensions.

The ogg plugin was making use of libvorbis, which provides the reference implementation for the standard, but it was not being installed by Tuomas' packages. At this moment I sent him an email asking if it would be possible to have the package installed on the device. He then said it was perfectly feasible, but not advisable, as the implementation makes heavily use of floating point operations. Everybody knows how floating point operations perform on our target platform. And it doesn't really fit our purposes.

Tuomas suggested that LMS ogg plugin should make use of libvorbisidec, also known as Tremor, which was specially implemented taking into account those performance problems of floating point operations on embedded devices. It provides a fixed-point implementation for the Vorbis decoder.

At first glance, I thought it would be a really trivial task. With a few modifications in the configure.ac file, the ogg plugin would link against libvorbisidec and everything should just work! And of course I was so very wrong... I first spotted some severe bugs in the lms ogg plugin which were causing segfaults. Having those fixed was the easiest part.

The most difficult thing was to find out after some time digging that libvorbis and libvorbisidec implementations are not compatible at all. Only after that I could be able to end up with the final solution for the problem. You can now build lightmediascanner with ogg support using either the regular vorbis or tremor implementations.

With LMS now being able to scan and index ogg files, I came back to Tuomas and provided the patch that creates ogg-support-lightmediascanner meta package, which will install both ogg-support and lms ogg plugin as dependencies.

No change in the canola side was needed, since the whole work of decoding and playing ogg files was already being done by ogg-support packages provided by Tuomas. Big kudos to Tuomas and his hard work and as well to Gustavo for reviewing and pushing my patches for LMS to mainstream.

ogg-support-lightmediascanner.installInstall it now and enjoy!

Thursday, April 24, 2008

Canola2 Youtube Plugin Updated

Yesterday I uploaded a new version of the Canola2 Youtube plugin to maemo extras repository. Youtube has changed the way it references the .flv file, breaking the way we were dealing with it. Kudos to Adriano who's been doing an excelent job maintaining the plugin.

As usual, the source code is available in the Canola2 website and in the Maemo extras repository as well.

Please update your installation by clicking on "Check for updates" button in the Application manager. Big thanks to everyone who reported the issue on our tracker.

Monday, April 7, 2008

Android Running on N810

Really exciting news!! This wiki page on eLinux.org describes with details the instructions for running Google's Android on OMAP based platforms, such as the Nokia Internet Tablets. There are also threads on Android Internals and Linux OMAP mailing lists.

Some pictures taken from the wiki page:

Tuesday, March 25, 2008

Long time no post

It's been quite a long time with not even a update in my blog. Shame on me!!! Since last December, lots of things happened and if I tried to tell everything, you would be surely bored to death. So here goes some highlights of the last 3 1/2 months:

  • Canola2

    We're now on the version 7 of the beta series and we're working really hard to release the final version, which should come really soon. Besides the name "beta" it is pretty much stable and in each new version released it becomes better and better. Many thanks to the users who provided useful feedback (specially on ITT forums) and to Marcelo, who is being patient enough to provide the answers to almost all users questions.

    I have been maintaining the packages for both Canola2 and the Maemo port of the Enlightenment Foundation Libraries for each and every one of the Nokia Internet Tabled devices and ITOS releases, not including ITOS2005 here. It has been a very time consuming task and I have not been able to code much since then.

    We've opened the gates for 3rd part plugins releasing the youtube plugin for Canola2. It's only in its very first version and users seems to like it a lot. The source code is availabe under the GPLv3 and can be used as base for development on new plugins. The next one in the line is the last.fm plugin.

    New themes were released and the source code for them are going to be released as well.

  • Toys

    Found a 1GB iPod shuffle *inside* an ice cream. Literally.

    Sold my old car, a Fiat Palio (1998 year) and bough a Peugeot 307 (2002 year), previously owned by Renato Filho. All I can say is it was a great acquisition. I'm very happy with it. By the way, Renato bought a newer Fiat Palio (2004 year) but I'm not pretty sure if Renato can tell the same though. :)

    Got a Nokia N95 phone and gave my N73 to my girlfirend. Another huge improvement here. How could I live until now with a phone without WiFi and GPS integrated?

    Bought my Nokia N810 with the discount code I got back in November. Many thanks to Hallyson and Tapani who brought me the device from Finland straight to Brazil.

  • Bossa Conference '08

    It was a really great conference this year. If last year was good, this one was even better! We had some high level talks and lots of free time to meet and talk to the guys about problems of using new technologies in mobile devices and possible solutions for them. I really enjoyed Clutter, Webkit and PulseAudio talks among others. Congratulations to the organization crew who worked hard to make it happen.

    I took some pictures with my N95 and uploaded them to my flickr account. The photos are basically from the after hours parties and can be seen on this set.

  • Google Summer of Code 2008

    I'm willing to help the BlueZ and Enlightenment guys by mentoring projects in this edition of GSoC. More details on this subject later.