A time of changes
I left my job at Igalia at the beginning of this month, after a bit more than two years working there.
These past two years have been incredible: I was living in Finland for almost the whole 2011, participating in the MeeGo project, and then spent 2012 working from A Coruña's offices, working on WebKit and other technologies. I enjoyed it a lot, got really attached to the people there -- some of them I call friends now --, and grew a lot professionally.
Igalia is organized in a flat structure, where we take more responsibilities than just coding, and where the ultimate step is to become a partner. However, I currently have the feeling that I want to focus more on the technical side of things, to gain more expertise, and that would be too complicated without neglecting these other responsibilities -- the kind of responsibilities that take time and energy. Then, being honest with my colleagues, the responsible thing was leaving.
I have only started looking for new opportunities since I announced my decision, so things are still a bit unclear. We will be quite probably leaving Spain and heading North: we would like to go to The Netherlands, but we don't discard anything in advance.
If your company needs a Software Engineer, chances are I could be of help, so take a look at my profile in LinkedIn, and don't hesitate to ask me for my CV or other details. And, if you're so kind, please pass the word and help me find a new cool place!
On the WebKitGTK+ Hackfest 2012
This week I attended my first WebKitGTK+ hackfest. It was hosted at our Igalia office in A Coruña, so it was the perfect opportunity to join so many good hackers!
Claudio wrote a pretty good blog post giving an overview of the hackfest , explaining who was doing what, so I'll just mention that I focused on improving the WebKit2GTK+ port sections documentation (because, you know, we don't want this to happen). You can see here how scarce it was looking previously:
and how it looks now:
That's just the short description, but each of those sections has also an extended description that tries to give an idea of how to use it. Still, if something is not clear enough, just file a bug and we'll try to improve it.
This updated documentation will be available at the WebKit2GTK+ Reference Manual in the next release, but since it's already upstream, you can build it yourself simply passing the --enable-gtk-doc flag.
I also want to thank the GNOME Foundation and all the sponsors who have made this event possible:
Announcing the Gallery Tilt Shift plugin for the Nokia N9
A couple of weeks ago, we at Igalia got a number of plugins published in the Nokia Store: Enlarge & Shrink, Gallery Tilt Shift plugin, and Facerecognition Reset Plugin. We had them ready for some time already, but still it was very difficult to pass the Nokia Store Quality Assurance: there is a list of valid directories where a Debian package can install its files, and they had missed the ones for Gallery plugins. So, in order to finally get over that problem, my friend and colleague Andrés had to "fight" with the Store QA people quite a bit: don't forget to thank him for this!
Although I developed only the Tilt Shift one, I will briefly introduce you the other two as well
The Enlarge & Shrink plugin is an add-on to the built-in Gallery application. You can use it to apply a radial distortion to a picture, so they look like enlarge and shrink effects (also known as punch or pinch).
The Face Recognition Reset plugin also behaves as an add-on, but doesn't work on individual images. Instead, it forces the deletion or un/protection of the facerecognition database, something that you might need if for whatever reason the database gets corrupted.
And finally, the Tilt Shift plugin lets you make a picture look as a miniature, by applying the following transformations:
- Blurring the image using a Gaussian Blur filter
- Keep an area of the image focused (either vertically or horizontally)
- Combine both parts of the image using a Gaussian filter (so the focus is lost gradually from the focused area to the rest of the image)
- Increase the saturation, so the colors seems those of a miniature

Saint Isaac's Square - Saint Petersburg, before applying the effect

