QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GStreamerDecoderRankPlan.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/QList>
8#include <QtCore/QStringList>
9
10#include "VideoDecoderOptions.h"
11
12// The decoder rank policy behind the forceVideoDecoder setting, as a pure function of the installed decoders: no
13// registry, so every platform's rules can be tested on any host. GStreamerDecoderRanks applies its plans.
14namespace GStreamer {
15
18{
19 QByteArray name;
20 unsigned rank = 0;
21 bool hardware = false;
24 qint64 adapterLuid = 0;
25};
26
28enum class D3DApi : uint8_t
29{
32};
33
36{
43 std::optional<D3DApi> rhiD3DApi;
47 bool d3d11OpensD3D12 = false;
50 qint64 rhiAdapterLuid = 0;
54 bool softwareRendering = false;
55
56 friend bool operator==(const RankTraits&, const RankTraits&) = default;
57};
58
60{
61 QByteArray feature;
62 uint16_t rank = 0;
63};
64
66{
68 QList<RankChange> changes;
70 QStringList warnings;
71};
72
74RankPlan planRanks(VideoDecoderOption option, const QList<DecoderInfo>& decoders, const RankTraits& traits);
75
76} // namespace GStreamer
VideoDecoderOption
The decoders VideoSettings' forceVideoDecoder can force. The values are persisted.
D3DApi
The D3D decoder API a Windows QRhi backend samples zero-copy.
RankPlan planRanks(VideoDecoderOption option, const QList< DecoderInfo > &decoders, const RankTraits &traits)
The rank changes option makes to decoders, from their original ranks, on a platform with traits.
A video decoder factory as planRanks() sees it.
qint64 adapterLuid
The DXGI adapter a Direct3D decoder decodes on; 0 for every other decoder, and when it isn't known.
unsigned rank
The rank before QGC changed it.
QList< RankChange > changes
At most one per decoder, in the order of planRanks()'s input.
QStringList warnings
Why the option may not do what it says, for the log.
The platform rules planRanks() adds to an option.
friend bool operator==(const RankTraits &, const RankTraits &)=default
std::optional< D3DApi > rhiD3DApi