IOS-CMSampleBuffer是个啥

CMTime:64位的value,32位的scale, media的时间格式
CMVideoFormatDesc:video的格式,包括宽高、颜色空间、编码格式、SPS、PPS
CVPixelBuffer:包含未压缩的像素格式,宽高
CMBlockBuffer:未压缩的的图像数据
CMSampleBuufer:存放一个或多个压缩或未压缩的媒体文件

IOS-CMSampleBuffer是个啥_第1张图片
CMSampleBuffer的结构图

获取方式:

CVPixelBufferRef pixelbuffer = CMSampleBufferGetImageBuffer(sampleBuffer);

CMTime timeStamp = CMSampleBufferGetPresentationTimeStamp(samplebuffer);

CMBlockBufferRef blockBuffer = CMSampleBufferGetDataBuffer(sampleBuffer);

CMVideoFormatDescription description = CMSampleBufferGetFormatFormatDescription(sampleBuffer);

你可能感兴趣的:(IOS-CMSampleBuffer是个啥)