QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
HwBuffers.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <gst/gst.h>
6#include <gst/video/video-info.h>
7
8#include <QtCore/QString>
9#include <QtCore/qglobal.h>
10
11class QQuickWindow;
12
13// Same in every build and free of EGL/Qt-private headers; GstHwVideoBuffer.h (Qt-private) is included where needed.
14#include "GstHwPathTelemetry.h"
15#include "GstHwTypes.h"
16#include "GstHwVideoBufferFactory.h" // makeHwVideoBuffer, HwResolvedPathCache
17
18namespace HwBuffers {
19
22inline constexpr char kGraphicsDeviceServedMessage[] = "qgc-graphics-device-served";
23
27inline constexpr char kGraphicsDeviceLostMessage[] = "qgc-graphics-device-lost";
28
29// noexcept marks what GStreamer's C callbacks call straight into (a bus sync handler, qgcqvideosink's vfuncs): no
30// exception may unwind through those, so one thrown here, such as a failed allocation, ends the process on purpose.
31
34GstBusSyncReply onBusSyncMessage(GstMessage* msg) noexcept;
35
39
43
47
50bool graphicsDeviceLost() noexcept;
51
57void configureQtGraphics(bool softwareRendering);
58
60bool softwareRenderingRequested() noexcept;
61
64void connectMainWindow(QQuickWindow* window);
65
69HwVideoBufferContext makeAdapterContext(bool gpuEnabled) noexcept;
70
75void* dmaBufImportDisplay() noexcept;
76
79qint64 graphicsAdapterLuid() noexcept;
80
83void setGraphicsDevicePublishedHandler(void (*handler)()) noexcept;
84
88bool d3d11OpensD3D12() noexcept;
89
92bool answerSinkBinContextQuery(GstQuery* query, GstElement* sink = nullptr) noexcept;
93
97bool proposeDeviceBoundPool(GstQuery* query, GstCaps* caps, const GstVideoInfo* vinfo, gsize size,
98 guint minBuffers) noexcept;
99
103QString extraPathStatsSince(const GstHwPathTelemetry::Snapshot& baseline);
104
105} // namespace HwBuffers
struct _GstElement GstElement
qint64 graphicsAdapterLuid() noexcept
Definition HwBuffers.cc:231
bool d3d11OpensD3D12() noexcept
Definition HwBuffers.cc:247
bool proposeDeviceBoundPool(GstQuery *query, GstCaps *caps, const GstVideoInfo *vinfo, gsize size, guint minBuffers) noexcept
Definition HwBuffers.cc:275
constexpr char kGraphicsDeviceLostMessage[]
Definition HwBuffers.h:27
GstBusSyncReply onBusSyncMessage(GstMessage *msg) noexcept
Definition HwBuffers.cc:59
void onGraphicsDeviceRemoved()
Definition HwBuffers.cc:102
void setGraphicsDevicePublishedHandler(void(*handler)()) noexcept
Definition HwBuffers.cc:240
void * dmaBufImportDisplay() noexcept
Definition HwBuffers.cc:206
void resetCachedGpuResources()
Definition HwBuffers.cc:85
void connectMainWindow(QQuickWindow *window)
Definition HwBuffers.cc:173
void configureQtGraphics(bool softwareRendering)
Definition HwBuffers.cc:141
constexpr char kGraphicsDeviceServedMessage[]
Definition HwBuffers.h:22
QString extraPathStatsSince(const GstHwPathTelemetry::Snapshot &baseline)
Definition HwBuffers.cc:294
bool graphicsDeviceLost() noexcept
Definition HwBuffers.cc:129
void onPipelineRestart()
Definition HwBuffers.cc:74
bool answerSinkBinContextQuery(GstQuery *query, GstElement *sink) noexcept
Definition HwBuffers.cc:261
bool softwareRenderingRequested() noexcept
What configureQtGraphics() was told: the user asked for software rendering (–swrast)....
Definition HwBuffers.cc:168
HwVideoBufferContext makeAdapterContext(bool gpuEnabled) noexcept
Definition HwBuffers.cc:182