Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QVideoFrameTexturePool Class Reference

The class QVideoFrameTexturePool stores textures in slots to ensure they are alive during rhi's rendering rounds. Depending on the rhi backend, 1, 2, or 3 rounds are needed to complete the texture presentaton. The strategy of slots filling is based on QRhi::currentFrameSlot results. More...

#include <qvideoframetexturepool_p.h>

Collaboration diagram for QVideoFrameTexturePool:

Public Member Functions

bool texturesDirty () const
 The flag indicates whether the textures need update. Whenever a new current frame is set, the flag is turning into true.
const QVideoFramecurrentFrame () const
void setCurrentFrame (QVideoFrame frame)
 The method sets the current frame to be converted into textures. The flag texturesDirty becomes true after setting a new frame.
QVideoFrameTexturesupdateTextures (QRhi &rhi, QRhiResourceUpdateBatch &rub)
 The method updates textures basing on the current frame. It's recommended to invoke it during rhi's rendering, in other words, between QRhi::beginFrame and QRhi::endFrame. The method resets texturesDirty to false.
void onFrameEndInvoked ()
 The method should be invoked after finishing QRhi::endFrame. It propagates the call to the current texture in order to free resources that are not needed anymore.
void clearTextures ()
 The method clears all texture slots and sets the dirty flag if the current frame is valid.

Detailed Description

The class QVideoFrameTexturePool stores textures in slots to ensure they are alive during rhi's rendering rounds. Depending on the rhi backend, 1, 2, or 3 rounds are needed to complete the texture presentaton. The strategy of slots filling is based on QRhi::currentFrameSlot results.

Definition at line 36 of file qvideoframetexturepool_p.h.

Member Function Documentation

◆ clearTextures()

void QVideoFrameTexturePool::clearTextures ( )

The method clears all texture slots and sets the dirty flag if the current frame is valid.

Definition at line 38 of file qvideoframetexturepool.cpp.

◆ currentFrame()

const QVideoFrame & QVideoFrameTexturePool::currentFrame ( ) const
inline

Definition at line 45 of file qvideoframetexturepool_p.h.

◆ onFrameEndInvoked()

void QVideoFrameTexturePool::onFrameEndInvoked ( )

The method should be invoked after finishing QRhi::endFrame. It propagates the call to the current texture in order to free resources that are not needed anymore.

Definition at line 31 of file qvideoframetexturepool.cpp.

◆ setCurrentFrame()

QT_BEGIN_NAMESPACE void QVideoFrameTexturePool::setCurrentFrame ( QVideoFrame frame)

The method sets the current frame to be converted into textures. The flag texturesDirty becomes true after setting a new frame.

Definition at line 11 of file qvideoframetexturepool.cpp.

◆ texturesDirty()

bool QVideoFrameTexturePool::texturesDirty ( ) const
inline

The flag indicates whether the textures need update. Whenever a new current frame is set, the flag is turning into true.

Definition at line 43 of file qvideoframetexturepool_p.h.

◆ updateTextures()

QVideoFrameTextures * QVideoFrameTexturePool::updateTextures ( QRhi & rhi,
QRhiResourceUpdateBatch & rub )

The method updates textures basing on the current frame. It's recommended to invoke it during rhi's rendering, in other words, between QRhi::beginFrame and QRhi::endFrame. The method resets texturesDirty to false.

Returns
the pointer to the updated texture or null if failed

Definition at line 16 of file qvideoframetexturepool.cpp.


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