iOS Developer Library

Developer

AV Foundation Framework Reference AVVideoCompositionRenderContext Class Reference

Options
Deployment Target:

On This Page
Language:

AVVideoCompositionRenderContext

The AVVideoCompositionRenderContext class defines the context within which custom compositors render new output pixels buffers.

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

  • The video composition being rendered.

    Declaration

    Swift

    var videoComposition: AVVideoComposition { get }

    Objective-C

    @property(nonatomic, readonly) AVVideoComposition *videoComposition

    Availability

    Available in iOS 7.0 and later.

  • The rendering quality to use. (read-only)

    Declaration

    Swift

    var highQualityRendering: Bool { get }

    Objective-C

    @property(nonatomic, readonly) BOOL highQualityRendering

    Discussion

    Specifies that the custom compositor should use higher quality, potentially slower algorithms.

    Generally this property is YEStrue for non-real-time use cases.

    Availability

    Available in iOS 7.0 and later.

Data Types

  • These constants define the pixel aspect ratio of the rendering context.

    Declaration

    Swift

    struct AVPixelAspectRatio { var horizontalSpacing: Int var verticalSpacing: Int init() init(horizontalSpacing horizontalSpacing: Int, verticalSpacing verticalSpacing: Int) }

    Objective-C

    typedef struct { NSInteger horizontalSpacing; NSInteger verticalSpacing; } AVPixelAspectRatio;

    Constants

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 7.0 and later.

  • Defines the thickness of the edge processing region, in pixels.

    Declaration

    Swift

    struct AVEdgeWidths { var left: CGFloat var top: CGFloat var right: CGFloat var bottom: CGFloat init() init(left left: CGFloat, top top: CGFloat, right right: CGFloat, bottom bottom: CGFloat) }

    Objective-C

    typedef struct { CGFloat left; CGFloat top; CGFloat right; CGFloat bottom; } AVEdgeWidths;

    Constants

    • left

      The thickness, in pixels, of the left-edge processing region of theedgeWidths property.

    • top

      The thickness, in pixels, of the top-edge processing region of theedgeWidths property.

    • right

      The thickness, in pixels, of the right-edge processing region of theedgeWidths property.

    • bottom

      The thickness, in pixels, of the bottom-edge processing region of theedgeWidths property.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 7.0 and later.