QtGStreamer 1.2.0
|
#include <QGst/Ui/VideoWidget>
Inherits QWidget.
Public Member Functions | |
VideoWidget (QWidget *parent=0, Qt::WindowFlags f=0) | |
ElementPtr | videoSink () const |
void | setVideoSink (const ElementPtr &sink) |
void | releaseVideoSink () |
void | watchPipeline (const PipelinePtr &pipeline) |
void | stopPipelineWatch () |
Protected Member Functions | |
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.
Definition at line 68 of file videowidget.h.
|
explicit |
Definition at line 321 of file videowidget.cpp.
|
virtual |
Definition at line 326 of file videowidget.cpp.
ElementPtr QGst::Ui::VideoWidget::videoSink | ( | ) | const |
Returns the video sink element that is currently providing this widget's image, or a null ElementPtr if no sink has been set.
Definition at line 331 of file videowidget.cpp.
void QGst::Ui::VideoWidget::setVideoSink | ( | const ElementPtr & | sink | ) |
Sets the video sink element that is going to be embedded. Any sink that implements the VideoOverlay interface will work, as well as "qtvideosink", "qtglvideosink" and "qwidgetvideosink" (or "qt5videosink", "qt5glvideosink" and "qwidget5videosink" in Qt5)
Definition at line 336 of file videowidget.cpp.
void QGst::Ui::VideoWidget::releaseVideoSink | ( | ) |
Detaches the current video sink from the widget and drops any references to it.
Definition at line 353 of file videowidget.cpp.
void QGst::Ui::VideoWidget::watchPipeline | ( | const PipelinePtr & | pipeline | ) |
Starts watching a pipeline for any attached VideoOverlay sinks. If such a sink is found while the pipeline prepares itself to start playing, it is embedded to the widget.
Definition at line 368 of file videowidget.cpp.
void QGst::Ui::VideoWidget::stopPipelineWatch | ( | ) |
Stops watching a pipeline and also detaches the sink that was discovered in the pipeline, if any.
Definition at line 381 of file videowidget.cpp.
|
protectedvirtual |
Definition at line 391 of file videowidget.cpp.