PDA

View Full Version : Play video file with Phonon and GStreamer show black screen



SimbadSubZero
6th May 2010, 12:39
hi,
I have the following code:

//setup media object
media = new Phonon::MediaObject();
media->setCurrentSource(Phonon::MediaSource(QString("test.avi")));

//setup player
videoPlayer = new Phonon::VideoPlayer(Phonon::VideoCategory);
videoPlayer->setFixedSize(QSize(640,480));
videoPlayer->move(100,30);
videoPlayer->show();
connect(videoPlayer, SIGNAL(finished()), videoPlayer, SLOT(deleteLater()));
videoPlayer->play(media->currentSource());

The result is black screen and video file does not play. No error is printed.
What Gstreamer must has to play video files?
Someone see any problem with my code? please help me.

Regards,
Simbad

tbscope
6th May 2010, 12:44
There's a space in the filename. It should not be test.avi?

SimbadSubZero
6th May 2010, 12:47
Yes I know is just an error from copy. thanks
Do you know about the black screen?