|VideoWidget (QWidget *parent=0, Qt::WindowFlags f=0)|
|ElementPtr||videoSink () const|
|void||setVideoSink (const ElementPtr &sink)|
|void||watchPipeline (const PipelinePtr &pipeline)|
|virtual void||paintEvent (QPaintEvent *event)|
A generic video widget that can embed a video sink.
This widget allows you to embed a video sink on a Qt user interface.
There are two ways of using this widget:
Nearly all the methods of this class must be called from Qt's GUI thread. Also, you cannot start or stop watching a pipeline that is in PLAYING state. Doing so may crash the widget.
This widget will always keep a strong reference to the element that it is given, whether this is a video sink or a pipeline. If you want to destroy this element or pipeline, you need to call releaseVideoSink() or stopPipelineWatch() respectively.
Sets the video sink element that is going to be embedded. Any sink that implements the XOverlay interface will work, as well as "qtvideosink", "qtglvideosink" and "qwidgetvideosink".
Starts watching a pipeline for any attached XOverlay sinks. If such a sink is found while the pipeline prepares itself to start playing, it is embedded to the widget.