QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
VideoStreamResolver.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <optional>
5
6#include <QtCore/QByteArray>
7#include <QtCore/QObject>
8#include <QtCore/QString>
9#include <QtQmlIntegration/QtQmlIntegration>
10
11#include "VideoDecoderOptions.h"
12#include "VideoReceiver.h"
13
15class VideoSettings;
16
19Q_NAMESPACE
20QML_NAMED_ELEMENT(VideoSourceRole)
21
22
23enum class Role : uint8_t
24{
29};
30Q_ENUM_NS(Role)
31
32
48
49Settings snapshot(VideoSettings* videoSettings);
50
54std::optional<VideoReceiver::Config> resolve(const Settings& settings, const QGCVideoStreamInfo* streamInfo, Role role);
55
58
60bool isAutoStream(const QGCVideoStreamInfo* streamInfo);
61
63bool isNetworkSource(const QString& videoSource);
64
67QString transportName(const QString& uri);
68
69} // namespace VideoStreamResolver
VideoDecoderOption
The decoders VideoSettings' forceVideoDecoder can force. The values are persisted.
Encapsulates the contents of a VIDEO_STREAM_INFORMATION message.
Maps the video settings and a camera's advertised stream to what a stream source's VideoReceiver play...
Settings snapshot(VideoSettings *videoSettings)
bool isNetworkSource(const QString &videoSource)
True for the manual sources that are network streams (not "disabled", not a local camera).
VideoReceiver::DisplayConfig displayConfig(const Settings &settings)
The display sink settings: GPU zero-copy unless the CPU path or a software decoder is forced.
Role
What a video source, each with a VideoStreamController, is. VideoSourceRole.Primary,...
@ Primary
The stream to display: a vehicle's current camera's current one, else the one the settings configure.
@ Camera
The local camera: the one the video source setting names or, beside a stream, the one for a tile.
@ Tile
Another stream a vehicle's cameras advertise, shown in a tile.
@ Thermal
The thermal stream a vehicle's current camera advertises.
QString transportName(const QString &uri)
bool isAutoStream(const QGCVideoStreamInfo *streamInfo)
True when streamInfo advertises a URI, which then takes precedence over the manual settings.
std::optional< VideoReceiver::Config > resolve(const Settings &settings, const QGCVideoStreamInfo *streamInfo, Role role)
How the display sink presents frames. Construct-only: a change applies when restart() rebuilds the si...
The video settings resolve() reads, and what they depend on.