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

#include <GstReceiverWorker.h>

Inheritance diagram for GstReceiverWorker:
Collaboration diagram for GstReceiverWorker:

Public Types

using Request = GstReceiverRequest
using RecordingRequest = GstRecordingRequest
using Status = GstReceiverStatus

Signals

void statusChanged (const GstReceiverStatus &status)
void recordingStarted (const QString &file)
void recordingFinished (const QString &file, const QString &error)
void errorOccurred (const QString &message)
void graphicsDeviceLost ()
void taskDone ()

Public Member Functions

 GstReceiverWorker (QObject *parent=nullptr)
 ~GstReceiverWorker () override
void apply (const Request &request)
 Steers the stream towards request, acting on what differs from the previous one.
void shutdown ()
 Stops everything and quits the thread.
void setMaxRecordingPartDuration (std::chrono::milliseconds duration)
GstElement * pipeline () const

Detailed Description

GstVideoReceiver's worker, on a thread of its own: steers a PipelineSession towards the receiver's latest GstReceiverRequest (active, config, video sink, restarts, reconnects, recording), reconnecting after a failure as its StreamSupervisor decides.

Reports back through its signals only, so it can outlive a receiver that stopped waiting for it.

Definition at line 26 of file GstReceiverWorker.h.

Member Typedef Documentation

◆ RecordingRequest

◆ Request

◆ Status

Constructor & Destructor Documentation

◆ GstReceiverWorker()

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

◆ ~GstReceiverWorker()

GstReceiverWorker::~GstReceiverWorker ( )
override

Definition at line 40 of file GstReceiverWorker.cc.

Member Function Documentation

◆ apply()

void GstReceiverWorker::apply ( const Request & request)

Steers the stream towards request, acting on what differs from the previous one.

Definition at line 45 of file GstReceiverWorker.cc.

References GstReceiverRequest::active, GstReceiverRequest::config, GstReceiverRequest::reconnects, GstReceiverRequest::recording, GstReceiverRequest::restarts, and GstReceiverRequest::videoSink.

◆ errorOccurred

void GstReceiverWorker::errorOccurred ( const QString & message)
signal

◆ graphicsDeviceLost

void GstReceiverWorker::graphicsDeviceLost ( )
signal

The graphics device the stream's pipeline was given is gone: the receiver restarts the stream with a new video sink, which lets go of what they hold of it.

Referenced by GstVideoReceiver::GstVideoReceiver().

◆ pipeline()

GstElement * GstReceiverWorker::pipeline ( ) const
inline

Definition at line 47 of file GstReceiverWorker.h.

◆ recordingFinished

void GstReceiverWorker::recordingFinished ( const QString & file,
const QString & error )
signal

◆ recordingStarted

void GstReceiverWorker::recordingStarted ( const QString & file)
signal

◆ setMaxRecordingPartDuration()

void GstReceiverWorker::setMaxRecordingPartDuration ( std::chrono::milliseconds duration)
inline

How long a part of the recordings started from now on records, instead of RecordingPlan::kMaxPartDuration. For tests, which can't wait that long.

Definition at line 45 of file GstReceiverWorker.h.

◆ shutdown()

void GstReceiverWorker::shutdown ( )

Stops everything and quits the thread.

Definition at line 146 of file GstReceiverWorker.cc.

Referenced by GstVideoReceiver::~GstVideoReceiver().

◆ statusChanged

void GstReceiverWorker::statusChanged ( const GstReceiverStatus & status)
signal

◆ taskDone

void GstReceiverWorker::taskDone ( )
signal

A task the receiver posted has run, a request or its heartbeat: the worker still gets to them. Emitted by the receiver's posting, on the worker's thread.

Referenced by GstVideoReceiver::GstVideoReceiver().


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