CMVideoFormatDescriptionCreateForImageBuffer(allocator:imageBuffer:formatDescriptionOut:)

Horus-iOS·2022년 7월 6일
0

https://developer.apple.com/documentation/coremedia/1489730-cmvideoformatdescriptioncreatefo

Creates a format description for a video media stream by using an image buffer.

이미지 버퍼를 사용해서 비디오 미디어 스트림에 대한 포맷 설명을 생성합니다.

Declaration

func CMVideoFormatDescriptionCreateForImageBuffer(
    allocator: CFAllocator?,
    imageBuffer: CVImageBuffer,
    formatDescriptionOut: UnsafeMutablePointer<CMVideoFormatDescription?>
) -> OSStatus

Parameters

allocator
CFAllocator to be used when creating the CMFormatDescription. Pass NULL to use the default allocator.

CMFormatDescription을 생성할 때 사용되기 위한 CFAllocator입니다. 기본값 할당자를 사용하려면 NULL을 전달해야 합니다.

imageBuffer
포맷 설명을 생성하기 위한 이미지 버퍼입니다.

outDesc
아웃풋에서 새롭게 생성된 비디오 CMFormatDescription을 반환합니다.

Return Value

결과 코드입니다. 성공하는 경우 noErr를 반환합니다.

Discussion

이 편의 함수는 아래와 같습니다.

CMVideoFormatDescriptionCreate ( allocator, ( CVPixelBufferGetTypeID() == CFGetTypeID( imageBuffer ) ? CVPixelBufferGetPixelFormatType( imageBuffer ) : 0,  width of image,  height of image, extensions );

확장은 CMVideoFormatDescriptionGetExtensionKeysCommonWithImageBuffers에 의해 지정된 키가 있는 이미지 버퍼에 대한 첨부 파일의 CFDictionary입니다.

0개의 댓글