Get IP camera stream with Phonon
Unsolved
General and Desktop
-
Hi,
I use Qt4.8.6 and Qml to develop my app. I want to dispaly in QML view from camera. How could I do that with Phonon? In VideoPlayer I found member VideoWidget class, so I can do something like:
login = "admin"; password = "1234"; ip = "192.168.2.106"; port = 80; QUrl url("rtsp://" + ip + ":" + QString::number(port) +"/ipcam_h264.sdp"); url.setHost(login); url.setPassword(password); videoPlayer = new Phonon::VideoPlayer(Phonon::VideoCategory, NULL); connect(videoPlayer, SIGNAL(finished()), videoPlayer, SLOT(deleteLater())); videoPlayer->play(url); QImage image = videoPlayer()->videoWidget()->snapshot();
And try to display it, but there are no any signal like "snapshotChanged()" to refresh display. How could I correctly implement display video from IP camera to my Qml?