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
QVideoTextureHelper::TextureDescription Struct Reference

#include <qvideotexturehelper_p.h>

Collaboration diagram for QVideoTextureHelper::TextureDescription:

Classes

struct  SizeScale

Public Types

enum  TextureFormat {
  UnknownFormat , Red_8 , RG_8 , RGBA_8 ,
  BGRA_8 , Red_16 , RG_16
}
enum class  FallbackPolicy { Disable , Enable }
using BytesRequired = int(*)(int stride, int height)

Public Member Functions

QRhiTexture::Format rhiTextureFormat (int plane, QRhi *rhi, FallbackPolicy policy=FallbackPolicy::Enable) const
int strideForWidth (int width) const
int bytesForSize (QSize s) const
int widthForPlane (int width, int plane) const
int heightForPlane (int height, int plane) const
SizeScale rhiSizeScale (int plane, QRhi *rhi) const
QSize rhiPlaneSize (QSize frameSize, int plane, QRhi *rhi) const
bool hasTextureFormat (TextureFormat format) const

Public Attributes

int nplanes
int strideFactor
BytesRequired bytesRequired
TextureFormat textureFormat [maxPlanes]
SizeScale sizeScale [maxPlanes]

Static Public Attributes

static constexpr int maxPlanes = 3

Detailed Description

Definition at line 35 of file qvideotexturehelper_p.h.

Member Typedef Documentation

◆ BytesRequired

Member Enumeration Documentation

◆ FallbackPolicy

Enumerator
Disable 
Enable 

Definition at line 54 of file qvideotexturehelper_p.h.

◆ TextureFormat

Enumerator
UnknownFormat 
Red_8 
RG_8 
RGBA_8 
BGRA_8 
Red_16 
RG_16 

Definition at line 44 of file qvideotexturehelper_p.h.

Member Function Documentation

◆ bytesForSize()

int QVideoTextureHelper::TextureDescription::bytesForSize ( QSize s) const
inline

Definition at line 64 of file qvideotexturehelper_p.h.

◆ hasTextureFormat()

bool QVideoTextureHelper::TextureDescription::hasTextureFormat ( TextureFormat format) const
inline

Definition at line 103 of file qvideotexturehelper_p.h.

◆ heightForPlane()

int QVideoTextureHelper::TextureDescription::heightForPlane ( int height,
int plane ) const
inline

Definition at line 70 of file qvideotexturehelper_p.h.

◆ rhiPlaneSize()

QSize QVideoTextureHelper::TextureDescription::rhiPlaneSize ( QSize frameSize,
int plane,
QRhi * rhi ) const
inline

Definition at line 97 of file qvideotexturehelper_p.h.

◆ rhiSizeScale()

SizeScale QVideoTextureHelper::TextureDescription::rhiSizeScale ( int plane,
QRhi * rhi ) const
inline
Returns
Plane scaling factors taking into account possible workarounds due to QRhi backend capabilities.

Definition at line 80 of file qvideotexturehelper_p.h.

◆ rhiTextureFormat()

QRhiTexture::Format QVideoTextureHelper::TextureDescription::rhiTextureFormat ( int plane,
QRhi * rhi,
FallbackPolicy policy = FallbackPolicy::Enable ) const

Definition at line 247 of file qvideotexturehelper.cpp.

◆ strideForWidth()

int QVideoTextureHelper::TextureDescription::strideForWidth ( int width) const
inline

Definition at line 63 of file qvideotexturehelper_p.h.

◆ widthForPlane()

int QVideoTextureHelper::TextureDescription::widthForPlane ( int width,
int plane ) const
inline

Definition at line 65 of file qvideotexturehelper_p.h.

Member Data Documentation

◆ bytesRequired

BytesRequired QVideoTextureHelper::TextureDescription::bytesRequired

Definition at line 112 of file qvideotexturehelper_p.h.

◆ maxPlanes

int QVideoTextureHelper::TextureDescription::maxPlanes = 3
staticconstexpr

Definition at line 37 of file qvideotexturehelper_p.h.

◆ nplanes

int QVideoTextureHelper::TextureDescription::nplanes

Definition at line 110 of file qvideotexturehelper_p.h.

◆ sizeScale

SizeScale QVideoTextureHelper::TextureDescription::sizeScale[maxPlanes]

Definition at line 114 of file qvideotexturehelper_p.h.

◆ strideFactor

int QVideoTextureHelper::TextureDescription::strideFactor

Definition at line 111 of file qvideotexturehelper_p.h.

◆ textureFormat

TextureFormat QVideoTextureHelper::TextureDescription::textureFormat[maxPlanes]

Definition at line 113 of file qvideotexturehelper_p.h.


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