#include <QGCQVideoSinkController.h>
Public Member Functions | |
| QGCQVideoSinkController (GstElement *element, QObject *parent=nullptr) | |
| ~QGCQVideoSinkController () override | |
| void | setActive (bool active) |
| void | setVideoSink (QPointer< QVideoSink > sink) |
| void | followWindowVisibility (QQuickItem *videoOutput) |
| void | prepareForRelease () |
| void | releaseFrame () |
| QSize | pictureSize () const |
GUI-thread companion for the GstQgcQVideoSink element: binds it to the QVideoSink it delivers to, and lets it deliver only while that output's window is visible. Ownership: parent owns the controller; the controller owns one GstElement ref so deferred QObject teardown can still clear the element binding. Every member function runs on the controller's (GUI) thread.
Definition at line 19 of file QGCQVideoSinkController.h.
| QGCQVideoSinkController::QGCQVideoSinkController | ( | GstElement * | element, |
| QObject * | parent = nullptr ) |
element is the GstQgcQVideoSink to control. Controller takes a ref so QObject teardown can safely clear the element binding even if the parent bin is released first.
Definition at line 14 of file QGCQVideoSinkController.cc.
References QGCQVideoSinkController().
Referenced by QGCQVideoSinkController().
|
override |
Definition at line 19 of file QGCQVideoSinkController.cc.
| void QGCQVideoSinkController::followWindowVisibility | ( | QQuickItem * | videoOutput | ) |
Delivers only while videoOutput's current window is visible (not hidden or minimized); call again when the item moves to another window. nullptr stops delivering.
Definition at line 24 of file QGCQVideoSinkController.cc.
| QSize QGCQVideoSinkController::pictureSize | ( | ) | const |
The size of the picture in the element's last buffer, before its orientation; invalid before the first caps. A frame's viewport is smaller where a transformation meta leaves out the padding of a squeezed texture.
Definition at line 108 of file QGCQVideoSinkController.cc.
| void QGCQVideoSinkController::prepareForRelease | ( | ) |
Release the element binding synchronously ahead of deleteLater, so a deferred destruction can't touch the element while a replacement controller is installed on it. Idempotent.
Definition at line 88 of file QGCQVideoSinkController.cc.
| void QGCQVideoSinkController::releaseFrame | ( | ) |
Clear the bound QVideoSink's current frame, and the GstSample/decoder buffer it pins, but keep the binding for the next stream.
Definition at line 97 of file QGCQVideoSinkController.cc.
| void QGCQVideoSinkController::setActive | ( | bool | active | ) |
Definition at line 46 of file QGCQVideoSinkController.cc.
| void QGCQVideoSinkController::setVideoSink | ( | QPointer< QVideoSink > | sink | ) |
Definition at line 58 of file QGCQVideoSinkController.cc.
References setVideoSink().
Referenced by setVideoSink().