iOS Developer Library

Developer

AVFoundation Framework Reference AVVideoCompositionRenderContext Class Reference

Options
Deployment Target:

On This Page
Language:

AVVideoCompositionRenderContext

Inherits From


  • NSObject
  • AVVideoCompositionRenderContext

Conforms To


Import Statement


Swift

import AVFoundation

Objective-C

@import AVFoundation;

Availability


Available in iOS 7.0 and later

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

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    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.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 7.0 and later

  • The thickness of the edge processing region on the left, top, right and bottom edges, in pixels. (read-only)

    Declaration

    Swift

    var edgeWidths: AVEdgeWidths { get }

    Objective-C

    @property(nonatomic, readonly) AVEdgeWidths edgeWidths

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 7.0 and later

    See Also

    renderTransform

  • The pixel aspect ratio for rendered frames. (read-only)

    Declaration

    Swift

    var pixelAspectRatio: AVPixelAspectRatio { get }

    Objective-C

    @property(nonatomic, readonly) AVPixelAspectRatio pixelAspectRatio

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 7.0 and later

    See Also

    renderTransform

  • A scaling ratio that is applied when rendering frames. (read-only)

    Declaration

    Swift

    var renderScale: Float { get }

    Objective-C

    @property(nonatomic, readonly) float renderScale

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 7.0 and later

    See Also

    renderTransform

  • Transform to apply to the source image (read-only)

    Declaration

    Swift

    var renderTransform: CGAffineTransform { get }

    Objective-C

    @property(nonatomic, readonly) CGAffineTransform renderTransform

    Discussion

    The transform to apply to the source image incorporating the renderScale, pixelAspectRatio, and edgeWidths.

    The coordinate system origin is the top left corner of the buffer.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 7.0 and later

  • size size Property

    The width and height for rendering frames. (read-only)

    Declaration

    Swift

    var size: CGSize { get }

    Objective-C

    @property(nonatomic, readonly) CGSize size

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    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

    • horizontalSpacing

      horizontalSpacing

      The horizontal spacing of the pixelAspectRatio property.

    • verticalSpacing

      verticalSpacing

      The vertical spacing of the pixelAspectRatio property.

    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

      left

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

    • top

      top

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

    • right

      right

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

    • bottom

      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