PDA

View Full Version : Qt 4.6.2 and QMediaPlyer



aabfm
10th May 2015, 19:27
Hi,
My setup is this for the development machine:
- Ubuntu 10.04 LTS
- QT 4.6.2
- QMake: Qt-arm-X11
and for the embedded computer:
- Anders DX4 with CM-T3730 (ARMv7a based)
- Linux distro: Angstrom

I've been struggling to put a simple window playing an mp4 video. As simple as this: just playing a video!
After a few months trying everything, from simple to complex solutions, I just don't know where to turn to. I need help!
I don't have neither qmediaplayer libraries nor phonon ones installed.
Is there out there a kind soul that can help me install, for instance, qmediaplayer which I find to be easier to play with so I can play the video?
If there is a quick solution please can you guide me on how to achieve it?
Thanks in advance.

aabfm
30th May 2015, 21:16
Hi,
I've manage to use mplayer calling it from the main app using this slot:

void MainWindow::on_pushbutton_video_clicked()
{
FILE* pipe;
int i;
QMainWindow::showMinimized();
pipe=popen("mplayer -fs 'teste_video.mp4'", "w");
pclose(pipe);
QMainWindow::showFullScreen();
}

This sorts out the problem, however, I add to use that 'showMinimized' function otherwise the video was played behind the main window.
Now this is the problem: after the video finishes, the video window closes and it stays like that! I tried the last line of code to put the main app back but nothing happens...
Any ideas?
Thanks