The VideoMaterial class Encapsulates rendering state for a video shader program.
More...
#include <VideoShader.h>
The VideoMaterial class Encapsulates rendering state for a video shader program.
Low-level api. Used by OpenGLVideo and Scene Graph
◆ VideoMaterial() [1/2]
QtAV::VideoMaterial::VideoMaterial |
( |
| ) |
|
◆ ~VideoMaterial()
virtual QtAV::VideoMaterial::~VideoMaterial |
( |
| ) |
|
|
inlinevirtual |
◆ VideoMaterial() [2/2]
◆ bind()
bool QtAV::VideoMaterial::bind |
( |
| ) |
|
◆ bindPlane()
void QtAV::VideoMaterial::bindPlane |
( |
int |
p, |
|
|
bool |
updateTexture = true |
|
) |
| |
|
protected |
◆ bitsPerComponent()
int QtAV::VideoMaterial::bitsPerComponent |
( |
| ) |
const |
◆ brightness()
qreal QtAV::VideoMaterial::brightness |
( |
| ) |
const |
◆ channelMap()
const QMatrix4x4& QtAV::VideoMaterial::channelMap |
( |
| ) |
const |
◆ colorMatrix()
const QMatrix4x4& QtAV::VideoMaterial::colorMatrix |
( |
| ) |
const |
◆ compare()
int QtAV::VideoMaterial::compare |
( |
const VideoMaterial * |
other | ) |
const |
◆ contrast()
qreal QtAV::VideoMaterial::contrast |
( |
| ) |
const |
◆ createShader()
VideoShader* QtAV::VideoMaterial::createShader |
( |
| ) |
const |
◆ currentFormat()
VideoFormat QtAV::VideoMaterial::currentFormat |
( |
| ) |
const |
◆ frameSize()
QSize QtAV::VideoMaterial::frameSize |
( |
| ) |
const |
◆ hasAlpha()
bool QtAV::VideoMaterial::hasAlpha |
( |
| ) |
const |
◆ hue()
qreal QtAV::VideoMaterial::hue |
( |
| ) |
const |
◆ initializeShader()
void QtAV::VideoMaterial::initializeShader |
( |
VideoShader * |
shader | ) |
const |
◆ isDirty()
bool QtAV::VideoMaterial::isDirty |
( |
| ) |
const |
isDirty
- Returns
- true if material type changed, or other properties changed, e.g. 8bit=>10bit (the same material type) and eq
◆ mapToTexture() [1/2]
QPointF QtAV::VideoMaterial::mapToTexture |
( |
int |
plane, |
|
|
const QPointF & |
p, |
|
|
int |
normalize = -1 |
|
) |
| const |
mapToFrame map a point p or a rect r to video texture in a given plane and scaled to valid width.
p or r is in video frame's rect coordinates, no matter which plane is
- Parameters
-
normalize | -1: auto(do not normalize for rectangle texture). 0: no. 1: yes |
- Returns
- point or rect in current texture valid coordinates.
- See also
- validTextureWidth()
◆ mapToTexture() [2/2]
QRectF QtAV::VideoMaterial::mapToTexture |
( |
int |
plane, |
|
|
const QRectF & |
r, |
|
|
int |
normalize = -1 |
|
) |
| const |
◆ normalizedROI()
QRectF QtAV::VideoMaterial::normalizedROI |
( |
const QRectF & |
roi | ) |
const |
normalizedROI
- Parameters
-
roi | logical roi of a video frame. the same as mapToTexture(roi, 1) |
◆ planeCount()
int QtAV::VideoMaterial::planeCount |
( |
| ) |
const |
◆ saturation()
qreal QtAV::VideoMaterial::saturation |
( |
| ) |
const |
◆ setBrightness()
void QtAV::VideoMaterial::setBrightness |
( |
qreal |
value | ) |
|
◆ setContrast()
void QtAV::VideoMaterial::setContrast |
( |
qreal |
value | ) |
|
◆ setCurrentFrame()
void QtAV::VideoMaterial::setCurrentFrame |
( |
const VideoFrame & |
frame | ) |
|
◆ setDirty()
void QtAV::VideoMaterial::setDirty |
( |
bool |
value | ) |
|
◆ setHue()
void QtAV::VideoMaterial::setHue |
( |
qreal |
value | ) |
|
◆ setSaturation()
void QtAV::VideoMaterial::setSaturation |
( |
qreal |
value | ) |
|
◆ texelSize() [1/2]
QSizeF QtAV::VideoMaterial::texelSize |
( |
int |
plane | ) |
const |
texelSize The size of texture unit
- Returns
- (1.0/textureWidth, 1.0/textureHeight)
◆ texelSize() [2/2]
QVector<QVector2D> QtAV::VideoMaterial::texelSize |
( |
| ) |
const |
texelSize For GLSL.
1 for rectangle texture, 1/(width, height) for 2d texture
◆ textureSize() [1/2]
QSize QtAV::VideoMaterial::textureSize |
( |
int |
plane | ) |
const |
textureSize It can be used with a uniform to emulate GLSL textureSize() which exists in new versions.
◆ textureSize() [2/2]
QVector<QVector2D> QtAV::VideoMaterial::textureSize |
( |
| ) |
const |
textureSize For GLSL.
Not normalized
◆ type()
virtual qint32 QtAV::VideoMaterial::type |
( |
| ) |
const |
|
virtual |
◆ typeName()
static QString QtAV::VideoMaterial::typeName |
( |
qint32 |
value | ) |
|
|
static |
◆ unbind()
void QtAV::VideoMaterial::unbind |
( |
| ) |
|
◆ validTextureWidth()
qreal QtAV::VideoMaterial::validTextureWidth |
( |
| ) |
const |
validTextureWidth Value is (0, 1].
Normalized valid width of a plane. A plane may has padding invalid data at the end for aligment.
Use this value to reduce texture coordinate computation.
| | | | valid width | |
| | |
| <- aligned width ->|
- Returns
- valid width ratio
◆ vectorTo8bit()
QVector2D QtAV::VideoMaterial::vectorTo8bit |
( |
| ) |
const |
The documentation for this class was generated from the following file: