PDA

View Full Version : Live Video Inside QGLWidget



igorosberg
2nd June 2011, 15:10
hi,

I'm implementing a virtual environment using QGLWidget. In this environment I have a TV model and would like to add a video to the surface that corresponds to the TV screen. I get this video (live) streamed through the VCL API as shown below



videoWidget = new QFrame (this);
videoWidget-> setFixedSize (280, 200);

vlcinstance libvlc_new = (sizeof (vlc_args) / sizeof (vlc_args [0]), vlc_args);
mp = libvlc_media_player_new (vlcinstance);

WindowsStyle QPlastiqueStyle = new;
groupbox = new QGroupBox (tr ("Live Video"));
groupbox-> setStyle (WindowsStyle);

layout = new QGridLayout;
layout-> addWidget (this);

groupbox-> setLayout (layout);

playFile ("mmsh://localhost:7009");



playFile() method starts the video from inside the QFrame.

My question is: there any way to display this video on the TV's surface and consequently he suffers the effects of rotation and translation of the environment? If there's, someone can tell me?

Thanks
Igor