QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GstIOSurfaceVideoBuffer.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtCore/qglobal.h>
4
5#if (defined(Q_OS_MACOS) || defined(Q_OS_IOS)) && defined(QGC_HAS_GST_IOSURFACE_GPU_PATH)
6
7#include "GstHwVideoBuffer.h"
8
9class QRhi;
10
12class GstIOSurfaceVideoBuffer final : public GstHwVideoBuffer
13{
14public:
15 GstIOSurfaceVideoBuffer(GstSample* sample, const GstVideoInfo& videoInfo, const QVideoFrameFormat& format);
16
17 QVideoFrameTexturesUPtr mapTextures(QRhi& rhi, QVideoFrameTexturesUPtr& oldTextures) override;
18 bool validatePlaneHandles() const override;
19
20 const char* storageTag() const override { return "IOSurface"; }
21
22 static void resetTextureCache() noexcept;
23};
24
25#endif // (Q_OS_MACOS || Q_OS_IOS) && QGC_HAS_GST_IOSURFACE_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.