Nothing fancy to see here.

Qt Code:
  1. VideoPlayerWindow::VideoPlayerWindow(char *ip, uint16_t port, QWidget *parent) :
  2. QMainWindow(parent),
  3. _vss(ip, port)
  4. {
  5. setupGUI();
  6.  
  7. _vss.startReceiver();
  8. }
  9.  
  10. void VideoPlayerWindow::setupGUI() {
  11. // QMainWindow takes ownership of the widget, so no need
  12. // to delete it.
  13. _vpWidget = new VideoPlayerWidget(this);
  14. setCentralWidget(_vpWidget);
  15.  
  16. connect(&_vss, SIGNAL(newStreamFound(VideoStream*)), _vpWidget, SLOT(addVideoStream(VideoStream*)));
  17. }
To copy to clipboard, switch view to plain text mode 

with member variables

Qt Code:
  1. VideoPlayerWidget* _vpWidget;
  2. VideoStreamerSession _vss;
To copy to clipboard, switch view to plain text mode 

VideoStreamerSession::startReceiver() starts an asynchronous receiver thread that processes incoming data related to streaming video.

I'd rather not post the entire program online, but if you need any more code I'll upload the project to temporary storage.