An object that defines the context within which custom compositors render new output pixel buffers.


class AVVideoCompositionRenderContext : NSObject


An instance of AVVideoCompositionRenderContext provides size and scaling information and offers a service for efficiently providing pixel buffers from a managed pool of buffers.


Creating the Pixel Buffer

func newPixelBuffer() -> CVPixelBuffer?

Returns a pixel buffer to use for rendering.

Getting the Render Settings

var videoComposition: AVVideoComposition

The video composition being rendered.

var highQualityRendering: Bool

The rendering quality to use.

var renderScale: Float

A scaling ratio that is applied when rendering frames.

var renderTransform: CGAffineTransform

A transform to apply to the source image.

var size: CGSize

The width and height for the rendering frames.

Getting Pixel and Edge Width Information

var edgeWidths: AVEdgeWidths

The thickness of the edge processing region on the left, top, right, and bottom edges, in pixels.

struct AVEdgeWidths

An edge processing region thickness.

var pixelAspectRatio: AVPixelAspectRatio

The pixel aspect ratio for rendered frames.

struct AVPixelAspectRatio

A pixel aspect ratio for the rendering context.


Inherits From

Conforms To

See Also

Video Composition

class AVVideoComposition

An object that represents an immutable video composition.

class AVMutableVideoComposition

An object that represents a mutable video composition.

class AVAsynchronousCIImageFilteringRequest

An object that supprts using Core Image filters to process an individual video frame in a video composition.

class AVAsynchronousVideoCompositionRequest

An object that contains the information necessary for a video compositor to render an output pixel buffer.

class AVMutableVideoCompositionInstruction

An operation performed by a compositor.

class AVMutableVideoCompositionLayerInstruction

An object used to modify the transform, cropping, and opacity ramps applied to a given track in a mutable composition.

class AVVideoCompositionCoreAnimationTool

An object used to incorporate Core Animation into a video composition.

class AVVideoCompositionInstruction

An operation performed by a compositor.

class AVVideoCompositionLayerInstruction

An object used to modify the transform, cropping, and opacity ramps applied to a given track in a composition.