QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
HwBuffers Namespace Reference

Classes

struct  HwBufferEnvConfig
 
struct  PathStats
 Formatted per-path counters + delivered total; reset=true reads-and-clears (teardown), false peeks. More...
 

Functions

void dispatchBusMessage (GstMessage *msg) noexcept
 Receiver-side bus hook; drops cached GPU devices on GST_MESSAGE_ERROR. No-op when no GPU paths compiled.
 
void initializeOnce () noexcept
 One-time process init; single call site for future lazy bridge registration.
 
const HwBufferEnvConfighwBufferEnvConfig () noexcept
 Lazily parses + logs the toggle config on first call; thread-safe via static-init guarantees.
 
GstBusSyncReply onBusSyncMessage (GstBus *bus, GstMessage *msg, gpointer userData) noexcept
 Bus sync handler (GstBusSyncHandler) installed on every pipeline; no-op when no GPU path compiled.
 
void onPipelineRestart () noexcept
 Pipeline-restart hook; re-arms one-shot priming latches so a restart can prime on the next NEED_CONTEXT.
 
void resetCachedGpuResources () noexcept
 Drop process-wide native GPU handles tied to the current Qt scene-graph device/context.
 
void connectMainWindow (QQuickWindow *window) noexcept
 Wire the main QQuickWindow into the RHI-capture path so snapshots follow its QRhi; no-op without GPU.
 
bool answerSinkBinContextQuery (GstQuery *query) noexcept
 Synchronously answer GST_QUERY_CONTEXT (gst.gl.GLDisplay/app_context); false -> let bus NEED_CONTEXT run.
 
PathStats formatPathStats (bool reset) noexcept
 
QString takeExtraPathStats () noexcept
 Path-specific extras after formatPathStats (GL reuse/sync waits); reads-and-clears, teardown only.
 

Function Documentation

◆ answerSinkBinContextQuery()

bool HwBuffers::answerSinkBinContextQuery ( GstQuery *  query)
noexcept

Synchronously answer GST_QUERY_CONTEXT (gst.gl.GLDisplay/app_context); false -> let bus NEED_CONTEXT run.

Definition at line 271 of file HwBuffers.cc.

Referenced by GstQgc::videosinkQueryProbe().

◆ connectMainWindow()

void HwBuffers::connectMainWindow ( QQuickWindow *  window)
noexcept

Wire the main QQuickWindow into the RHI-capture path so snapshots follow its QRhi; no-op without GPU.

Definition at line 203 of file HwBuffers.cc.

References QGCRhiCapture::connectWindow().

Referenced by GStreamer::onMainWindowReady().

◆ dispatchBusMessage()

void HwBuffers::dispatchBusMessage ( GstMessage *  msg)
noexcept

Receiver-side bus hook; drops cached GPU devices on GST_MESSAGE_ERROR. No-op when no GPU paths compiled.

Definition at line 114 of file HwBuffers.cc.

References resetCachedGpuResources().

◆ formatPathStats()

◆ hwBufferEnvConfig()

const HwBufferEnvConfig & HwBuffers::hwBufferEnvConfig ( )
noexcept

Lazily parses + logs the toggle config on first call; thread-safe via static-init guarantees.

Definition at line 144 of file HwBuffers.cc.

References HwBuffers::HwBufferEnvConfig::dmaBufCache, HwBuffers::HwBufferEnvConfig::dmaBufNoMmapFence, HwBuffers::HwBufferEnvConfig::dmaBufSingleEglImage, and HwBuffers::HwBufferEnvConfig::offerDmaDrmLinear.

Referenced by GstQgc::buildGpuCapsString().

◆ initializeOnce()

void HwBuffers::initializeOnce ( )
noexcept

One-time process init; single call site for future lazy bridge registration.

Definition at line 139 of file HwBuffers.cc.

◆ onBusSyncMessage()

GstBusSyncReply HwBuffers::onBusSyncMessage ( GstBus *  ,
GstMessage *  msg,
gpointer   
)
noexcept

Bus sync handler (GstBusSyncHandler) installed on every pipeline; no-op when no GPU path compiled.

Definition at line 169 of file HwBuffers.cc.

Referenced by GstVideoReceiver::start().

◆ onPipelineRestart()

void HwBuffers::onPipelineRestart ( )
noexcept

Pipeline-restart hook; re-arms one-shot priming latches so a restart can prime on the next NEED_CONTEXT.

Definition at line 180 of file HwBuffers.cc.

References resetCachedGpuResources().

Referenced by GStreamer::setupQVideoSinkElement().

◆ resetCachedGpuResources()

void HwBuffers::resetCachedGpuResources ( )
noexcept

Drop process-wide native GPU handles tied to the current Qt scene-graph device/context.

Definition at line 192 of file HwBuffers.cc.

Referenced by QGCRhiCapture::connectWindow(), dispatchBusMessage(), and onPipelineRestart().

◆ takeExtraPathStats()