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

Classes

class  ScopedMapTimer
 RAII timer: records mapTextures() wall time into the path's EWMA on scope exit. More...
struct  Snapshot
 Every counter and fallback reason at one instant; a reader's baseline for counts since then. More...

Enumerations

enum class  HwFallbackReason {
  NoExt , EglBadMatch , ValidateFailed , UnknownMemType ,
  MapFailed , VulkanNoSync , ImportUnsupported , Count
}
 Specific cause a GPU path was rejected for a sample; surfaced as a per-(path,reason) breakdown. More...
enum class  Counter {
  MapFailures , TextureReuse , GpuWaits , CpuWaits ,
  ImageCacheHits , ImageCacheMisses , ProducerFenceTimeouts , Count
}
 Per-path event counts. More...

Functions

void record (HwVideoBufferPath path, Counter counter) noexcept
void recordMapDuration (HwVideoBufferPath path, qint64 nsecs) noexcept
 Per-path mapTextures() wall-time, fed into an EWMA; peek returns the smoothed value in microseconds.
quint64 peekMapDurationUsEwma (HwVideoBufferPath path) noexcept
void recordFallbackReason (HwVideoBufferPath attemptedPath, HwFallbackReason reason) noexcept
 Per-(path,reason) fallback accounting; lets a bug report show why a path demoted to CPU.
Snapshot snapshot () noexcept
QVideoFrameTexturesUPtr fail (HwVideoBufferPath path) noexcept
 Records a map failure for path and returns the empty bundle mapTextures() reports it with.

Detailed Description

Per-path telemetry counters (map failures, reuse hits, sync waits) keyed by HwVideoBufferPath; atomics, thread-safe. Counters only grow: readers diff against their own Snapshot, so several receivers never consume each other's counts.

Enumeration Type Documentation

◆ Counter

enum class GstHwPathTelemetry::Counter
strong

Per-path event counts.

Enumerator
MapFailures 

mapTextures() returned an invalid bundle (GPU import failed).

TextureReuse 

Prior frame's QRhiTexture wrappers reused (decoder pool returned same native handle).

GpuWaits 

GPU-side waits on the producer's writes before sampling a frame.

CpuWaits 

CPU-blocking waits on the producer's writes before sampling a frame.

ImageCacheHits 
ImageCacheMisses 
ProducerFenceTimeouts 

DMABuf wait on the producer's write fences (poll() on the dma-buf fds) timed out or failed; the frame was imported without a producer barrier.

Count 

Definition at line 29 of file GstHwPathTelemetry.h.

◆ HwFallbackReason

Specific cause a GPU path was rejected for a sample; surfaced as a per-(path,reason) breakdown.

Enumerator
NoExt 
EglBadMatch 
ValidateFailed 
UnknownMemType 
MapFailed 
VulkanNoSync 
ImportUnsupported 
Count 

Definition at line 16 of file GstHwPathTelemetry.h.

Function Documentation

◆ fail()

QVideoFrameTexturesUPtr GstHwPathTelemetry::fail ( HwVideoBufferPath path)
noexcept

Records a map failure for path and returns the empty bundle mapTextures() reports it with.

Definition at line 7 of file GstHwVideoBuffer.cc.

References MapFailures, and record().

Referenced by GstHwFrameTexturesBase::finishMap().

◆ peekMapDurationUsEwma()

quint64 GstHwPathTelemetry::peekMapDurationUsEwma ( HwVideoBufferPath path)
noexcept

Definition at line 40 of file GstHwPathTelemetry.cc.

Referenced by HwBuffers::extraPathStatsSince().

◆ record()

void GstHwPathTelemetry::record ( HwVideoBufferPath path,
Counter counter )
noexcept

Definition at line 20 of file GstHwPathTelemetry.cc.

Referenced by fail(), and GstHwFrameTexturesBase::finishMap().

◆ recordFallbackReason()

void GstHwPathTelemetry::recordFallbackReason ( HwVideoBufferPath attemptedPath,
HwFallbackReason reason )
noexcept

Per-(path,reason) fallback accounting; lets a bug report show why a path demoted to CPU.

Definition at line 45 of file GstHwPathTelemetry.cc.

Referenced by GstHwFrameTexturesBase::finishMap(), makeHwVideoBuffer(), and GstHwImportPreflight::preflightOrRecord().

◆ recordMapDuration()

void GstHwPathTelemetry::recordMapDuration ( HwVideoBufferPath path,
qint64 nsecs )
noexcept

Per-path mapTextures() wall-time, fed into an EWMA; peek returns the smoothed value in microseconds.

Definition at line 25 of file GstHwPathTelemetry.cc.

Referenced by GstHwPathTelemetry::ScopedMapTimer::~ScopedMapTimer().

◆ snapshot()