View Full Version : trying QtMobility/Multimedia @ Qt4.6tp1

16th September 2009, 00:53
Sorry if this is not the right forum, but this question seems not to fit any other forum either...

I'm using portaudio to get cross-platform sound recording in my Qt-based project. It makes things complex (esp. for deployment) but ... phonon won't have even basic sound-recording anytime soon.

Now, the September post on Qt Labs Blog http://labs.trolltech.com/blogs/2009/09/03/multimedia/ raised my hopes: it seemed there was a working Qt solution for basic sound recording! :) OK, so I downloaded and compiled the Qt 4.6.0 Tech Preview 1, cloned the qt-mobility/multimedia git repository and compiled - seemingly without problems.

But I cannot run the examples, except for the slideshow example. For example, running "./recorder" (obviously - the example I wanted to try first ;) ) ends up with

QMediaProviderFactory::defaultServiceProvider(): no plugin found for - "mediarecorder"
ASSERT: "d->service != 0" in file qmediarecorder.cpp, line 199

Obviously, I'm missing something badly. Any ideas what could this be?

One thing I tried (but did not lead anywhere closer to a success) was the flollowing: the qt-mobility/multimedia git repository does have a plugins subfolder with .pro with TEMPLATE = subdirs, and a subfolder audiocapture, and ... empty SUBDIRS in .pro! But changing


SUBDIRS = audiocapture
leads to:

audioencodecontrol.h:4:33: error: qaudioencodecontrol.h: No such file or directory
Now, this seemed at first that this should be qaudioencodeRcontrol.h (with extra "r") from the Qt4.6tp1 tree, but this "encodecontrol" (without "r") is all over the plugins/audiocapture/, so changing this without understanding how things should work seemed too far fetched.

Has anyone managed to make this multimedia package work with Qt4.6tp1?

Does anyone know any wiki/discussion forum for QtMobility/Multimedia where I could turn for support? (http://labs.trolltech.com/page/Projects/QtMobility does not give any such info, nor do any readme/doc files in qt-mobility/multimedia git repository)


PS: doing the same what I did for qt-mobility/location (instead of qt-mobility/multimedia) works like a charm: I just cloned the git repository, compiled, and I was able to run "fetchgooglemaps" (the Google Maps example) without any problems. And as I wrote, the slideshow example from qt-mobility/multimedia also works. So it seems not to be a problem with "mobility" vs. regular Qt, there is something specific what I'm missing-slash-doing-wrong for sound...

PPS: probably not important but: I tried the above on linux, no sound problems otherwise (alsa & oss etc.)

16th September 2009, 06:22
I dont know about the QtMobility multimedia module..
But in 4.6.0-tp1 there is also QtMultimedia Module(not part of QtMobility). and theres one class QAudioInput. Will it help you ?

17th September 2009, 00:37
Thanks for the suggestion.

If you look at the comments in the QtLabBlog post which I mentioned (http://labs.trolltech.com/blogs/2009/09/03/multimedia/), one of the comments from one of the Trolls is:

The Qt 4.6 MultiMedia APIs are a continuance on the old familiar architecture offering media playback via Phonon. This solution/architecture will be supported and maintained for the entire Qt 4 series, but no substancial new features will be added.

The newly architected [QtMobility/]MultiMedia APIs, which this Labs entry is all about, target both desktop and mobile development needs, have an entirely new architecture and will ultimately offer developers support for Video/Audio capture, Camera APIs, Playlist Management, Playback, Radio and more.

I'm not sure if this means that in the long run we should look at what is now "QtMobility/Multimedia API", and not Qt 4.6 Multimedia API... Other posts suggest rather that they have different focus (Qt4.6 Multimedia: low level access to devices [flexible, but haunted with details], "QtMobility/Multimedia" higher level [more complex tasks] orientation).

So: yes, I'll try the Qt 4.6 Multimedia classes. But it would be nice to see the other side of the story too... If anyone manages to make QtMobility/Multimedia API work on Qt 4.6, or finds any more info (wiki? some forum/mailing list?) - please, let us all know!