WebVfx 0.1.6-6-g5144893-dirty
Public Types | Public Member Functions
WebVfx::Effects Class Reference

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

#include <effects.h>

Inherited by WebVfx::EffectsImpl.

List of all members.

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.
virtual void setImage (const QString &name, Image *image)=0
 Set an Image for the given name.
virtual bool render (double time, Image *renderImage)=0
 Renders the effect for the given time.
virtual void destroy ()=0
 Destroy the effect.

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::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:
 All Classes Namespaces Functions Variables Enumerations Enumerator