|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <GstVideoReceiver.h>
Inheritance diagram for GstVideoReceiver:
Collaboration diagram for GstVideoReceiver:Public Slots | |
| void | start (uint32_t timeout) override |
| void | stop () override |
| void | startDecoding (void *sink) override |
| void | stopDecoding () override |
| void | startRecording (const QString &videoFile, FILE_FORMAT format) override |
| void | stopRecording () override |
| void | takeScreenshot (const QString &imageFile) override |
| Q_INVOKABLE void | dumpPipelineGraph (const QString &tag=QStringLiteral("manual")) |
Public Slots inherited from VideoReceiver | |
| virtual void | start (uint32_t timeout)=0 |
| virtual void | stop ()=0 |
| virtual void | startDecoding (VideoSinkHandle sink)=0 |
| virtual void | stopDecoding ()=0 |
| virtual void | startRecording (const QString &videoFile, FILE_FORMAT format)=0 |
| virtual void | stopRecording ()=0 |
| virtual void | takeScreenshot (const QString &imageFile)=0 |
Signals | |
| void | decoderStatsChanged () |
Signals inherited from VideoReceiver | |
| void | timeout () |
| void | streamingChanged (bool active) |
| void | decodingChanged (bool active) |
| void | recordingChanged (bool active) |
| void | recordingStarted (const QString &filename) |
| void | videoSizeChanged (QSize size) |
| void | sinkChanged (VideoSinkHandle sink) |
| void | nameChanged (const QString &name) |
| void | uriChanged (const QString &uri) |
| void | startedChanged (bool started) |
| void | lowLatencyChanged (bool lowLatency) |
| void | rtpJitterLatencyMsChanged (int ms) |
| void | autoReconnectChanged (bool enabled) |
| void | videoStreamInfoChanged () |
| void | widgetChanged (QQuickItem *widget) |
| void | onStartComplete (STATUS status) |
| void | onStopComplete (STATUS status) |
| void | onStartDecodingComplete (STATUS status) |
| void | onStopDecodingComplete (STATUS status) |
| void | onStartRecordingComplete (STATUS status) |
| void | onStopRecordingComplete (STATUS status) |
| void | onTakeScreenshotComplete (STATUS status) |
Public Member Functions | |
| GstVideoReceiver (QObject *parent=nullptr) | |
| ~GstVideoReceiver () | |
| QString | decoderName () const |
| quint64 | processedFrames () const |
| quint64 | droppedFrames () const |
| qint64 | currentJitterNs () const |
| double | qosProportion () const |
| int | qosQuality () const |
Public Member Functions inherited from VideoReceiver | |
| VideoReceiver (QObject *parent=nullptr) | |
| bool | isThermal () const |
| VideoSinkHandle | sink () const |
| QQuickItem * | widget () |
| QString | name () const |
| QString | uri () const |
| bool | started () const |
| bool | lowLatency () const |
| int | rtpJitterLatencyMs () const |
| bool | autoReconnect () const |
| QGCVideoStreamInfo * | videoStreamInfo () |
| QString | recordingOutput () const |
| virtual void | setSink (VideoSinkHandle sink) |
| virtual void | setWidget (QQuickItem *widget) |
| void | setName (const QString &name) |
| void | setUri (const QString &uri) |
| void | setStarted (bool started) |
| void | setLowLatency (bool lowLatency) |
| void | setRtpJitterLatencyMs (int ms) |
| void | setAutoReconnect (bool enabled) |
| void | setVideoStreamInfo (QGCVideoStreamInfo *videoStreamInfo) |
Additional Inherited Members | |
Public Types inherited from VideoReceiver | |
| enum | FILE_FORMAT { FILE_FORMAT_MIN = 0 , FILE_FORMAT_MKV = FILE_FORMAT_MIN , FILE_FORMAT_MOV , FILE_FORMAT_MP4 , FILE_FORMAT_MAX = FILE_FORMAT_MP4 } |
| enum | STATUS { STATUS_MIN = 0 , STATUS_OK = STATUS_MIN , STATUS_FAIL , STATUS_INVALID_STATE , STATUS_INVALID_URL , STATUS_NOT_IMPLEMENTED , STATUS_MAX = STATUS_NOT_IMPLEMENTED } |
| using | VideoSinkHandle = void * |
| Backend-specific decoded-frame sink. | |
Static Public Member Functions inherited from VideoReceiver | |
| static bool | isValidFileFormat (FILE_FORMAT format) |
| static bool | isValidStatus (STATUS status) |
Protected Attributes inherited from VideoReceiver | |
| VideoSinkHandle | _sink = nullptr |
| QQuickItem * | _widget = nullptr |
| QGCVideoStreamInfo * | _videoStreamInfo = nullptr |
| QString | _name |
| QString | _uri |
| bool | _started = false |
| std::atomic< bool > | _decoding = false |
| bool | _recording = false |
| bool | _streaming = false |
| bool | _lowLatency = false |
| int | _rtpJitterLatencyMs = 80 |
| std::atomic< bool > | _autoReconnect = true |
| RTSP/UDP auto-reconnect with exponential backoff on watchdog/error. | |
| bool | _resetVideoSink = false |
| bool | _endOfStream = false |
| bool | _removingDecoder = false |
| bool | _removingRecorder = false |
| int | _buffer = 0 |
| std::atomic< qint64 > | _lastSourceFrameTime = 0 |
| std::atomic< qint64 > | _lastVideoFrameTime = 0 |
| int | _statsTickCounter = 0 |
| QTimer | _watchdogTimer |
| uint32_t | _timeout = 0 |
| QString | _recordingOutput |
Definition at line 45 of file GstVideoReceiver.h.
|
explicit |
Definition at line 62 of file GstVideoReceiver.cc.
References VideoReceiver::_watchdogTimer.
| GstVideoReceiver::~GstVideoReceiver | ( | ) |
Definition at line 72 of file GstVideoReceiver.cc.
References GstVideoWorker::shutdown(), and stop().
|
inline |
Definition at line 62 of file GstVideoReceiver.h.
|
inline |
Definition at line 59 of file GstVideoReceiver.h.
|
signal |
|
inline |
Definition at line 61 of file GstVideoReceiver.h.
|
slot |
Dump the current pipeline graph to GST_DEBUG_DUMP_DOT_DIR (if set) plus CacheLocation/qgc-pipeline-dot for field-bug-report bundles. No-op when the pipeline isn't running. Callable from QML for a debug menu.
Definition at line 747 of file GstVideoReceiver.cc.
References GstVideoWorker::dispatch(), and GStreamer::writePipelineDot().
|
inline |
Definition at line 60 of file GstVideoReceiver.h.
|
inline |
Definition at line 63 of file GstVideoReceiver.h.
|
inline |
Definition at line 64 of file GstVideoReceiver.h.
|
overrideslot |
Definition at line 80 of file GstVideoReceiver.cc.
References VideoReceiver::_buffer, VideoReceiver::_endOfStream, VideoReceiver::_lastSourceFrameTime, VideoReceiver::_rtpJitterLatencyMs, VideoReceiver::_timeout, VideoReceiver::_uri, VideoReceiver::_watchdogTimer, GStreamer::SourceFactory::Buffered, GStreamer::SourceFactory::create(), GstVideoWorker::dispatch(), GStreamer::SourceFactory::Config::doRetransmission, GStreamer::SourceFactory::DropOnLatency, GStreamer::SourceFactory::Config::jitterBuffer, GStreamer::SourceFactory::Config::latencyMs, VideoReceiver::lowLatency(), GStreamer::SourceFactory::None, HwBuffers::onBusSyncMessage(), VideoReceiver::onStartComplete(), start(), VideoReceiver::STATUS_FAIL, VideoReceiver::STATUS_INVALID_STATE, VideoReceiver::STATUS_INVALID_URL, VideoReceiver::STATUS_OK, and VideoReceiver::timeout().
Referenced by start().
|
overrideslot |
Definition at line 426 of file GstVideoReceiver.cc.
References VideoReceiver::_decoding, VideoReceiver::_lastVideoFrameTime, VideoReceiver::_removingDecoder, VideoReceiver::_resetVideoSink, VideoReceiver::_streaming, VideoReceiver::_uri, VideoReceiver::_widget, GstVideoWorker::dispatch(), VideoReceiver::onStartDecodingComplete(), VideoReceiver::sink(), startDecoding(), VideoReceiver::STATUS_FAIL, VideoReceiver::STATUS_INVALID_STATE, and VideoReceiver::STATUS_OK.
Referenced by startDecoding().
|
overrideslot |
Definition at line 530 of file GstVideoReceiver.cc.
References VideoReceiver::_recording, VideoReceiver::_recordingOutput, VideoReceiver::_removingRecorder, VideoReceiver::_uri, GstVideoWorker::dispatch(), VideoReceiver::onStartRecordingComplete(), VideoReceiver::recordingChanged(), startRecording(), VideoReceiver::STATUS_FAIL, VideoReceiver::STATUS_INVALID_STATE, and VideoReceiver::STATUS_OK.
Referenced by startRecording().
|
overrideslot |
Definition at line 282 of file GstVideoReceiver.cc.
References VideoReceiver::_lastSourceFrameTime, VideoReceiver::_streaming, VideoReceiver::_uri, VideoReceiver::_watchdogTimer, GstVideoWorker::dispatch(), HwBuffers::formatPathStats(), VideoReceiver::onStopComplete(), VideoReceiver::STATUS_OK, stop(), VideoReceiver::streamingChanged(), HwBuffers::takeExtraPathStats(), and HwBuffers::PathStats::totalDelivered.
Referenced by stop(), and ~GstVideoReceiver().
|
overrideslot |
Definition at line 498 of file GstVideoReceiver.cc.
References VideoReceiver::_removingDecoder, VideoReceiver::_uri, GstVideoWorker::dispatch(), VideoReceiver::onStopDecodingComplete(), VideoReceiver::STATUS_FAIL, VideoReceiver::STATUS_INVALID_STATE, VideoReceiver::STATUS_OK, and stopDecoding().
Referenced by stopDecoding().
|
overrideslot |
Definition at line 601 of file GstVideoReceiver.cc.
References VideoReceiver::_recording, VideoReceiver::_removingRecorder, VideoReceiver::_uri, GstVideoWorker::dispatch(), VideoReceiver::onStopRecordingComplete(), VideoReceiver::STATUS_FAIL, VideoReceiver::STATUS_INVALID_STATE, and stopRecording().
Referenced by stopRecording().
|
overrideslot |
Definition at line 633 of file GstVideoReceiver.cc.
References VideoReceiver::_uri, GstVideoWorker::dispatch(), VideoReceiver::onTakeScreenshotComplete(), VideoReceiver::STATUS_NOT_IMPLEMENTED, and takeScreenshot().
Referenced by takeScreenshot().