Phonon::MediaObject does not implements DVD in Windows
-
Hi, I'm creating a custom mediaplayer using Qt under Windows 7. I'm using VS 2008 and Qt 4.7.1 precompiled for it. Also, I'm using Phonon to play the video from either a file or a DVD.
The application does it well if the source is a file, but it fails to reproduce DVDs, giving me a "Not implemented" error if I try to set the source of the MediaObject to Phonon::Dvd.
I've read that DirectShow is the backend, and I've also recompiled Phonon to be sure it uses the DirectX SDK (June 2010) and the Windows SDK v7.0 I have installed.
Do you have any idea what's going on here? or is DVD playing simply not supported under Windows? I've been looking around the web but there nothing related to it.
I attach the related code:
@
//The constructor of the widget containning the mediaplayer
Player::Player(QWidget *parent, Qt::WFlags flags)
: QWidget(parent, flags)
{
ui.setupUi(this);_player_video = new Phonon::VideoWidget(this);
_player_audio = new Phonon::AudioOutput(Phonon::VideoCategory, this);
ui.playerLayout->addWidget(_player_video);_media_object = new Phonon::MediaObject(this);
Phonon::createPath(_media_object, _player_audio);
Phonon::createPath(_media_object, _player_video);connect(ui.playBtn, SIGNAL(clicked()), this, SLOT(play()));
}// This method is called when a disc is selected
void Player::set_dvd(const QString &drive)
{
Phonon::MediaSource src(Phonon::Dvd, drive);_media_object->setCurrentSource(src);
if (_media_object->errorType() != Phonon::NoError)
cout << "Phonon::MediaObject error: " << _media_object->errorString().toUtf8().data() << endl;
}// This method is called whne a file is selected
void Player::set_file(const QString &file)
{
Phonon::MediaSource src(file);_media_object->setCurrentSource(src);
if (_media_object->errorType() != Phonon::NoError)
cout << "Phonon::MediaObject error: " << _media_object->errorString().toUtf8().data() << endl;
}// The play/pause button
void Player::play()
{
if (_media_object->state() == Phonon::PlayingState) {
_media_object->pause();
ui.playBtn->setText(tr("Play"));
} else {
if (_media_object->currentTime() == _media_object->totalTime())
_media_object->seek(0);
_media_object->play();
ui.playBtn->setText(tr("Pause"));
}
}
@In the declaration of the Player class there are the following private attributes:
@
Ui::player ui;Phonon::VideoWidget *_player_video;
Phonon::AudioOutput *_player_audio;Phonon::MediaObject *_media_object;
@Thanks a lot for your help!
-
[quote author="mariusg" date="1296001852"][quote author="cibi3d" date="1295974955"]Sorry about the @<span class="smiley">@ it is done by the server.[/quote]
This bug has been fixed in dev, it will be in the next roll out.
[/quote]
He was talking on the smiles, not on the DVD topic....