maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   QT & Phonon (https://talk.maemo.org/showthread.php?t=46855)

hadrien.jouet 2010-03-08 16:28

QT & Phonon
 
Hi there,

Despite having read through hundreds of posts around here, I've never posted anything until now, so please bare with me if I'm being an idiot.

I'm sure this will come as no surprise to most people but I find the documentation for using QT on the N900 absolutely terrible (when it does exist), and in particular about using libraries...
I really like my N900, but I don't understand why Nokia seems to put so little effort into helping developers forward, after all I would have thought the whole point was to take advantage of the open source community to fill in the dead-empty ovi store...
At this point in time I haven't even set up my development environment, but I'm thinking about going about it this way http://wiki.maemo.org/MADDE/QtCreato...on_for_windows ; if anybody reckons there are better ways please let me know. The reason for not having done so yet is that I don't want to go ahead with something if it proves impossible.

Anyhow, to the point, has anyone used the Phonon library for QT, and in particular effects (audio, I'm not interested in video, yet...)?
If so I would like to know:
  • what your experience in general has been with it?
  • does Phonon come out of the box with the setup mentioned previously?
  • what effects are available for the N900 (at the moment at least)?
  • how do you go about using effects?
  • what is the performance like, that includes the number of files that can be played simultaneously along with effects of sort (bearing in mind the application would also be running an interface, not just in terminal)?

Any feedback would be greatly appreciated,
Thank you!

danielwilms 2010-03-09 14:11

Re: QT & Phonon
 
Quote:

Originally Posted by hadrien.jouet (Post 560150)
I'm sure this will come as no surprise to most people but I find the documentation for using QT on the N900 absolutely terrible (when it does exist), and in particular about using libraries...

There is some information about Qt for Maemo5 in the wiki and for Qt 4.6, you have already for the beta a complete overview of all classes, which will be there, with examples and framework descriptions.


Quote:

Originally Posted by hadrien.jouet (Post 560150)
I really like my N900, but I don't understand why Nokia seems to put so little effort into helping developers forward, after all I would have thought the whole point was to take advantage of the open source community to fill in the dead-empty ovi store...
At this point in time I haven't even set up my development environment, but I'm thinking about going about it this way http://wiki.maemo.org/MADDE/QtCreato...on_for_windows ; if anybody reckons there are better ways please let me know. The reason for not having done so yet is that I don't want to go ahead with something if it proves impossible.

Giving out tech previews and keeping you up-to-date on the latest tools, giving you support directly of the developers, which are working on this, who look into packages and help people setting up their environment etc., proofs you wrong in my opinion. Maybe the information is a bit scattered, but we are trying to improve the things all the time.

Quote:

Originally Posted by hadrien.jouet (Post 560150)
Anyhow, to the point

Ok. First of all MADDE, which you have mentioned up there is bound to the latest software release, which is out there, which contains still Qt4.5 and not Qt4.6.

Quote:

Originally Posted by hadrien.jouet (Post 560150)
has anyone used the Phonon library for QT, and in particular effects (audio, I'm not interested in video, yet...)?

If so I would like to know:
  • what your experience in general has been with it?
  • does Phonon come out of the box with the setup mentioned previously?
  • what effects are available for the N900 (at the moment at least)?
  • how do you go about using effects?
  • what is the performance like, that includes the number of files that can be played simultaneously along with effects of sort (bearing in mind the application would also be running an interface, not just in terminal)?

I will try to get you more information about Phonon. I used it once a while ago, and it was pretty straight forward. But please stay tuned, and I will get you more detailed information.

Daniel

code 2010-03-09 14:40

Re: QT & Phonon
 
Quote:

Originally Posted by hadrien.jouet (Post 560150)
Anyhow, to the point, has anyone used the Phonon library for QT, and in particular effects (audio, I'm not interested in video, yet...)?
If so I would like to know:
  • what your experience in general has been with it?
  • does Phonon come out of the box with the setup mentioned previously?
  • what effects are available for the N900 (at the moment at least)?
  • how do you go about using effects?
  • what is the performance like, that includes the number of files that can be played simultaneously along with effects of sort (bearing in mind the application would also be running an interface, not just in terminal)?

Any feedback would be greatly appreciated,
Thank you!

I have been developing a media player using QT + Phonon. It is overall very easy to use comparing with gstreamer in GTK. I think Phonon in N900 is backed by gstreamer but it is a higher level API.

Here are the effects currently available to N900:
speed
audiodynamic
audioamplify
audiopanorama
equalizer-10bands

Performance of audio playback without using effect is superb; with equalizer effect will cause the process running at 50% or more most of the time.

hadrien.jouet 2010-03-09 14:41

Re: QT & Phonon
 
Thanks a lot for this, I get your point about the documentation and I agree that it is mostly because it is all over the place. I'm not one to usually learn with books, but I would at least like to see some serious documentation. It's my first attempt at developing for a mobile platform and my first time using QT and I guess I'm just a little bit confused as to how I'm supposed to go about it.

I'm not sure I particularly need QT4.6 over 4.5 as of now, but I thought with PR1.2 coming I might as well use it. Can I upgrade QT fairly easily on MADDE?

On another note, I've been quickly following Symfonie, which seems to be based on QT4.6 and Phonon. I wanted to have a look at the source but it seems it's not available at this point in time... My main concern being that there is apparently a serious performance issue with the equalizer, which I suppose is making use of Effects, and I was wondering if this was a common problem. I'm planning on playing more than one file at a time, and possibly with more than one effect at a time too.

Finally (sorry if this is dragging), I'm still unsure whether to go for C++ or Python. I'm mostly worried about performance issues, if any. As far as I understand C++ should be faster than Python, but then if I use PyQT all the "heavy" tasks will be handled by QT regardless, am I right in saying this?

Thanks!

krk969 2010-03-09 14:47

Re: QT & Phonon
 
Quote:

Originally Posted by hadrien.jouet (Post 561240)
I'm not sure I particularly need QT4.6 over 4.5 as of now, but I thought with PR1.2 coming I might as well use it. Can I upgrade QT fairly easily on MADDE?

this might be of help

danielwilms 2010-03-09 14:52

Re: QT & Phonon
 
Quote:

Originally Posted by hadrien.jouet (Post 560150)
what your experience in general has been with it?

Pretty straight forward. But we just had a really small project.

Quote:

Originally Posted by hadrien.jouet (Post 560150)
does Phonon come out of the box with the setup mentioned previously?

Yes, as mentioned, just 4.5.
  • what effects are available for the N900 (at the moment at least)?
  • how do you go about using effects?
  • what is the performance like, that includes the number of files that can be played simultaneously along with effects of sort (bearing in mind the application would also be running an interface, not just in terminal)?
[/QUOTE]

Phonon is just a wrapper for gstreamer. This means that the performance, latency is totally dependent on that, so that it is not possible to give Qt specific information here. Please follow for that the Maemo5 developer documentation and the gstreamer pages directly. But my advice would be to play a bit around with it, based on the Qt and gstreamer docs, and if you have specific questions, post them here and we try to help you out.

Daniel

danielwilms 2010-03-09 14:57

Re: QT & Phonon
 
Quote:

Originally Posted by krk969 (Post 561252)
this might be of help

Good post, but the link in it is broken due to a newer version. Find the right version here.

Daniel

code 2010-03-09 15:14

Re: QT & Phonon
 
Quote:

Originally Posted by hadrien.jouet (Post 561240)

On another note, I've been quickly following Symfonie, which seems to be based on QT4.6 and Phonon. I wanted to have a look at the source but it seems it's not available at this point in time... My main concern being that there is apparently a serious performance issue with the equalizer, which I suppose is making use of Effects, and I was wondering if this was a common problem. I'm planning on playing more than one file at a time, and possibly with more than one effect at a time too.

The performance of equalizer is acceptable if that's the only application you run. Problem arises when you multi task. So when you have equalizer effect enabled and browse the net, delay to the audio playback is almost inevitable at current state.

BTW, symfonie source is available at:
http://maemo.org/packages/view/symfonie/

hadrien.jouet 2010-03-09 15:19

Re: QT & Phonon
 
Thanks for all these updates, I really appreciate all the feedback.

Code, I take it you're responsible for Symfonie :) (it seems we posted roughly at the same time)? I don't suppose you know if any of the effects listed handle stuff like Reverb, Delay, ... ?

code 2010-03-09 16:46

Re: QT & Phonon
 
I coded symfonie but I have only used equalizer effect. Not familiar with other effects.

hadrien.jouet 2010-03-12 09:22

Re: QT & Phonon
 
Hey guys, sorry it's been a while...
So I followed this tutorial http://wiki.maemo.org/MADDE/QtCreato...on_for_windows to get QT creator and MADDE on windows, and this guide http://labs.trolltech.com/blogs/2010...so-on-windows/ to get QT4.6 running. As some of you may know, this doesn't work... (QT creator just spazzes out).
Last night to my surprise, I see this post http://labs.trolltech.com/blogs/2010...ator-20-alpha/, thinking hell yeah! But then I read further and see this release is for QT4.7, so did we miss QT4.6 somewhere?
I'll give this version a bash regardless, but I was wondering if anyone at all had managed to get QT Creator + MADDE + QT4.6 to work on windows?

I'm now sort of thinking about simply going the Ubuntu way (or maybe Fedora since I'm more used to it), but I'd rather stick to Windows, at least for the time being.

attila77 2010-03-12 12:13

Re: QT & Phonon
 
Quote:

Originally Posted by hadrien.jouet (Post 561240)
Finally (sorry if this is dragging), I'm still unsure whether to go for C++ or Python. I'm mostly worried about performance issues, if any. As far as I understand C++ should be faster than Python, but then if I use PyQT all the "heavy" tasks will be handled by QT regardless, am I right in saying this?

Correct. You can write *very* snappy Qt apps in python, the only consistent downside being the startup time and higher memory usage. If you use Qt functionality for 'heavy lifting' and avoid variable conversions (like QStrings into python strings), it's slower than C++, but far from sluggish.

rotoflex 2011-01-22 00:10

Re: QT & Phonon
 
Quote:

Originally Posted by danielwilms (Post 561211)
you have already for the beta a complete overview of all classes,

That overview of classes is unmanageable for reference, because it is merely a huge list, not organized by function.

Those of us used to reference materials for programming would expect to at least find such a guide broken down by typical function:
Process Control
xxx
xxx

File Manipulation
xxx
xxx

Time
xxx
xxx

Search & Sort
xxx
xxx

Graphics
xxx
xxx


Instead of a monolithic list of everything that must be gone through one by one until what you're looking for is found.

Additionally, on that list of classes is
QSound
which, according to ANOTHER random page you are lucky to find scattered somewhere else, does not actually work in Maemo 5
http://doc.qt.nokia.com/qt-maemo-4.6...es-maemo5.html

Those are the 2 examples of how it is so excruciatingly difficult for programmers coming to the N900/QT/Maemo to even get a start:
1. No organized reference
2. What information DOES exist is partial, scattered & fragmented across the whole spectrum of related sites of maemo.org, nokia.org, gitorious, etc.

I can understand how it would be easier for folks writing derivative programs to by legacy become more proficient via re-use of existing & available code, albeit slowly.

In this chaos, there is not even a place explaining the differences of
Nokia SDK
QT SDK
QT Creator
etc.

How can it be expected that a programmer coming to the phone/OS can select which to use? Or even to find out what exists for use, since pages listing one or two things don't list all.

There is nothing which I have found yet which briefly explains the developer tools on one page, explaining the use of Mad Developer, Scratchbox, Busy Box, the different SDK's, etc. Instead, there are scores of pages with download links to one or the other, with brief smiling descriptions of little more than PR saying that they're great, they speed development, they're feature-rich - all useless words for people seeking to learn the functionality & place in the system.

Going back to phonon, where IS an overview page for it? The package overview page http://maemo.org/packages/view/libqt...o5-phonon-dbg/
only seems to give the impression that the package has been removed. If the community has its own, non-intuitive, rejecting of typical use layout for such a page and has created a page that gives the impression that the package is no longer available when it is by reading it in some way known only to those who watched the page grow from nothing, why is it impossible now to see how not merely uneffective but destructive it is?

And where is a functional description of the phonon package's particular uses? Even the most basic book of reference will give examples of implementation, but here there seems to not even be a list! Is it neccessary to go through every line of the source code to find a function/object that suits the use you need? Anyone who's been on the QT/Maemo wild goose chase before is very much disinclined to "just google" and come up with reams of time-wasting pages with matches that don't have simple reference.

There is my rant again. It is so hard to pull up coherent, useful reference & instructional information for programming this phone. It is like it is intentionally sabotaged, so people won't do it.

And the defensiveness of replies of "The information is out there, just find it with google or somewhere buried in nokia.com" is not just functionally ridiculous, it is apparently wrong. Much of the information is NOT out there, & the part that is being so scattered & disorganized makes it not just impractical, but a waste of time.

Disagreeing with Hadrien's observation that documentation is scant & chaotic by saying
Quote:

Giving out tech previews and keeping you up-to-date on the latest tools, giving you support directly of the developers, which are working on this, who look into packages and help people setting up their environment etc., proofs you wrong in my opinion
seems to indicate being oblivious to the problem or trying to conceal it. Tech previews and tool updates are not reference & documentation. The possibility of (maybe) getting support from the developers for PARTICULAR problems is not reference for developers, it is troubleshooting. Those are just MORE discrete, small, incomplete, noncomprehensive unspecialized fragments scattered across the internet. It is NOT proof that easily found & organized documentation and reference are lacking, it is IGNORING it.

I have NEVER seen such lack of documentation or organized reference for ANY technical thing.

marxian 2011-01-22 00:30

Re: QT & Phonon
 
The overview page for the Phonon module is here: http://doc.qt.nokia.com/4.7-snapshot/phonon-module.html

I think Phonon is being replaced by QtMultimedia (or is it QtMultimediaKit :/). The Phonon documentation isn't great, but it's fairly easy to build a simple media player, though in my experience the performance wasn't great (that could be down to poor coding on my part, though the same example performed well enough in scratchbox).


All times are GMT. The time now is 01:08.

vBulletin® Version 3.8.8