WebVfx 0.1.6-6-g5144893-dirty
Classes | Functions
WebVfx Namespace Reference

Public entry points into WebVfx. More...

Classes

class  Effects
 An effects implementation that can consume video frame images and render output. More...
class  Image
 Lightweight class for passing around a reference to a buffer of raw image data. More...
class  Logger
 Callback interface to expose logging. More...
class  Parameters
 Callback interface to expose named parameter values to an effect. More...

Functions

void setLogger (Logger *logger)
 Set a Logger implementation.
bool initialize ()
 Initialize the WebVfx framework.
EffectscreateEffects (const QString &fileName, int width, int height, Parameters *parameters=0)
 Create an Effects instance.
int processEvents ()
 Workaround for MacOS.
void shutdown ()
 Shut down WebVfx.
void log (const QString &msg)
 Log a message.

Detailed Description

Public entry points into WebVfx.

These are the methods and classes that will be needed to host WebVfx effect rendering.


Function Documentation

Effects * WebVfx::createEffects ( const QString &  fileName,
int  width,
int  height,
Parameters *  parameters = 0 
)

Create an Effects instance.

Parameters:
fileNamePath to a QML or HTML effects implementation. fileName must end in .html or .qml
widthInitial width of effect in pixels
heightInitial height of effect in pixels
parametersParameters implementation to provide named parameter values for this effect
bool WebVfx::initialize ( )

Initialize the WebVfx framework.

initialize() is threadsafe and may be called multiple times. It must be called before calling createEffects() for the first time.

On MacOS, in a non Qt host application, initialize() and processEvents() must be called from the main thread. In a Qt based MacOS application, or a non-MacOS application, initialize() can be called from any thread and processEvents() need not be called. See QTBUG-7393.

Returns:
Indicates whether initialization was successful
void WebVfx::log ( const QString &  msg)

Log a message.

Logs a message using the currently set Logger implementation.

int WebVfx::processEvents ( )

Workaround for MacOS.

Must be called on the main thread after initialize() in non-Qt based MacOS applications if Effects is going to be used from any other threads. It is a noop on other platforms or on Qt-based MacOS applications.

Note:
This method will block until shutdown() is called.
void WebVfx::setLogger ( Logger *  logger)

Set a Logger implementation.

WebVfx will take ownership of the logger and delete it at shutdown. setLogger() must be called only once and must be called before initialize().

void WebVfx::shutdown ( )

Shut down WebVfx.

All Effects should be destroyed before calling shutdown(). shutdown() can be called from any thread. It is safe to call shutdown() more than once, or without having called initialize().

 All Classes Namespaces Functions Variables Enumerations Enumerator