https://developer.apple.com/documentation/coremedia/1489730-cmvideoformatdescriptioncreatefo
Creates a format description for a video media stream by using an image buffer.
이미지 버퍼를 사용해서 비디오 미디어 스트림에 대한 포맷 설명을 생성합니다.
func CMVideoFormatDescriptionCreateForImageBuffer(
allocator: CFAllocator?,
imageBuffer: CVImageBuffer,
formatDescriptionOut: UnsafeMutablePointer<CMVideoFormatDescription?>
) -> OSStatus
allocator
CFAllocator to be used when creating the CMFormatDescription. Pass NULL to use the default allocator.
CMFormatDescription
을 생성할 때 사용되기 위한 CFAllocator
입니다. 기본값 할당자를 사용하려면 NULL
을 전달해야 합니다.
imageBuffer
포맷 설명을 생성하기 위한 이미지 버퍼입니다.
outDesc
아웃풋에서 새롭게 생성된 비디오 CMFormatDescription
을 반환합니다.
결과 코드입니다. 성공하는 경우 noErr
를 반환합니다.
이 편의 함수는 아래와 같습니다.
CMVideoFormatDescriptionCreate ( allocator, ( CVPixelBufferGetTypeID() == CFGetTypeID( imageBuffer ) ? CVPixelBufferGetPixelFormatType( imageBuffer ) : 0, width of image, height of image, extensions );
확장은 CMVideoFormatDescriptionGetExtensionKeysCommonWithImageBuffers
에 의해 지정된 키가 있는 이미지 버퍼에 대한 첨부 파일의 CFDictionary
입니다.