• FFmpeg parse到的extra data中分离vps, sps, pps等关键信息
  • CMVideoFormatDescriptionCreateFromH264ParameterSets,CMVideoFormatDescriptionCreateFromHEVCParameterSets装载vps,sps,pps等NALU header信息
  • 指定解码器回调函数与解码后视频数据类型(yuv,RGB…)
  • 创建解码器VTDecompressionSessionCreate
  • 生成CMBlockBufferRef装载解码前数据,再将其转为CMSampleBufferRef以提供给解码器.
  • 开始解码VTDecompressionSessionDecodeFrame
  • 在回调函数中CVImageBufferRef即为解码后的数据,可转为CMSampleBufferRef传出.