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
6#include <gst/gst.h>
7#include <gst/video/video-info.h>
8
9#include <memory>
10
11class QHwVideoBuffer;
12
13#if defined(QGC_HAS_GST_DMABUF_GPU_PATH) || defined(QGC_HAS_GST_AHARDWAREBUFFER_GPU_PATH)
14# include <EGL/egl.h>
15#endif
16
19 None,
20 DmaBuf,
22 D3D11,
23 D3D12,
26};
27
33std::unique_ptr<QHwVideoBuffer> makeHwVideoBuffer(
34 GstSample *sample,
35 const GstVideoInfo &info,
36 QVideoFrameFormat format,
37 bool gpuEnabled,
38#if defined(QGC_HAS_GST_DMABUF_GPU_PATH)
39 EGLDisplay eglDisplay,
40#else
41 void *eglDisplay,
42#endif
43#if defined(QGC_HAS_GST_AHARDWAREBUFFER_GPU_PATH)
44 EGLDisplay ahbEglDisplay,
45#else
46 void *ahbEglDisplay,
47#endif
48 HwVideoBufferPath &matchedPath
49);
HwVideoBufferPath
Identifies which GPU path was chosen; used by the adapter to increment the right counter.
std::unique_ptr< QHwVideoBuffer > makeHwVideoBuffer(GstSample *sample, const GstVideoInfo &info, QVideoFrameFormat format, bool gpuEnabled, void *eglDisplay, void *ahbEglDisplay, HwVideoBufferPath &matchedPath)