September 26, 2011

lorik lorik
Lab Rat
21 posts

Phonon + QBuffer

 

How actually does it works?

  1. QByteArray byteArray(someBuffer);
  2. QBuffer buffer(&byteArray);  
  3. buffer.open(QIODevice::ReadOnly);
  4. m_video = new Video(&buffer,this);
  5. m_video->show();
  6. this->hide();
  7.  
  8. m_video->play();

Is that enough to play the incoming data to someBuffer ?

1 reply

September 26, 2011

lorik lorik
Lab Rat
21 posts

sorry…
In a Video c’tor :

  1. Video::Video(QBuffer *source,QWidget *parent)
  2. {
  3. m_source = new Phonon::MediaSource(source);
  4. m_media = new Phonon::MediaObject(ui.label);
  5. m_video = new Phonon::VideoWidget(ui.label);
  6. m_video->setGeometry(0,0,ui.label->width(),ui.label->height());
  7. Phonon::createPath(m_media,m_video);
  8. m_media->setCurrentSource(*m_source);
  9. }

and in Video:play

  1.   m_media->play();

 
  ‹‹ how to pass array/list in signal and emit the signal?      PySide-QIntValidator::validate: Second tuple element is not convertible to unicode??????? ››

You must log in to post a reply. Not a member yet? Register here!