QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GStreamer.h
Go to the documentation of this file.
1#pragma once
2
3#include <functional>
4#include <optional>
5
6#include <QtCore/QByteArray>
7#include <QtCore/QStringList>
8
9#include "VideoBackend.h"
10
11typedef struct _GstElement GstElement;
12
14class QObject;
15class QQuickWindow;
16class QVideoSink;
17
18namespace GStreamer {
19
22{
23 QString feature;
24 QStringList factories;
25 bool required = false;
26 QString hint;
27};
28
31QList<MissingPluginFeature> missingPluginFeatures(const std::function<bool(const char* factoryName)>& hasFactory);
32
34bool completeInit(std::optional<int> debugLevel = std::nullopt);
35void setDebugLevel(int level);
38GstElement* createVideoSink(const QByteArray& conversionElement, bool disablePixelAspectRatio, bool gpuZeroCopy);
39
42QGCQVideoSinkController* setupQVideoSinkElement(GstElement* sinkBin, QVideoSink* videoSink, QObject* controllerParent);
43
44// Process/runtime lifecycle, reached through GStreamerVideoBackend.
45bool initialize(const VideoBackend::InitParams& params);
46void onMainWindowReady(QQuickWindow* window);
47
48} // namespace GStreamer
struct _GstElement GstElement
GstElement * createVideoSink(const QByteArray &conversionElement, bool disablePixelAspectRatio, bool gpuZeroCopy)
Definition GStreamer.cc:258
void onMainWindowReady(QQuickWindow *window)
Definition GStreamer.cc:317
void setDebugLevel(int level)
QList< MissingPluginFeature > missingPluginFeatures(const std::function< bool(const char *factoryName)> &hasFactory)
Definition GStreamer.cc:134
QGCQVideoSinkController * setupQVideoSinkElement(GstElement *sinkBin, QVideoSink *videoSink, QObject *controllerParent)
Definition GStreamer.cc:287
bool completeInit(std::optional< int > debugLevel)
debugLevel: the debug threshold to start with (none when unset), unless GST_DEBUG is set.
Definition GStreamer.cc:200
bool initialize(const VideoBackend::InitParams &params)
Definition GStreamer.cc:232
A QGC video feature whose GStreamer elements are not all registered.
Definition GStreamer.h:22
QString hint
The likely cause, when it isn't simply a missing plugin.
Definition GStreamer.h:26
QStringList factories
The missing element factories; "a|b" when neither alternative exists.
Definition GStreamer.h:24
bool required
Part of the display core: GStreamer video can't work without it.
Definition GStreamer.h:25