Video streaming with qt
-
Hi,
I am getting data thru USB port by chunks
@
{While(haveData)
BYTE * chunk = getData();}
@
and I want to show this data as video stream;I have this example:
@
Phonon::MediaObject *media = new Phonon::MediaObject();
Phonon::VideoWidget *video = new Phonon::VideoWidget();
Phonon::createPath(media, video);
media->setCurrentSource(source);
media->play();
@But I don't understand what should be the source in media->setCurrentSource(source) in my case
Edit: Please wrap code in @ tags; mlong
-
Hi,
the source is according to phonon architecture explained in http://doc.qt.nokia.com/4.7/phonon-overview.html should be like:
for example suppose you are going to play fileName:
@ QString fileName = "video1.avi";
Phonon::MediaSource *mediaSource = new Phonon::MediaSource(fileName);
media->setCurrentSource(*mediaSource);@You set it once and then play by invoking media->play()