|
QGroundControl
Ground Control Station for MAVLink Drones
|
Common base for GStreamer-backed QHwVideoBuffer subclasses. More...
#include <GstHwVideoBuffer.h>
Inheritance diagram for GstHwVideoBuffer:
Collaboration diagram for GstHwVideoBuffer:Public Member Functions | |
| GstHwVideoBuffer (QVideoFrame::HandleType handleType, GstSample *sample, const GstVideoInfo &videoInfo, QVideoFrameFormat format) | |
| ~GstHwVideoBuffer () override | |
| QVideoFrameFormat | format () const override |
| MapData | map (QVideoFrame::MapMode) override |
| virtual bool | validatePlaneHandles () const |
| Streaming-thread sanity check on per-plane handles; failure routes to CPU memcpy. | |
| virtual const char * | storageTag () const |
| Human-readable GPU path identifier (e.g. "DMABuf"); string literal, safe from any thread. | |
| GstSample * | takeSample () noexcept |
| Transfers GstSample ownership out for early pool-slot release in mapTextures. | |
Static Public Member Functions | |
| static void | logFirstSuccess (std::atomic< bool > &flag, const QLoggingCategory &cat, const char *tag, QSize frameSize, QVideoFrameFormat::PixelFormat pixelFormat, int planes) |
One-shot "first zero-copy success" info line; silent after flag first flips. | |
Protected Member Functions | |
| template<class PlanePred > | |
| bool | validatePlanes (PlanePred &&planePred) const |
Validate each plane satisfies planePred; predicate runs once per plane on the streaming thread. | |
| bool | checkMapPreconditions (const QRhi &rhi, int expectedBackend, const QLoggingCategory &cat, GstHw::MapDiagnostics &diag, GstBuffer *&outBuffer) const |
Shared mapTextures preamble; warns once per cause via diag flags, returns false on first failure. | |
Protected Attributes | |
| GstSample * | _sample = nullptr |
| GstVideoInfo | _videoInfo = {} |
| QVideoFrameFormat | _format |
Common base for GStreamer-backed QHwVideoBuffer subclasses.
Definition at line 40 of file GstHwVideoBuffer.h.
| GstHwVideoBuffer::GstHwVideoBuffer | ( | QVideoFrame::HandleType | handleType, |
| GstSample * | sample, | ||
| const GstVideoInfo & | videoInfo, | ||
| QVideoFrameFormat | format | ||
| ) |
Definition at line 5 of file GstHwVideoBuffer.cc.
|
override |
Definition at line 15 of file GstHwVideoBuffer.cc.
References _sample.
|
protected |
Shared mapTextures preamble; warns once per cause via diag flags, returns false on first failure.
Definition at line 22 of file GstHwVideoBuffer.cc.
References _sample, GstHw::MapDiagnostics::loggedBadBackend, GstHw::MapDiagnostics::loggedNullBuffer, GstHw::MapDiagnostics::loggedNullSample, and GstHw::MapDiagnostics::loggedWrongThread.
|
inlineoverride |
Definition at line 47 of file GstHwVideoBuffer.h.
References _format.
|
static |
One-shot "first zero-copy success" info line; silent after flag first flips.
Definition at line 50 of file GstHwVideoBuffer.cc.
|
inlineoverride |
Definition at line 49 of file GstHwVideoBuffer.h.
|
inlinevirtual |
Human-readable GPU path identifier (e.g. "DMABuf"); string literal, safe from any thread.
Definition at line 55 of file GstHwVideoBuffer.h.
|
inlinenoexcept |
Transfers GstSample ownership out for early pool-slot release in mapTextures.
Definition at line 58 of file GstHwVideoBuffer.h.
References _sample.
|
inlinevirtual |
Streaming-thread sanity check on per-plane handles; failure routes to CPU memcpy.
Definition at line 52 of file GstHwVideoBuffer.h.
|
inlineprotected |
Validate each plane satisfies planePred; predicate runs once per plane on the streaming thread.
Definition at line 72 of file GstHwVideoBuffer.h.
References _sample, and GstHw::kMaxPlanes.
|
protected |
Definition at line 96 of file GstHwVideoBuffer.h.
Referenced by format().
|
protected |
Definition at line 94 of file GstHwVideoBuffer.h.
Referenced by checkMapPreconditions(), takeSample(), validatePlanes(), and ~GstHwVideoBuffer().
|
protected |
Definition at line 95 of file GstHwVideoBuffer.h.