Reputation: 11
I really need help here! :(
I am working on QT by deploying a small project to Android 4.0.3 (API 15). I use this code below to run a small video. I built it successfully and run by Desktop 5.2.1 MinGW 32bit, everything is fine! but when I deploy it to the emulator. the audio is fine but the video doesn’t show on and the screen is white ! I don’t know what the problem is. I hope you can give me some advices. Thanks in advance.
QWidget *widget = new QWidget;
layout = new QVBoxLayout;
player = new QMediaPlayer;
QVideoWidget *vw = new QVideoWidget;
layout->addWidget(vw);
widget->setLayout(layout);
player->setMedia(QUrl::fromLocalFile("/sdcard/Music/video.mp4"));
player->setVideoOutput(vw);
widget->show();
vw->show();
player->play();
Upvotes: 1
Views: 900