Nothing fancy to see here.
VideoPlayerWindow
::VideoPlayerWindow(char *ip, uint16_t port,
QWidget *parent
) : _vss(ip, port)
{
setupGUI();
_vss.startReceiver();
}
void VideoPlayerWindow::setupGUI() {
// QMainWindow takes ownership of the widget, so no need
// to delete it.
_vpWidget = new VideoPlayerWidget(this);
setCentralWidget(_vpWidget);
connect(&_vss, SIGNAL(newStreamFound(VideoStream*)), _vpWidget, SLOT(addVideoStream(VideoStream*)));
}
VideoPlayerWindow::VideoPlayerWindow(char *ip, uint16_t port, QWidget *parent) :
QMainWindow(parent),
_vss(ip, port)
{
setupGUI();
_vss.startReceiver();
}
void VideoPlayerWindow::setupGUI() {
// QMainWindow takes ownership of the widget, so no need
// to delete it.
_vpWidget = new VideoPlayerWidget(this);
setCentralWidget(_vpWidget);
connect(&_vss, SIGNAL(newStreamFound(VideoStream*)), _vpWidget, SLOT(addVideoStream(VideoStream*)));
}
To copy to clipboard, switch view to plain text mode
with member variables
VideoPlayerWidget* _vpWidget;
VideoStreamerSession _vss;
VideoPlayerWidget* _vpWidget;
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.
Bookmarks