The OpenGLVideo class high level api for renderering a video frame.
More...
#include <OpenGLVideo.h>
The OpenGLVideo class high level api for renderering a video frame.
use VideoShader, VideoMaterial and ShaderManager internally. By default, VBO is used. Set environment var QTAV_NO_VBO=1 or 0 to disable/enable VBO. VAO will be enabled if supported. Disabling VAO is the same as VBO.
◆ OpenGLVideo()
QtAV::OpenGLVideo::OpenGLVideo |
( |
| ) |
|
◆ afterRendering
void QtAV::OpenGLVideo::afterRendering |
( |
| ) |
|
|
signal |
afterRendering Emitted when video frame is rendered.
With DirectConnection, it can be used to draw GL on top of video, or to do screen scraping of the current frame buffer.
◆ beforeRendering
void QtAV::OpenGLVideo::beforeRendering |
( |
| ) |
|
|
signal |
◆ fill()
void QtAV::OpenGLVideo::fill |
( |
const QColor & |
color | ) |
|
◆ isSupported()
◆ openGLContext()
QOpenGLContext* QtAV::OpenGLVideo::openGLContext |
( |
| ) |
|
◆ render()
void QtAV::OpenGLVideo::render |
( |
const QRectF & |
target = QRectF() , |
|
|
const QRectF & |
roi = QRectF() , |
|
|
const QMatrix4x4 & |
transform = QMatrix4x4() |
|
) |
| |
render all are in Qt's coordinate
- Parameters
-
target | the rect renderering to. in Qt's coordinate. not normalized here but in shader. // TODO: normalized check? invalid value (default) means renderering to the whole viewport |
roi | normalized rect of texture to renderer. |
transform | additinal transformation. |
◆ setBrightness()
void QtAV::OpenGLVideo::setBrightness |
( |
qreal |
value | ) |
|
◆ setContrast()
void QtAV::OpenGLVideo::setContrast |
( |
qreal |
value | ) |
|
◆ setCurrentFrame()
void QtAV::OpenGLVideo::setCurrentFrame |
( |
const VideoFrame & |
frame | ) |
|
◆ setHue()
void QtAV::OpenGLVideo::setHue |
( |
qreal |
value | ) |
|
◆ setOpenGLContext()
void QtAV::OpenGLVideo::setOpenGLContext |
( |
QOpenGLContext * |
ctx | ) |
|
setOpenGLContext a context must be set before renderering.
- Parameters
-
ctx | 0: current context in OpenGL is done. shaders will be released. QOpenGLContext is QObject in Qt5, and gl resources here will be released automatically if context is destroyed. But you have to call setOpenGLContext(0) for Qt4 explicitly in the old context. Viewport is also set here using context surface/paintDevice size and devicePixelRatio. devicePixelRatio may be wrong for multi-screen with 5.0<qt<5.5, so you should call setProjectionMatrixToRect later in this case |
◆ setProjectionMatrixToRect()
void QtAV::OpenGLVideo::setProjectionMatrixToRect |
( |
const QRectF & |
v | ) |
|
setProjectionMatrixToRect the rect will be viewport
◆ setSaturation()
void QtAV::OpenGLVideo::setSaturation |
( |
qreal |
value | ) |
|
◆ setUserShader()
void QtAV::OpenGLVideo::setUserShader |
( |
VideoShader * |
shader | ) |
|
◆ userShader()
The documentation for this class was generated from the following file: