Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Video streaming with qt

Video streaming with qt

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.8k 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

    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
    0
    • S Offline
      S Offline
      swhweng
      wrote on last edited by
      #2

      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
      0

      • Login

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