QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GstHwFrameTexturesBase Class Reference

Common base for per-platform FrameTextures : QVideoFrameTextures from *VideoBuffer::mapTextures(). More...

#include <GstHwFrameTexturesBase.h>

+ Inheritance diagram for GstHwFrameTexturesBase:
+ Collaboration diagram for GstHwFrameTexturesBase:

Public Member Functions

 ~GstHwFrameTexturesBase () override
 
void onFrameEndInvoked () override
 
QRhiTexture * texture (uint plane) const override
 
virtual HwVideoBufferPath sourcePath () const
 GPU path that produced this bundle; used after a type-safe downcast to decide path-local reuse.
 
void setSourceSample (GstSample *s) noexcept
 Transfers a ref into the bundle. Caller must have a fresh ref.
 

Static Public Member Functions

template<class FT >
static FT * reusableBundle (QVideoFrameTexturesUPtr &old, HwVideoBufferPath p)
 

Protected Attributes

int _count = 0
 
std::unique_ptr< QRhiTexture > _textures [GstHw::kMaxPlanes]
 
GstSample * _srcSample = nullptr
 

Detailed Description

Common base for per-platform FrameTextures : QVideoFrameTextures from *VideoBuffer::mapTextures().

Definition at line 14 of file GstHwFrameTexturesBase.h.

Constructor & Destructor Documentation

◆ ~GstHwFrameTexturesBase()

GstHwFrameTexturesBase::~GstHwFrameTexturesBase ( )
inlineoverride

Definition at line 17 of file GstHwFrameTexturesBase.h.

References _srcSample.

Member Function Documentation

◆ onFrameEndInvoked()

void GstHwFrameTexturesBase::onFrameEndInvoked ( )
inlineoverride

Definition at line 19 of file GstHwFrameTexturesBase.h.

References _srcSample.

◆ reusableBundle()

template<class FT >
static FT * GstHwFrameTexturesBase::reusableBundle ( QVideoFrameTexturesUPtr &  old,
HwVideoBufferPath  p 
)
inlinestatic

Reuse probe: old downcasts to FT iff it is one of our bundles and came from path p. Qt 6.10's texture pool can pass CPU-fallback or Qt-owned texture bundles here, so the base cast must be checked before consulting sourcePath(). Caller still runs FT::matches() — the equality predicate differs per path.

Definition at line 38 of file GstHwFrameTexturesBase.h.

◆ setSourceSample()

void GstHwFrameTexturesBase::setSourceSample ( GstSample *  s)
inlinenoexcept

Transfers a ref into the bundle. Caller must have a fresh ref.

Definition at line 27 of file GstHwFrameTexturesBase.h.

References _srcSample.

◆ sourcePath()

virtual HwVideoBufferPath GstHwFrameTexturesBase::sourcePath ( ) const
inlinevirtual

GPU path that produced this bundle; used after a type-safe downcast to decide path-local reuse.

Definition at line 24 of file GstHwFrameTexturesBase.h.

References None.

◆ texture()

QRhiTexture * GstHwFrameTexturesBase::texture ( uint  plane) const
inlineoverride

Definition at line 21 of file GstHwFrameTexturesBase.h.

References _count, and _textures.

Member Data Documentation

◆ _count

int GstHwFrameTexturesBase::_count = 0
protected

Definition at line 45 of file GstHwFrameTexturesBase.h.

Referenced by GstGlFrameTextures::GstGlFrameTextures(), and texture().

◆ _srcSample

GstSample* GstHwFrameTexturesBase::_srcSample = nullptr
protected

◆ _textures

std::unique_ptr<QRhiTexture> GstHwFrameTexturesBase::_textures[GstHw::kMaxPlanes]
protected

Definition at line 46 of file GstHwFrameTexturesBase.h.

Referenced by GstGlFrameTextures::GstGlFrameTextures(), and texture().


The documentation for this class was generated from the following file: