QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GstHwVideoBufferFactory.cc File Reference
#include "GstHwVideoBufferFactory.h"
#include "QGCLoggingCategory.h"
#include <QtCore/QMutex>
#include <QtCore/QMutexLocker>
#include <QtCore/QSet>
#include <QtCore/QString>
#include <private/qhwvideobuffer_p.h>
+ Include dependency graph for GstHwVideoBufferFactory.cc:

Go to the source code of this file.

Functions

std::unique_ptr< QHwVideoBuffer > makeHwVideoBuffer (GstSample *sample, const GstVideoInfo &info, QVideoFrameFormat format, bool gpuEnabled, void *, void *, HwVideoBufferPath &matchedPath)
 

Function Documentation

◆ makeHwVideoBuffer()

std::unique_ptr< QHwVideoBuffer > makeHwVideoBuffer ( GstSample *  sample,
const GstVideoInfo &  info,
QVideoFrameFormat  format,
bool  gpuEnabled,
void *  eglDisplay,
void *  ahbEglDisplay,
HwVideoBufferPath matchedPath 
)

Factory that selects the appropriate zero-copy QHwVideoBuffer for a GstSample.

Returns nullptr if no compiled GPU path matches the buffer's memory type, in which case the caller should fall back to the CPU memcpy path. gpuEnabled must be true for any GPU path to be attempted.

Definition at line 40 of file GstHwVideoBufferFactory.cc.

References AHardwareBuffer, D3D11, D3D12, DmaBuf, GlMemory, IOSurface, and None.