3#include <QtCore/qglobal.h>
5#if defined(QGC_HAS_GST_DMABUF_GPU_PATH)
19 GstDmaBufVideoBuffer(GstSample* sample,
const GstVideoInfo& videoInfo,
const QVideoFrameFormat& format,
20 EGLDisplay eglDisplay);
22 bool isDmaBuf()
const override {
return true; }
24 QVideoFrameTexturesUPtr mapTextures(QRhi& rhi, QVideoFrameTexturesUPtr& oldTextures)
override;
27 const char*
storageTag()
const override {
return "DMABuf"; }
29 static void resetCachedState() noexcept;
31#ifdef QGC_GST_BUILD_TESTING
32 static bool singleFdImportEnabledForTest() noexcept;
33 static
bool directGlImportAllowedForTest(
bool hasModifiersExt, guint64 drmModifier) noexcept;
34 static
bool texStorageImportAllowedForTest(
bool contextIsOpenGles,
bool hasTexStorageExt,
35 guint64 drmModifier) noexcept;
39#if defined(QGC_HAS_GST_VULKAN_GPU_PATH)
40 QVideoFrameTexturesUPtr importVulkan(QRhi& rhi);
43 EGLDisplay _eglDisplay = EGL_NO_DISPLAY;
44 guint64 _drmModifier = 0;
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.