Ejemplo n.º 1
0
        public static Context Create(int id = 0, EncoderType encoderType = EncoderType.Hardware, bool forTest = false)
        {
            if (encoderType == EncoderType.Hardware && !WebRTC.HardwareEncoderSupport())
            {
                throw new ArgumentException("Hardware encoder is not supported");
            }

            var ptr = NativeMethods.ContextCreate(id, encoderType, forTest);

            return(new Context(ptr, id));
        }