QVideoFilterRunnable Class
The QVideoFilterRunnable class represents the implementation of a filter that owns all graphics and computational resources, and performs the actual filtering or calculations. More...
Header: | #include <QVideoFilterRunnable> |
qmake: | QT += multimedia |
Since: | Qt 5.5 |
Public Types
Public Functions
virtual QVideoFrame | run(QVideoFrame *input, const QVideoSurfaceFormat &surfaceFormat, QVideoFilterRunnable::RunFlags flags) = 0 |
Detailed Description
The QVideoFilterRunnable class represents the implementation of a filter that owns all graphics and computational resources, and performs the actual filtering or calculations.
Video filters are split into QAbstractVideoFilter and corresponding QVideoFilterRunnable instances, similar to QQuickItem and QSGNode. This is necessary to support threaded rendering scenarios. When using the threaded render loop of the Qt Quick scene graph, all rendering happens on a dedicated thread. QVideoFilterRunnable instances always live on this thread and all its functions, run(), the constructor, and the destructor, are guaranteed to be invoked on that thread with the OpenGL context bound. QAbstractVideoFilter instances live on the main (GUI) thread, like any other QObject and QQuickItem instances created from QML.
Once created, QVideoFilterRunnable instances are managed by Qt Multimedia and will be automatically destroyed and recreated when necessary, for example when the scene graph is invalidated or the QQuickWindow changes or is closed. Creation happens via the QAbstractVideoFilter::createFilterRunnable() factory function.
See also QAbstractVideoFilter.
Member Type Documentation
enum QVideoFilterRunnable::RunFlag
flags QVideoFilterRunnable::RunFlags
Constant | Value | Description |
---|---|---|
QVideoFilterRunnable::LastInChain | 0x01 | Indicates that the filter runnable's associated QAbstractVideoFilter is the last in the corresponding VideoOutput type's filters list, meaning that the returned frame is the one that is going to be presented to the scene graph without invoking any further filters. |
The RunFlags type is a typedef for QFlags<RunFlag>. It stores an OR combination of RunFlag values.