WebVfx  0.4.4-44-ga54b093
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
Public Types | Public Member Functions | List of all members
WebVfx::Effects Class Referenceabstract

An effects implementation that can consume video frame images and render output. More...

#include <effects.h>

Inherited by WebVfx::EffectsImpl.

Public Types

enum  ImageType { SourceImageType =1, TargetImageType, ExtraImageType }
 Describes the type of an image. More...
 

Public Member Functions

virtual const ImageTypeMap & getImageTypeMap ()=0
 Describes the image names this effect will request. More...
 
virtual void setImage (const QString &name, Image *image)=0
 Set an Image for the given name. More...
 
virtual bool render (double time, Image *renderImage)=0
 Renders the effect for the given time. More...
 
virtual void destroy ()=0
 Destroy the effect.
 
virtual void renderComplete (bool result)=0
 Indicate that rendering is done. More...
 
virtual void reload ()=0
 Reload the content.
 

Detailed Description

An effects implementation that can consume video frame images and render output.

Instances of this class are created with WebVfx::createEffects() and can be accessed from any thread, but the class is not threadsafe so access should be synchronized.

Member Enumeration Documentation

Describes the type of an image.

Enumerator
SourceImageType 

The source (origin/from) image in a transition, or the image being processed in a filter.

TargetImageType 

The target (destination/to) image in a transition.

ExtraImageType 

An extra image not directly participating in a filter or transition.

Member Function Documentation

virtual const ImageTypeMap& WebVfx::Effects::getImageTypeMap ( )
pure virtual

Describes the image names this effect will request.

Images for these names will need to be set using setImage() each time before render() is called.

Returns
a map mapping image names to their ImageType
virtual bool WebVfx::Effects::render ( double  time,
Image renderImage 
)
pure virtual

Renders the effect for the given time.

Prior to calling render() each time, all named images must be set via setImage().

Parameters
timeTime to render image for, must be from 0 to 1.0.
renderImageImage buffer to render into.
virtual void WebVfx::Effects::renderComplete ( bool  result)
pure virtual

Indicate that rendering is done.

Parameters
resultThis is the success/fail value to return from render().
virtual void WebVfx::Effects::setImage ( const QString &  name,
Image image 
)
pure virtual

Set an Image for the given name.

Parameters
nameName of the image
imageImage data. The Image pixels must remain valid until render() is called.

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