QtGStreamer  0.10.2
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Protected Member Functions
QGst::Ui::VideoWidget Class Reference

#include <QGst/Ui/VideoWidget>

List of all members.

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)

Detailed Description

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.

Note:
Autoplug video sinks such as autovideosink are not supported due to the complexity of handling them correctly. If you wish to use autovideosink, you can either set it to READY state and get its child XOverlay element or just watch the pipeline in which you plug it.
Examples:
examples/player/main.cpp.

Definition at line 62 of file videowidget.h.


Member Function Documentation

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 311 of file videowidget.cpp.

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".

Note:
  • This method must be called from Qt's GUI thread.
  • Passing a null ElementPtr has the same effect as calling releaseVideoSink().
  • You cannot set a new sink if the previous one has not been released first.

Definition at line 316 of file videowidget.cpp.

Detaches the current video sink from the widget and drops any references to it.

Note:
This method must be called from Qt's GUI thread.

Definition at line 333 of file videowidget.cpp.

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.

Note:
  • This method must be called from Qt's GUI thread.
  • Passing a null PipelinePtr has the same effect as calling stopPipelineWatch().
  • You cannot start watching a new pipeline if you don't stop watching the previous one first with stopPipelineWatch().

Definition at line 348 of file videowidget.cpp.

Stops watching a pipeline and also detaches the sink that was discovered in the pipeline, if any.

Note:
This method must be called from Qt's GUI thread.

Definition at line 361 of file videowidget.cpp.


The documentation for this class was generated from the following files: