QWebview and omxplayer on RasPi
-
Hi,
I'm a newbie for the QT programming and RasPi. I'm in the process writing a application for the Raspi where it's get the html webpage from a link and the webpage has a video. The raspi has omxplayer and I can view video using omxplayer separately using a script. I managed to use some of the examples and QT documentation to load the html webpage.
int main(int argc, char *argv[]) { QApplication a(argc, argv, QApplication::GuiServer); QWebView *view = new QWebView(); view->setGeometry(0,0,960,720); view->setZoomFactor(1.5); view->setWindowState(Qt::WindowFullScreen); view->setStyleSheet("backgroud:transparent"); view->setAttribute(Qt::WA_TranslucentBackground); view->page()->mainFrame()->setScrollBarPolicy( Qt::Vertical, Qt::ScrollBarAlwaysOff ); view->page()->mainFrame()->setScrollBarPolicy( Qt::Horizontal, Qt::ScrollBarAlwaysOff ); a.setOverrideCursor(Qt::BlankCursor); view->show(); DownloadManager manager(view); //This is the class is a thread and start the omxplayer scripts. manager.start(); a.exec(); qDebug() << "Terminating the DownloadManager"; manager.exit(); manager.wait(); qDebug() <<"QThread is shutdown...."; return 0; }
The Html webpage has an embedded video, and the embedded video will stream video using the omxplayer. I was hoping the omxplayer will run under my QT application but I'm having a issue, when the omxplayer is running, it always run on top of my QT application.
Is there any where I can run my QT application on top of the layer on my screen? or is there any solution so that i can embeded the video on the html page using the omxplayer?
I'm using QT 4.8 at this moment, but i can move to 5.5 if required.
thanks in advance.
Regards,
jenny