Phonon + QBuffer
-
How actually does it works?
@
QByteArray byteArray(someBuffer);
QBuffer buffer(&byteArray);
buffer.open(QIODevice::ReadOnly);
m_video = new Video(&buffer,this);
m_video->show();
this->hide();m_video->play();
@Is that enough to play the incoming data to someBuffer ?
-
sorry...
In a Video c'tor :
@
Video::Video(QBuffer *source,QWidget *parent)
{
m_source = new Phonon::MediaSource(source);
m_media = new Phonon::MediaObject(ui.label);
m_video = new Phonon::VideoWidget(ui.label);
m_video->setGeometry(0,0,ui.label->width(),ui.label->height());
Phonon::createPath(m_media,m_video);
m_media->setCurrentSource(*m_source);
}
@and in Video:play
@
m_media->play();
@