Miam-Player  0.8.0
A nice music player
QtAV::GLSLFilter Class Reference

#include <GLSLFilter.h>

Inheritance diagram for QtAV::GLSLFilter:
QtAV::VideoFilter QtAV::Filter

Signals

void outputSizeChanged (const QSize &size)
 
- Signals inherited from QtAV::Filter
void enabledChanged (bool)
 

Public Member Functions

 GLSLFilter (QObject *parent=0)
 
bool isSupported (VideoFilterContext::Type ct) const Q_DECL_OVERRIDE
 
OpenGLVideoopengl () const
 opengl Currently you can only use it to set custom shader OpenGLVideo.setUserShader() More...
 
QOpenGLFramebufferObject * fbo () const
 
QSize outputSize () const
 outputSize Output frame size. More...
 
void setOutputSize (const QSize &value)
 
void setOutputSize (int width, int height)
 
- Public Member Functions inherited from QtAV::VideoFilter
 VideoFilter (QObject *parent=0)
 
VideoFilterContextcontext ()
 
bool installTo (AVPlayer *player)
 installTo Install filter to player can process every frame before rendering. More...
 
bool installTo (AVOutput *output)
 installTo The process() function is in rendering thread. More...
 
void apply (Statistics *statistics, VideoFrame *frame=0)
 
bool prepareContext (VideoFilterContext *&ctx, Statistics *statistics=0, VideoFrame *frame=0)
 
- Public Member Functions inherited from QtAV::Filter
virtual ~Filter ()
 
bool isEnabled () const
 
void setOwnedByTarget (bool value=true)
 setOwnedByTarget If a filter is owned by target, it's not safe to access the filter after it's installed to a target. More...
 
bool isOwnedByTarget () const
 
bool uninstall ()
 

Protected Member Functions

 GLSLFilter (GLSLFilterPrivate &d, QObject *parent=0)
 
void process (Statistics *statistics, VideoFrame *frame=0) Q_DECL_OVERRIDE
 process Draw video frame into fbo and apply the user shader from opengl()->userShader(); More...
 
- Protected Member Functions inherited from QtAV::VideoFilter
 VideoFilter (VideoFilterPrivate &d, QObject *parent=0)
 
- Protected Member Functions inherited from QtAV::Filter
 Filter (FilterPrivate &d, QObject *parent=0)
 

Properties

QSize outputSize
 
- Properties inherited from QtAV::Filter
bool enabled
 

Additional Inherited Members

- Public Slots inherited from QtAV::Filter
void setEnabled (bool enabled=true)
 

Constructor & Destructor Documentation

◆ GLSLFilter() [1/2]

QtAV::GLSLFilter::GLSLFilter ( QObject *  parent = 0)

◆ GLSLFilter() [2/2]

QtAV::GLSLFilter::GLSLFilter ( GLSLFilterPrivate &  d,
QObject *  parent = 0 
)
protected

Member Function Documentation

◆ fbo()

QOpenGLFramebufferObject* QtAV::GLSLFilter::fbo ( ) const

◆ isSupported()

bool QtAV::GLSLFilter::isSupported ( VideoFilterContext::Type  ct) const
inlinevirtual

Reimplemented from QtAV::VideoFilter.

◆ opengl()

OpenGLVideo* QtAV::GLSLFilter::opengl ( ) const

opengl Currently you can only use it to set custom shader OpenGLVideo.setUserShader()

◆ outputSize()

QSize QtAV::GLSLFilter::outputSize ( ) const

outputSize Output frame size.

FBO uses the same size to render. An empty size means using the input frame size

Returns

◆ outputSizeChanged

void QtAV::GLSLFilter::outputSizeChanged ( const QSize &  size)
signal

◆ process()

void QtAV::GLSLFilter::process ( Statistics statistics,
VideoFrame frame = 0 
)
protectedvirtual

process Draw video frame into fbo and apply the user shader from opengl()->userShader();

Parameters
frameinput frame can be a frame holding host memory data, or any other GPU frame can interop with OpenGL texture (including frames from HW decoders in QtAV). Output frame holds an RGB texture, which can be processed in the next GPU filter, or rendered by OpenGL renderers. When process() is done, FBO before before process() is bounded.

Implements QtAV::VideoFilter.

◆ setOutputSize() [1/2]

void QtAV::GLSLFilter::setOutputSize ( const QSize &  value)

◆ setOutputSize() [2/2]

void QtAV::GLSLFilter::setOutputSize ( int  width,
int  height 
)

Property Documentation

◆ outputSize

QSize QtAV::GLSLFilter::outputSize
readwrite

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