QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GstHwVideoBufferFactory.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtCore/qglobal.h>
4#include <QtMultimedia/QVideoFrameFormat>
5#include <gst/gst.h>
6#include <gst/video/video-info.h>
7#include <memory>
8
9class QHwVideoBuffer;
10
11#if defined(QGC_HAS_GST_DMABUF_GPU_PATH) || defined(QGC_HAS_GST_AHARDWAREBUFFER_GPU_PATH)
12#include <EGL/egl.h>
13#endif
14
17{
18 None,
19 DmaBuf,
21 D3D11,
22 D3D12,
25 Vulkan,
26};
27
31{
33 bool validated = false; // path resolved by a prior validated sample this epoch
34 bool demotionRecorded = false; // one-shot guard for recordStreamDemotion() per epoch
35};
36
39{
40 bool gpuEnabled = false;
41#if defined(QGC_HAS_GST_DMABUF_GPU_PATH)
42 EGLDisplay dmaBufEglDisplay = EGL_NO_DISPLAY;
43#endif
44#if defined(QGC_HAS_GST_AHARDWAREBUFFER_GPU_PATH)
45 EGLDisplay ahbEglDisplay = EGL_NO_DISPLAY;
46#endif
47};
48
51std::unique_ptr<QHwVideoBuffer> makeHwVideoBuffer(GstSample* sample, const GstVideoInfo& info, QVideoFrameFormat format,
52 const HwVideoBufferContext& context, HwVideoBufferPath& matchedPath,
53 HwResolvedPathCache* cache = nullptr);
std::unique_ptr< QHwVideoBuffer > makeHwVideoBuffer(GstSample *sample, const GstVideoInfo &info, QVideoFrameFormat format, const HwVideoBufferContext &context, HwVideoBufferPath &matchedPath, HwResolvedPathCache *cache=nullptr)
HwVideoBufferPath
Identifies which GPU path was chosen; used by the adapter to increment the right counter.
Platform context for the factory; encapsulates EGL handles so callers don't need path-specific ifdefs...