Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. Phonon + QBuffer

Phonon + QBuffer

Scheduled Pinned Locked Moved Language Bindings
2 Posts 1 Posters 2.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lorik
    wrote on last edited by
    #1

    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 ?

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lorik
      wrote on last edited by
      #2

      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();
      @

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved