Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public CMVideoFormatDescription(CMVideoCodecType codecType, CMVideoDimensions size)
     : base(CreateCMVideoFormatDescription(codecType, size), true)
 {
 }