Saint Isaac's Square - Saint Petersburg, after applying the effect
There is a problem, however. Gallery uses Quill, and Quill was designed to use tiles in order to minimize the memory footprint and work happily in mobile devices. That tiling mechanism finally proved to be less flexible than it should, so for those edit operations where you can't rely only on the local information in the tile... things won't work.
You can still use these plugins for small images. Gallery doesn't do tiling on images of 512x512px or smaller, so that is what is currently supported. Another option is writing a complete new application to get this miniature effect (either using Quill with a different tiling configuration or not using it at all). You can check the full explanation at the GitHub page of the project.
All these plugins are Open Source, so you can go to their page at GitHub: Enlarge & Shrink, Facerecognition Reset, Gallery Tilt Shift
Take a look at all applications published by Igalia at the Nokia Store.
Grilo: better multimedia discovery in the living room
Some days ago, I talked about my current living-room setup. It is cool, since I'm reusing components I already have, but it's quite clear that it has some issues:
- It won't extend well. If I ever want to browse my Flickr pictures, that won't be enough
- The same goes for videos (Youtube, Vimeo, blip.tv...)
- And many other services out there
- The TV supports part of the content, the XBoxsupports another part...
- The UI for the UPnP clients is quite basic
TVs are no longer regular TVs: they are smart! (Think about the Panasonic Viera, Samsung Smart TVs, Philips SmartTV...). Many other devices have many different multimedia capabilities: some of them dedicated (Asus O!Play,Blusens Blubrain...) others are gaming devices that include these features (PS3, XBox...).
They solve different subsets of the problem: for example, providing Flickr, Youtube, Vimeo... applications, or having a better UPnP client, or even providing application markets so you get new apps for new services. But for that to happen, some developer has to provide the apps, maybe having to learn the API for a web service: none of these devices solve the need for a unified path, for a single experience, both from the developer and the user point of view.
With Grilo, you can get that. Grilo is a framework, developed and maintained by Igalia, focused on making media discovery and browsing easy for application developers. With it, you get
- A single, high-level API that abstracts the differences among various media content providers, allowing application developers to integrate content from various services and sources easily.
- A collection of plugins for accessing content from various media providers. Developers can share efforts and code by writing plugins for the framework that are application agnostic.
- A flexible API that allows plugin developers to write plugins of various kinds.
Hardware vendors shipping their products with Grilo in their SDKs would expose to third party developers consistent APIs to access the different media providers. Developers targeting those platforms would only have to care about Grilo's API, since most popular media providers are already supported out of the box, and only if a service is very new (or less popular) they would have to write a plugin for it. One consequence for this is that developers will have more time to focus on what will let them differentiate from their competitors: the UI.
Users would finally get revolutionary experiences, where, for example, videos or pictures from different sources would be together, or where the application would be interactive and gesture-driven. Or anything you could imagine!
Check its official page in the GNOME project for all the details, its page at Igalia, or Grilo at Ohloh for past blog posts and other information. Also, if you come to Coruña for the GUADEC, don't hesitate to ask any igalian about it!
Using minidlna on a SheevaPlug to feed content into a Panasonic Viera TV
Since I bought a Panasonic Viera TV, some 5 months ago, I had been connecting my laptop to it whenever I wanted to watch a movie, some series or even the pictures I took on my trips.
That was quite annoying: the VGA connection (since the laptop only has HDMI output in its dockstation), checking that the laptop had enough battery (or adding yet more wires to keep it plugged), connecting it to some external speakers... and all of this while having a SheevaPlug almost 24/7.
So a couple of weeks ago I bought an external drive and configured it as a media server. This is my setup now, in case someone is interested:
- First generation SheevaPlug with the HDD Western Digital 2TB My Book
- Panasonic Viera TV
Software
- minidlna. With a very simple configuration, it exposes your media content and works great with Viera's integrated upnp client.
- Viera is able to use external srt subtitle files for some of the supported formats (typically avi or mp4), but that won't work with mkv.
- In that case, you can add a new subtitles track to your mkv (for example, using mkvmerge, from the mkvtoolnix package)
Oddities
Viera is quite picky sometimes. If you create your own mkvs with mkvmerge, be sure not to add compression (check compression:none parameter). By default, mkvmerge tries to compress the header of the audio track (and most players are fine with that, but Viera is not)
I currently use something like the following to add a subtitles track:
mkvmerge -o output.mkv --compression -1:none file.mkv file.srt
Not only that: Viera seems to support a limited set of encodings for subtitles. LATIN1 is known to work fine, so if you have your subtitles in UTF, you can use unaccent and iconv to convert them to LATIN1.
cat subtitles-utf.srt | unaccent LATIN1 | iconv -f UTF-8 -t LATIN1 -c > subtitles-latin1.srt
And the previous script helps me striping non-LATIN1 characters out of a subtitles file.
Importing an OPML into Nokia N9 Feed Reader
As you know (and it's already reported), there's currently no way to import an OPML into the Nokia N9 Feed Reader application (see Harmattan Bug #159).
However, I noticed that when you open a feed link with the built-in browser, it launches the Feed Reader app, and asks you to subscribe to the feed. I guessed that it was communicating with the Feed Reader using D-Bus, so I dbus-monitored it, and that's what I found:
- First, the browser asks the application to subscribe to a given feed (here I'm asking the client to subscribe to my blog's feed):
dbus-send --print-reply --dest=com.nokia.FeedReader \ / \ com.nokia.FeedReader.subscribeFeed array:string:"http://simonpena.com/blog/feed/"
- If the user accepts that, then the Feed Reader application requests the Engine to actually subscribe to the Feed. The nice thing is that, although you cannot (AFAIK) ask the client to subscribe to more than one feed at the time, you can ask the Engine to do it, so this actually works (requesting the engine to subscribe to my blog, Planet Maemo and Planet Igalia):
dbus-send --print-reply --dest=com.nokia.FeedEngine \ / \ com.nokia.FeedEngine.subscribe \ array:string:"http://simonpena.com/blog/feed/","http://maemo.org/news/planet-maemo/rss.xml","http://planet.igalia.com/atom.xml" \ string:"rssatom"
From this point on, it should be quite straight forward to import an OPML into the Feed Reader application. You can use a QDomDocument to parse the OPML or use QML's XmlListModel to parse the OPML file.
XmlListModel {
property string subTitle: ''
query: subTitle ? "/opml/body/outline[@title='" + titleText + "']/outline": "/opml/body/outline"
XmlRole { name: 'text'; query: '@text/string()' }
XmlRole { name: 'title'; query: '@title/string()' }
XmlRole { name: 'type'; query: '@type/string()' }
XmlRole { name: 'xmlUrl'; query: '@xmlUrl/string()' }
XmlRole { name: 'htmlUrl'; query: '@htmlUrl/string()' }
}
Then, you can use this to subscribe to the feeds using D-Bus:
static const QString DBUS_IFACE("com.nokia.FeedEngine");
void Controller::subscribeFeeds(const QStringList &feedList) const
{
QDBusInterface dbusInterface(DBUS_IFACE,
"/",
DBUS_IFACE,
QDBusConnection::sessionBus());
dbusInterface.asyncCall("subscribe",
QVariant::fromValue(feedList),
QVariant::fromValue(QString("rssatom")));
}
I hope you find this useful
Mahjong Solitaire for the Nokia N9
Last week, we got Mahjong Solitaire for N9 finally published.
This has been a great opportunity to use QML in my daily work at Igalia, instead of using it simply for the occasional hacking, such as Butaca or the XKCD reader.
So far, comments in the Nokia Store have been really positive -although some people seem to miss the classic theme from the Mahjongs available back in Maemo. But not only the comments are positive: the application is currently listed in the first position of the Top Free games!
Drop me a line (spena at igalia.com) if you find issues, you have suggestions or if you simply want to complain about the colors
Mixing QML and MeeGoTouch
When trying to invoke a MeeGoTouch application's MSheet from a QML app, I was getting the following error:
There is no instance of MDeviceProfile. Please create MComponentData first.
Using MApplication instead of QApplication would solve that, but still a MApplicationWindow would be needed to make the MSheet appear.
After searching on Google for a while (see after the snippet for the sources) and talking to gri in #harmattan, I've come up with the following solution:
#include <MApplication>
#include <MApplicationWindow>
#include <MApplicationPage>
#include <QDeclarativeEngine>
#include <QGraphicsObject>
#include <QDeclarativeComponent>
#include <QDeclarativeContext>
int main(int argc, char *argv[])
{
MApplication app(argc, argv);
QDeclarativeEngine engine;
// The context is unused in this example
// QDeclarativeContext *context = engine.rootContext();
MApplicationWindow window;
window.showFullScreen();
MApplicationPage page;
page.setPannable(false);
page.appear(MApplication::instance()->activeWindow());
QDeclarativeComponent component(&engine, QUrl("qrc:/qml/main.qml"));
QGraphicsObject *content = qobject_cast<QGraphicsObject*>(component.create());
MWidget *centralWidget = new MWidget;
content->setParentItem(centralWidget);
page.setCentralWidget(centralWidget);
int result = app.exec();
delete centralWidget;
return result;
}
From QML support in Meego touch Framework I learnt that I had to load the QML into a MeeGoTouch widget, so I followed Loading QML components from C++ to replace the loadQmlComponent non-existing method with the QDeclarativeComponent::create approach.
Also, note that I use MApplicationWindow::showFullScreen instead of MApplicationWindow::show and MWidget::setMinimumSize
Butaca is now available in the Ovi Store
After having improved the movie showtimes support and updated the UI so it aligns better with the Swipe UX, this Saturday I submitted Butaca to the Ovi Store. Yesterday (yes, that quickly!) I got a notification that it had been accepted. I'm really satisfied with this release: I use the application myself a lot, and it's great to be able to check which movies are playing on the cinemas and later review their details and the crew's.
I've uploaded a screencast to Youtube, displaying how the application works, and -as usual- screenshots are available at my Flickr gallery. You can also review the release details at the project page (where you'll be able to file bugs or get support as well).
If you wonder what's to come next, here's some insight:
- Localization
- Check for extras after and during the credits (now that I have an API available for that)
- Offline mode / better data caching
- Embed trailer playback in the application
- UI improvements
Download Butaca for free from the Ovi Store!
Butaca, IMDb and TMDb
Right now, probably all of you know IMDb. The Internet Movie Database is "the place" you'd go to look up a movie or check the filmography of an actor, writer or director. Some of you will also be familiar with IMDb Android and iOS applications, which allow you to check out that very same information on your mobile device, providing the means to settle any arguments (who directed The Terminator? And Aliens?). However, IMDb doesn't provide a free API: it provides a big ZIP file that you can download and parse to get that info. Then... -if you don't want to get a commercial license for the API- what are your chances as an Open Source developer willing to get the same functionality?
TMDb was started in the fall of 2008 as a side project in order to help serve high resolution posters and fan art for the popular XBMC project. What started as just a simple single page linked with some zip files has morphed into one of the most active user built movie databases on the entire Internet.
themoviedb.org is a free and open movie database. It's completely user driven by people like you. TMDb is currently used by millions of people every month and with our powerful API, also used by the world's most popular media centers.
And indeed it is a powerful API. Butaca uses it to provide you with all the movie information you could need
. At this moment, Butaca implements almost all the API exposed by TheMovieDb, so you can search and get information from people and movies and navigate through genres: the only thing you need is an Internet connection. Besides, Butaca allows you to mark the content as favorite so you'd keep it in your home screen as a shortcut.

Welcome view with favorites

Detailed Movie View
Other available feature in Butaca is movie showtimes. Right now, I couldn't find any world-wide open showtimes API: looks like there are some local ones, which could serve in some countries (or areas inside some countries) but most of these APIs need to be licensed. So what's the solution at the moment? When the user wants to check what's on the theaters around him, the browser is open pointing to Google Movies. The browser is used also, if you want to check if there are shows for a particular movie. In the future (unless I find some good API), instead of opening the browser, a WebView will be used.
So if at this point you're still interested, please check out the project. You'll find plenty of screenshots there, and instructions on how to add the OBS repository (deb http://repo.pub.meego.com/home:/spenap/Harmattan/ ./) to your device so you can install Butaca and start using it. And then, start filing bugs





