Contents

destinationImageRect(_:sourceImages:destinationImage:pluginState:at:)

Calculates the bounds of the output image determined by the various inputs and plug-in state at the given render time.

Declaration

func destinationImageRect(_ destinationImageRect: UnsafeMutablePointer<FxRect>, sourceImages: [FxImageTile], destinationImage: FxImageTile, pluginState: Data?, at renderTime: CMTime) throws

Parameters

  • destinationImageRect:

    The bounds of the output image. Your plug-in should calculate this value.

  • sourceImages:

    An array of images that represent the input images. They will have proper bounding rectangles and pixel transforms, but no pixel data will be given yet.

  • destinationImage:

  • pluginState:

    The NSData returned from your plug-in’s Pluginstate(_:at:quality:) method.

  • renderTime:

    The rational time at which the output will be rendered.

Mentioned in

Discussion

This method is called when the plug-in wants to calculate the output bounds of your plug-in when rendering at a particular time. It will pass in an array of images, the plug-in state returned from your plug-in’s pluginState(_:at:quality:) method, and the render time. If your plug-in is unable to calculate the output rectangle at the given time, it should return NO and fill out the outError parameter with an NSError that uses the FxPlugErrorDomain and appropriate (possibly custom) error code.

See Also

Determining input and output bounds