QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GstDmaBufVideoBuffer.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtCore/qglobal.h>
4
5#if defined(QGC_HAS_GST_DMABUF_GPU_PATH)
6
7#include "GstHwVideoBuffer.h"
8
9#include <EGL/egl.h>
10#include <EGL/eglext.h>
11
12class QRhi;
13
18class GstDmaBufVideoBuffer final : public GstHwVideoBuffer
19{
20public:
21 GstDmaBufVideoBuffer(GstSample *sample,
22 const GstVideoInfo &videoInfo,
23 const QVideoFrameFormat &format,
24 EGLDisplay eglDisplay);
25
26 MapData map(QVideoFrame::MapMode mode) override;
27 bool isDmaBuf() const override { return true; }
28
29 ~GstDmaBufVideoBuffer() override;
30
31 QVideoFrameTexturesUPtr mapTextures(QRhi &rhi, QVideoFrameTexturesUPtr &oldTextures) override;
32 bool validatePlaneHandles() const override;
33
34 static quint64 takeMapFailureCount();
35 static quint64 peekMapFailureCount();
36
37private:
38 EGLDisplay _eglDisplay = EGL_NO_DISPLAY;
39};
40
41#endif // QGC_HAS_GST_DMABUF_GPU_PATH
virtual bool validatePlaneHandles() const