3 #include <QProcessEnvironment>
4 #include <QTemporaryFile>
6 //=========================================================
7 Player::Player(QUrl url
)
12 //=========================================================
13 Player::Player(QByteArray song
)
18 arg
= file
.fileName();
22 //=========================================================
28 //=========================================================
32 QProcessEnvironment env
= p
->processEnvironment();
33 if( env
.contains( "http_proxy" ))
34 env
.remove( "http_proxy" );
35 p
->setProcessEnvironment( env
);
36 p
->start( "mplayer", QStringList() << arg
);
37 p
->waitForStarted( -1 );
40 while( p
->canReadLine())
41 qDebug( "mplayer: %s", p
->readLine().constData());
43 if( p
->waitForFinished( 250 ))