QuasarMX, Qt, QML and the experiments

Some of you following my micro-blogging on Twitter might already know about it: In the last few months I have been busy developing a new application. What initially just started out as a re-write of the user interface of Quasar Media Player has turned into a completely new application called QuasarMX. It is based on the very core of Quasar Media Player but stripped of all the legacy and third-party code. The completely new UI is based on Qt Quick / QML, a new technology which simplicity and elegance I fell in love with over the past year. For me QuasarMX also marks the start of two experiments:

1. How many platforms and operating systems can I port my app to?
2. Is there any commercial viability at all in publishing the software to various app stores (Nokia Ovi store, Android Market etc.) ?

The first experiment is important to me. Now that Nokia put the Qt project into open governance, the Qt community has the unique opportunity to extend primary platform support to Android, iOS and possibly even Windows Phone 7, thus extending the possible market cap and audience for mobile apps based on Qt dramatically. This experiment is largely about experiencing first hand what changes are required to get my application running on these platforms and as a matter of fact what needs to be done in projects like Necessitas (Qt on Android) to make that goal happen.

As for the second experiment I am actually just interested in getting to know the mechanics of the various app stores. I am pretty confident that there is little to no money to be made from yet another music player app. Yet, it is still interesting to see what happens, what works and what not, especially in regards to future apps.

In July Nokia accepted my application and invited me into the Qt Ambassador program. As part of this program Nokia loaned a N950 developer device to me, which I extensively used to develop and test the Harmattan UI for QuasarMX. The new user interface is very much inspired by the simplicity of the MeeGo Harmattan Swipe UI.

As of yesterday the open Beta 1 of QuasarMX is available for the Nokia N9 and N950. Releases for other platforms will follow shortly.

Quasar Media Player 0.96 beta 4 available

Quasar Media Player

I am pleased to announce beta 4 of Quasar Media Player.
This new version introduces some new features and big improvements in terms of performance and memory-usage.
The previously separate last.fm Audioscrobbler QScrobbler has been integrated into Quasar as add-on.
This release also marks the introduction of the Cover Art Downloader which uses the new open-source katastrophos.net Cover Art search engine to download cover art images for the new Cover Art Flow album browser.

Quasar Media Player on Windows 7Cover Art Downloader on OS X

Binaries for the previous platforms (Sharp Qtopia and pdaXrom) along with new binaries for Windows and OS X (universal) are available on the project’s homepage.

Nightly Builds of Quasar Media Player available

Quasar Media Player

It’s been some time since the last update. In my previous post I mentioned I was in the process of setting up a nightly build system. This system has been running silently since May.
I guess it is finally time for me to officially announce the nightly builds of Quasar Media Player:

http://www.katastrophos.net/downloads/quasar/nightly/

Along with the most current sourcecode tarball, binaries are available for 4 platforms:
Windows (win32), OS X (universal binary), Sharp Qtopia and pdaXrom Linux (both for Zaurus PDA)
The Windows version comes in two styles: a generic setup (EXE) and a self-contained portable version (7z archive)

Enjoy and please leave a comment.

Setting up the Inno Setup compiler on Debian

I’m currently setting up a nightly build system for Quasar on my Linux box which is running Debian. This system also cross-compiles Quasar for Windows.
The Windows version of Quasar is going to be available in two fashions: one self-contained, portable version and one version that can be installed.
I’m not a huge fan of installers. But when it comes to creating a setup program for a given Windows application I’m quite accustomed to Inno Setup having used it for years. Unfortunately there is no native Linux version of the Inno Setup compiler available for Linux. NSIS exists as package for Debian but I am not fond of using it, largely because I am a Delphi guy. :)
So, here is a small guide on how to get the Inno Setup compiler up and running on Debian:

First step is to install Wine either as super user or by using sudo:

sudo apt-get install wine

As normal user fire up your X server and your favourite terminal application and get the latest Inno Setup QuickStart pack:

mkdir /tmp/innosetup
cd /tmp/innosetup
wget http://files.jrsoftware.org/ispack/ispack-5.2.3.exe
wine ./ispack-5.2.3.exe

This will start the installer in Wine. Note, for the installation you will need a running X11 server since the installer obviously is graphical. If you have not set up Wine before, the default location C:\Program Files\Inno Setup 5 will install to ~/.wine/drive_c/Programme/Inno Setup 5.

Luckily the Inno Setup compiler offers a command line interface, ISCC.exe, which will run in Wine without the necessity of having a X server running. So it is ideally suited for automated runs.

Here is a simple wrapper shell script called iscc:

#!/bin/sh
unset DISPLAY
scriptname=$1
[ -f "$scriptname" ] && scriptname=$(winepath -w "$scriptname")
wine "C:\Program Files\Inno Setup 5\ISCC.exe" "$scriptname" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"

