# Include <qapplication> # include <qprocess> # include <qwidget> # include <qgraphicsscene> # include <qgraphicsview> # include <qdebug> int main (INT argc, char * argv []) {qapplication app (argc, argv); qgraphicsscene scene; qgraphicsview view (& scene); view. resize (qsize (640,480); qwidget * m_widget = new qwidget (& view); // you must specify that the parent of qwidget is qgraphicsview! M_widget-> resize (view. size (); scene. addwidget (m_widget); qprocess * m_process = new qprocess (); qstringlist ARGs; ARGs <"-slave"; ARGs <"-quiet "; ARGs <"-wid" <qstring: Number (ulong) m_widget-> winid (); ARGs <"-colorkey" <"0x020202 "; ARGs <"-vo" <"direct3d"; ARGs <"-Cache" <"4096 "; // for network ARGs <"-SS" <qstring: Number (0); // ARGs <"-idle"; ARGs <"E: \ media \ 1.mov"; m_process-> setprocesschannelmode (qprocess: mergedchannels); m_process-> Start ("mplayer.exe", argS); m_process-> waitforstarted (); qdebug () <view. size (); view. show (); Return app.exe C ();}
Refer:
Http://code.google.com/p/phonon-vlc-mplayer/issues/detail? Id = 18
Http://mail.kde.org/pipermail/phonon-backends/2009-October/000317.html