Active Topics

 


Reply
Thread Tools
Posts: 3 | Thanked: 1 time | Joined on Oct 2011
#1
Hi there. I recently bought an n900 and trying to program sth.
Stumbled over the QtMobility Media Player Example.
(http://doc.qt.nokia.com/qtmobility-1.2/player.html)
Everything compiles fine, but on the device it throws:

The QMediaPlayer object does not have a valid service
Please check the media service plugins are installed

Am i missing sth?

using:
n900 kp48
libqtm-1.0.2 & libqtm-1.2.0 installed
latest Qt SDK/Creator
 
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#2
I think there is a bug in the example.
It is about this line http://doc.qt.nokia.com/qtmobility-1...layer-cpp.html
if (!player->isAvailable()) {
QMessageBox::warning(this, tr("Service not available"),
tr("The QMediaPlayer object does not have a valid service.\n"\
"Please check the media service plugins are installed."));

controls->setEnabled(false);
playlistView->setEnabled(false);
openButton->setEnabled(false);
#ifndef PLAYER_NO_COLOROPTIONS
colorButton->setEnabled(false);
#endif
fullScreenButton->setEnabled(false);
}
In the constructor of Player.
At this point of time the player object (a QMediaObject)
isn't available.
I changed the code a bit and moved this part of the initialization
in a public slot and connected QMediaObjects' availabilityChanged
signal with this code.
Now it works and you can open and play a video file:
Attached Files
File Type: gz player.tar.gz (30.6 KB, 338 views)
 

The Following User Says Thank You to nicolai For This Useful Post:
Posts: 3 | Thanked: 1 time | Joined on Oct 2011
#3
Thank you very much. Haha, wasted about 2 Hours checking and altering prerequisites, never thought 1 second about a possible error in the example code.
Thx again, greets

%edit
btw, slow as hell the thing, maybe sticking to good ol' Qwidgets w/ Phonon

Last edited by st00pid; 2011-10-03 at 23:18.
 
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#4
BTW, it seems the controls (hue, brightness, ...) doesn't work.
 
Reply


 
Forum Jump


All times are GMT. The time now is 05:10.