Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Video streaming with qt

    General and Desktop
    2
    2
    3662
    Loading More Posts
    • 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
      lorik last edited by

      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

      1 Reply Last reply Reply Quote 0
      • S
        swhweng last edited by

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

        1 Reply Last reply Reply Quote 0
        • First post
          Last post