Giuseppe Ventura

Phonon not show video

Discussion created by Giuseppe Ventura on May 11, 2012
Latest reply on May 11, 2012 by Giuseppe Ventura

hi all,

I've resolved error of phonon with export QT_PLUGIN_PATH='/usr/plugin' but now my application start but i no view video i view only a black box.. If i type: gplay MOV008.mp4 I view correclty my vide on full screen. But with my QT app no Code of my app is:

 

#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <phonon/VideoPlayer>
#include <phonon/MediaObject>
#include <phonon/MediaSource>

MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
Phonon::MediaObject *media = new Phonon::MediaObject(this);
media->setCurrentSource(Phonon::MediaSource(QString("MOV008.mp4")));
ui->videoPlayer->play(media->currentSource());
}

MainWindow::~MainWindow()
{
delete ui;
}

 

When i run my app i view: (Look at this link) http://pastebin.com/9gjxv5nj



thanks

Outcomes