static IntPtr CreateCMVideoFormatDescription(CMVideoCodecType codecType, CMVideoDimensions size) { IntPtr handle; var error = CMVideoFormatDescriptionCreate(IntPtr.Zero, codecType, size.Width, size.Height, IntPtr.Zero, out handle); if (error != CMFormatDescriptionError.None) { throw new ArgumentException(error.ToString()); } return(handle); }
public CMVideoFormatDescription(CMVideoCodecType codecType, CMVideoDimensions size) : base(CreateCMVideoFormatDescription(codecType, size), true) { }