共用方式為


VTCompressionSession.Create 方法

定義

多載

Create(Int32, Int32, CMVideoCodecType, VTCompressionSession+VTCompressionOutputCallback, VTVideoEncoderSpecification, CVPixelBufferAttributes)
Create(Int32, Int32, CMVideoCodecType, VTCompressionSession+VTCompressionOutputCallback, VTVideoEncoderSpecification, NSDictionary)
已淘汰.

建立壓縮會話

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

public static VideoToolbox.VTCompressionSession Create (int width, int height, CoreMedia.CMVideoCodecType codecType, VideoToolbox.VTCompressionSession.VTCompressionOutputCallback compressionOutputCallback, VideoToolbox.VTVideoEncoderSpecification encoderSpecification, CoreVideo.CVPixelBufferAttributes sourceImageBufferAttributes);
static member Create : int * int * CoreMedia.CMVideoCodecType * VideoToolbox.VTCompressionSession.VTCompressionOutputCallback * VideoToolbox.VTVideoEncoderSpecification * CoreVideo.CVPixelBufferAttributes -> VideoToolbox.VTCompressionSession

參數

width
Int32
height
Int32
codecType
CMVideoCodecType
encoderSpecification
VTVideoEncoderSpecification
sourceImageBufferAttributes
CVPixelBufferAttributes

傳回

適用於

Create(Int32, Int32, CMVideoCodecType, VTCompressionSession+VTCompressionOutputCallback, VTVideoEncoderSpecification, NSDictionary)

警告

This overload requires that the provided compressionOutputCallback manually CFRetain the passed CMSampleBuffer, use Create(int,int,CMVideoCodecType,VTCompressionOutputCallback,VTVideoEncoderSpecification,CVPixelBufferAttributes) variant instead which does not have that requirement.

建立壓縮會話

[System.Obsolete("This overload requires that the provided compressionOutputCallback manually CFRetain the passed CMSampleBuffer, use Create(int,int,CMVideoCodecType,VTCompressionOutputCallback,VTVideoEncoderSpecification,CVPixelBufferAttributes) variant instead which does not have that requirement.")]
public static VideoToolbox.VTCompressionSession Create (int width, int height, CoreMedia.CMVideoCodecType codecType, VideoToolbox.VTCompressionSession.VTCompressionOutputCallback compressionOutputCallback, VideoToolbox.VTVideoEncoderSpecification encoderSpecification = null, Foundation.NSDictionary sourceImageBufferAttributes = null);
static member Create : int * int * CoreMedia.CMVideoCodecType * VideoToolbox.VTCompressionSession.VTCompressionOutputCallback * VideoToolbox.VTVideoEncoderSpecification * Foundation.NSDictionary -> VideoToolbox.VTCompressionSession

參數

width
Int32

以圖元為單位的框架寬度。

height
Int32

以圖元為單位的框架高度。

codecType
CMVideoCodecType

用來壓縮畫面格的編碼器。

compressionOutputCallback
VTCompressionSession.VTCompressionOutputCallback

將叫用以處理壓縮框架的方法。  如需所接收參數的詳細資訊,請參閱委派類型。

encoderSpecification
VTVideoEncoderSpecification

選擇要選擇編碼器的參數,或為 Null,讓 VideoToolbox 選擇它。

sourceImageBufferAttributes
NSDictionary

CVPixelBufferAttributes 類型擷取的 Dictionary 屬性,或是具有所需 CoreVideo 圖元緩衝區屬性值的 NSDictionary。

傳回

屬性

備註

compressionOutputCallback將會依解碼順序為每個畫面叫用 ,而不一定是顯示順序。

適用於