|
QGroundControl
Ground Control Station for MAVLink Drones
|
Serves a synthetic (videotestsrc) live video stream for MockLink so the GStreamer receive pipeline can be exercised end-to-end without real hardware. More...
#include <MockVideoStreamServer.h>
Public Types | |
| enum class | StreamType { RtpUdpH264 , RtpUdpH265 , RtspH264 , MpegTsUdp , MpegTsTcp } |
Public Member Functions | |
| MockVideoStreamServer ()=default | |
| ~MockVideoStreamServer () | |
| MockVideoStreamServer (const MockVideoStreamServer &)=delete | |
| MockVideoStreamServer & | operator= (const MockVideoStreamServer &)=delete |
| bool | start (StreamType type, const QString &host, quint16 port) |
| void | stop () |
| Stop the stream and release all resources. Safe to call when not running. | |
| bool | isRunning () const |
| QString | servedUri () const |
Static Public Member Functions | |
| static bool | isStreamTypeAvailable (StreamType type) |
Serves a synthetic (videotestsrc) live video stream for MockLink so the GStreamer receive pipeline can be exercised end-to-end without real hardware.
One instance serves exactly one stream. The served URI (available via servedUri() after a successful start()) is what MockLink advertises via VIDEO_STREAM_INFORMATION, so QGC auto-configures its receiver to the matching transport/codec.
Definition at line 24 of file MockVideoStreamServer.h.
|
strong |
Transport + codec of the served stream. Kept independent of MockConfiguration so the GStreamer layer carries no dependency on the Comms/MockLink module.
Definition at line 29 of file MockVideoStreamServer.h.
|
default |
| MockVideoStreamServer::~MockVideoStreamServer | ( | ) |
Definition at line 53 of file MockVideoStreamServer.cc.
References stop().
|
delete |
|
inline |
Definition at line 50 of file MockVideoStreamServer.h.
|
static |
True when the encoder/muxer elements required for type are present in the local GStreamer install (e.g. false for RtpUdpH265 when x265enc is missing, or RtspH264 when gst-rtsp-server was not built in).
Definition at line 58 of file MockVideoStreamServer.cc.
References MpegTsTcp, MpegTsUdp, RtpUdpH264, RtpUdpH265, and RtspH264.
Referenced by start().
|
delete |
|
inline |
Definition at line 51 of file MockVideoStreamServer.h.
| bool MockVideoStreamServer::start | ( | StreamType | type, |
| const QString & | host, | ||
| quint16 | port | ||
| ) |
Start serving a test pattern of the given type on host:port.
Definition at line 84 of file MockVideoStreamServer.cc.
References isStreamTypeAvailable(), MpegTsTcp, MpegTsUdp, RtpUdpH264, RtpUdpH265, RtspH264, and stop().
| void MockVideoStreamServer::stop | ( | ) |
Stop the stream and release all resources. Safe to call when not running.
Definition at line 171 of file MockVideoStreamServer.cc.
Referenced by start(), and ~MockVideoStreamServer().