I installed this script in my local bin directory (~/bin) and added it to the PATH environment variable.
This will allow running the Inno Setup compiler from anywhere and it also makes it very easy to integrate into a build script. You can even feed a script via stdin, e.g. something like:

iscc - < ./myscript.iss

Q…/Free: Bug in QProcess writeToStdin

All right, this post is just to stop somebody else’s suffering in figuring out why writing to stdin in QProcess on Version 3.3.x-8 of Q…/Free doesn’t work on Windows. Well, actually it works but just for the first line you write to stdin. There is a bug in qprocess.cpp at line 730:

void QProcess::writeToStdin( const QString& buf )
{
    QByteArray tmp = buf.local8Bit();
    tmp.resize( tmp.size() - 1 ); // drop the implicit \0
    writeToStdin( tmp );
}

should be:

void QProcess::writeToStdin( const QString& buf )
{
    QByteArray tmp = buf.local8Bit();
    tmp.resize( buf.length() );
    writeToStdin( tmp );
}

Verision 3.3.7-7 includes the latter method, same as the latest Qt 4.3 sources. So, it’s actually a regression in 3.3.x-8. If you require the latest Qt 3 / Q…/Free for your open source application and need to write to some other processes’ stdin, you can just use a wrapper workaround that uses the latter method and directly uses writeToStdin( const QByteArray& buf ) instead of the QString variant.

“Yet Another Zaurus Media Player”… not dead yet: “Quasar Media Player”

Alright, this blog has been very quiet for the last few months. That’s partially due to me being very busy with other stuff.
I’m slowly picking up pace and getting things done again.

So, here is a short update on the media player that I’m currently developing for my Zaurus. Well, actually it’s been in long-term testing mode for ages now… :)
I finally have a name for it. It will be called “Quasar Media Player” – or shorter “Quasar”. Below are some screenshots of the current development version running on Qtopia. I hope to have a release ready soon.

{Quasar} Shown is the new toolbar and play list selector.{Quasar} The new play info screen. Cover art is supported and rendered in this funky view. Any Satch fans out there? ;){Quasar} More eyecandy.{Quasar} Normal list view filtered.

“Yet Another Zaurus Media Player”… done differently . (Phase 2.1: Development progress 2)

Yet another short update on the development of my still untitled media player for the Zaurus. In the meantime it’s called YAZMP.

Again, I’ve been working on improving performance – this time on the performance when loading playlists.
Before I continue, let me give a brief overview of the structure:

Library -> Playlists < -> Media Cache

YAZMP doesn’t manage a library similar to i*Tunes. Instead it solely relies on playlists. Metadata (title, artist, album, etc.) is kept in the database and will be associated to once the playlist is loaded. The reason for this is pretty simple: Scanning audio files (and media files in general) each and every time a playlist is loaded will definitely take a lot of time. So, for every file the gathered metadata will be saved in the DB. Think of it as a cache.
Continue reading ““Yet Another Zaurus Media Player”… done differently . (Phase 2.1: Development progress 2)”

SQLite simple timing profiler patch

Update: SQLite now features an integrated timer which can be activated via the .timer command in the console shell. Details here.

As a follow-up to my previous post “SQLite performance tuning and optimization on embedded systems” here is a very basic patch that introduces support for timing SQL queries in the sqlite3 console shell.

SQLite 3.3.8:
Patch against shell.c shell.c

SQLite 3.3.9 CVS – shell.c rev 1.157:
Patch against shell.c shell.c

Two new shell commands are introduced in sqlite3:

.profile ON|OFF        Turn profiling on or off
.timer start|show      Measure elapsed CPU time

.profile ON will turn off output to stdout. Instead it will display CPU execution time for every SQL command processed.
Here is an example output:

sqlite> .profile on
sqlite> .read test1.sql
Exec time  BEGIN;                                       :  0.000 s.
Exec time  DROP TABLE IF EXISTS playlist_view;          :  0.020 s.
Exec time  DROP TABLE IF EXISTS overview;               :  0.000 s.
Exec time  CREATE TEMPORARY TABLE playlist_view AS   ...  :  0.180 s.
Exec time  CREATE TEMPORARY TABLE overview AS        ...  :  0.140 s.
Exec time  SELECT DISTINCT genre, genre IN ("Progress...  :  0.030 s.
...

Note: You can still override the output setting with the .output command after an .profile ON has been issued.
.profile OFF will turn off time-based profiling and reenable output to stdout.

.timer start will start a timer. You can execute a sequence of queries and then print the required CPU time via .timer show.
Use .timer start again to reset the timer. This .timer patch is based on SQLite ticket #1227 by Bartosz Polednia.

Timing is currently done using clock() which provides only a 10 ms precision for CPU time on most systems. This might be inadequate depending on your requirements. If you know a more precise way, please let me know.