Language

AVPlannedVideoSegmentWritingRequest.CreateResumableCompressionSession Method

Definition

Overloads

CreateResumableCompressionSession(Int32, Int32, CMVideoCodecType, VTCompressionSession+VTCompressionOutputCallback, VTVideoEncoderSpecification, CVPixelBufferAttributes)

Creates a VTCompressionSession that restores the video encoder state persisted at the end of the previous segment.

public VideoToolbox.VTCompressionSession? CreateResumableCompressionSession(int width, int height, CoreMedia.CMVideoCodecType codecType, VideoToolbox.VTCompressionSession.VTCompressionOutputCallback? compressionOutputCallback, VideoToolbox.VTVideoEncoderSpecification? encoderSpecification = default, CoreVideo.CVPixelBufferAttributes? sourceImageBufferAttributes = default);
member this.CreateResumableCompressionSession : int * int * CoreMedia.CMVideoCodecType * VideoToolbox.VTCompressionSession.VTCompressionOutputCallback * VideoToolbox.VTVideoEncoderSpecification * CoreVideo.CVPixelBufferAttributes -> VideoToolbox.VTCompressionSession

Parameters

width
Int32

The pixel width of video frames.

height
Int32

The pixel height of video frames.

codecType
CMVideoCodecType

The codec type.

compressionOutputCallback
VTCompressionSession.VTCompressionOutputCallback

The callback to invoke with compressed frames, or null if you'll be encoding frames with an output handler.

encoderSpecification
VTVideoEncoderSpecification

Parameters describing the characteristics of a video encoder to use, or null to let the system choose an encoder.

sourceImageBufferAttributes
CVPixelBufferAttributes

Required attributes for source pixel buffers, or null if you don't want the system to create a pixel buffer pool.

Returns

A new VTCompressionSession if successful, null otherwise.

Applies to

CreateResumableCompressionSession(Int32, Int32, CMVideoCodecType, VTCompressionSession+VTCompressionOutputCallback, VTVideoEncoderSpecification, CVPixelBufferAttributes, NSError)

Creates a VTCompressionSession that restores the video encoder state persisted at the end of the previous segment.

public VideoToolbox.VTCompressionSession? CreateResumableCompressionSession(int width, int height, CoreMedia.CMVideoCodecType codecType, VideoToolbox.VTCompressionSession.VTCompressionOutputCallback? compressionOutputCallback, VideoToolbox.VTVideoEncoderSpecification? encoderSpecification, CoreVideo.CVPixelBufferAttributes? sourceImageBufferAttributes, out Foundation.NSError? error);
member this.CreateResumableCompressionSession : int * int * CoreMedia.CMVideoCodecType * VideoToolbox.VTCompressionSession.VTCompressionOutputCallback * VideoToolbox.VTVideoEncoderSpecification * CoreVideo.CVPixelBufferAttributes * NSError -> VideoToolbox.VTCompressionSession

Parameters

width
Int32

The pixel width of video frames.

height
Int32

The pixel height of video frames.

codecType
CMVideoCodecType

The codec type.

compressionOutputCallback
VTCompressionSession.VTCompressionOutputCallback

The callback to invoke with compressed frames, or null if you'll be encoding frames with an output handler.

encoderSpecification
VTVideoEncoderSpecification

Parameters describing the characteristics of a video encoder to use, or null to let the system choose an encoder.

sourceImageBufferAttributes
CVPixelBufferAttributes

Required attributes for source pixel buffers, or null if you don't want the system to create a pixel buffer pool.

error
NSError

On failure, the error that occurred.

Returns

A new VTCompressionSession if successful, null otherwise.

Applies to