Hi,
I want to run MPlayer in My application in WINDOW PLATFORM. I found that code in forum.
container->setGeomerty(0,0,1280,1024);
connect(mp, SIGNAL(finished(int)),this, SLOT(endPlay(int)));
QString command
=" -wid "+QString::number(container
->winId
())+" -slave "+playfile;
mp->start("mplayer "+command);
QX11EmbedContainer *container=new QX11EmbedContainer(this);
container->setGeomerty(0,0,1280,1024);
QProcess *mp=new QProcess(container);
connect(mp, SIGNAL(finished(int)),this, SLOT(endPlay(int)));
QString command=" -wid "+QString::number(container->winId())+" -slave "+playfile;
mp->start("mplayer "+command);
To copy to clipboard, switch view to plain text mode
Now I use Qt 5.4 and QX11EmbedContainer is not included in Qt 5.4.
What is the replacement of QX11EmbedContainer in Qt 5.4?
I replaced QWidget instead of QX11EmbedContainer in Qt 5.4 as follow:
const QString mplayerPath
("C:/mplayer.exe ");
args <<
" -slave -quiet -ac mad -zoom -vo directx:noaccel -wid " <<
QString::number(Wd
->winId
()) <<
"c:/text.mpg ";
MyProcess -> start (mplayerPath, args);
Wd->show();
QWidget *Wd = new QWidget(this);
const QString mplayerPath ("C:/mplayer.exe ");
QStringList args;
args << " -slave -quiet -ac mad -zoom -vo directx:noaccel -wid " << QString::number(Wd->winId()) << "c:/text.mpg ";
MyProcess = new QProcess (this);
MyProcess -> start (mplayerPath, args);
Wd->show();
To copy to clipboard, switch view to plain text mode
video is played separately from my app's Form. I want it embedded in my Form.
Thanks in advance.
Bookmarks