ADC Home > Reference Library > Reference > Apple Applications > Final Cut Pro/Final Cut Express > FxPlug Reference

 


FxFilter

Extends Protocol:
Declared In:

Introduction

Specifies the methods a filter plug-in needs to implement.

Discussion

This protocol inherits from the parent protocol FxBaseEffect, whose methods must be implemented by any type of plug-in.



Methods

-frameCleanup
Asks the plug-in to clean up any memory allocated in frameSetup:. Called after renderOutput:.
-frameSetup:inputInfo:hardware:software:
Determines the type of input/output image the plug-in requires. The application calls this method before renderOutput:.
-getOutputWidth:height:withInput:withInfo:
Allows the host application to retrieve the size of an output image produced by the plug-in. The application can then allocate and setup a proper output image for rendering.
-renderOutput:withInput:withInfo:
Renders output image from a plug-in.

frameCleanup


Asks the plug-in to clean up any memory allocated in frameSetup:. Called after renderOutput:.

- (BOOL)frameCleanup; 
Return Value

Returns YES if the cleanup is successful; NO otherwise.


frameSetup:inputInfo:hardware:software:


Determines the type of input/output image the plug-in requires. The application calls this method before renderOutput:.

- (BOOL)frameSetup:(FxRenderInfo)renderInfo inputInfo:(FxImageInfo)inputInfo hardware:(BOOL *)canRenderHardware software:(BOOL *)canRenderSoftware; 
Parameters
renderInfo
FxRenderInfo structure that defines the render request.
inputInfo
FxImageInfo structure that defines the input image.
canRenderHardware
Set to YES if the frame can be rendered in hardware.
canRenderSoftware
Set to YES if the frame can be rendered in software.
Return Value

Returns YES if frame setup is successful; NO otherwise.


getOutputWidth:height:withInput:withInfo:


Allows the host application to retrieve the size of an output image produced by the plug-in. The application can then allocate and setup a proper output image for rendering.

- (BOOL)getOutputWidth:(UInt32 *)width height:(UInt32 *)height withInput:(FxImageInfo)inputInfo withInfo:(FxRenderInfo)renderInfo;
Parameters
width
The width of the output image generated by the plug-in.
height
The height of the output image generated by the plug-in.
inputInfo
Information about the input image that is passed as inputImage during renderOutput:.
renderInfo
Information about the render type the application is requesting.
Return Value

Returns YES if the output size is properly determined and set to the width and height parameters; NO otherwise.
NOTE: This method may not be called by some host applications that do not support resizing.


renderOutput:withInput:withInfo:


Renders output image from a plug-in.

- (BOOL)renderOutput:(FxImage *)output withInput:(FxImage *)inputImage withInfo:(FxRenderInfo)renderInfo; 
Parameters
output
Target image for final output from the plug-in.
inputImage
Input image.
renderInfo
Information about the render type the application is currently requesting.
Return Value

Returns YES if the output image is correctly populated and processing is successful; NO otherwise.


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.
Last Updated: 2008-06-05