Поделиться через


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

Свойство Dictionary, извлеченное CVPixelBufferAttributes из типа, или NSDictionary с нужными значениями атрибутов буфера пикселей CoreVideo.

Возвращаемое значение

Атрибуты

Комментарии

Вызывается compressionOutputCallback для каждого кадра в порядке декодирования, не обязательно в порядке отображения.

Применяется к