QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GstAHardwareBufferVideoBuffer.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtCore/qglobal.h>
4
5#if defined(QGC_HAS_GST_AHARDWAREBUFFER_GPU_PATH)
6
7#include <EGL/egl.h>
8#include <QtGui/QMatrix4x4>
9
10#include "GstHwVideoBuffer.h"
11
12class QRhi;
13
16class GstAHardwareBufferVideoBuffer final : public GstHwVideoBuffer
17{
18public:
19 GstAHardwareBufferVideoBuffer(GstSample* sample, const GstVideoInfo& videoInfo, const QVideoFrameFormat& format,
20 EGLDisplay eglDisplay);
21
22 QVideoFrameTexturesUPtr mapTextures(QRhi& rhi, QVideoFrameTexturesUPtr& oldTextures) override;
23 bool validatePlaneHandles() const override;
24
26 QMatrix4x4 externalTextureMatrix() const override;
27
28 const char* storageTag() const override { return "AHardwareBuffer"; }
29
30 static void resetImageCache() noexcept;
31
32private:
33 EGLDisplay _eglDisplay = EGL_NO_DISPLAY;
34};
35
36#endif // QGC_HAS_GST_AHARDWAREBUFFER_GPU_PATH
Common base for GStreamer-backed QHwVideoBuffer subclasses.
virtual const char * storageTag() const
Human-readable GPU path identifier (e.g. "DMABuf"); string literal, safe from any thread.
virtual bool validatePlaneHandles() const
Streaming-thread sanity check on per-plane handles; failure routes to CPU memcpy.