QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GstVideoReceiver Class Reference

#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
 
QGCVideoStreamInfovideoStreamInfo ()
 
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
 

Detailed Description

Definition at line 45 of file GstVideoReceiver.h.

Constructor & Destructor Documentation

◆ GstVideoReceiver()

GstVideoReceiver::GstVideoReceiver ( QObject *  parent = nullptr)
explicit

Definition at line 62 of file GstVideoReceiver.cc.

References VideoReceiver::_watchdogTimer.

◆ ~GstVideoReceiver()

GstVideoReceiver::~GstVideoReceiver ( )

Definition at line 72 of file GstVideoReceiver.cc.

References GstVideoWorker::shutdown(), and stop().

Member Function Documentation

◆ currentJitterNs()

qint64 GstVideoReceiver::currentJitterNs ( ) const
inline

Definition at line 62 of file GstVideoReceiver.h.

◆ decoderName()

QString GstVideoReceiver::decoderName ( ) const
inline

Definition at line 59 of file GstVideoReceiver.h.

◆ decoderStatsChanged

void GstVideoReceiver::decoderStatsChanged ( )
signal

◆ droppedFrames()

quint64 GstVideoReceiver::droppedFrames ( ) const
inline

Definition at line 61 of file GstVideoReceiver.h.

◆ dumpPipelineGraph

void GstVideoReceiver::dumpPipelineGraph ( const QString &  tag = QStringLiteral("manual"))
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().

◆ processedFrames()

quint64 GstVideoReceiver::processedFrames ( ) const
inline

Definition at line 60 of file GstVideoReceiver.h.

◆ qosProportion()

double GstVideoReceiver::qosProportion ( ) const
inline

Definition at line 63 of file GstVideoReceiver.h.

◆ qosQuality()

int GstVideoReceiver::qosQuality ( ) const
inline

Definition at line 64 of file GstVideoReceiver.h.

◆ start

◆ startDecoding

◆ startRecording

◆ stop

◆ stopDecoding

◆ stopRecording

◆ takeScreenshot

void GstVideoReceiver::takeScreenshot ( const QString &  imageFile)
overrideslot

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