Exemple #1
0
        public static Context Create(int id = 0, EncoderType encoderType = EncoderType.Hardware)
        {
            if (encoderType == EncoderType.Hardware && !NativeMethods.GetHardwareEncoderSupport())
            {
                throw new ArgumentException("Hardware encoder is not supported");
            }

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

            return(new Context(ptr, id));
        }
Exemple #2
0
        public static Context Create(int id = 0, EncoderType encoderType = EncoderType.Hardware)
        {
            var ptr = NativeMethods.ContextCreate(id, encoderType);

            return(new Context(ptr, id));
        }
        public static Context Create(int id = 0)
        {
            var ptr = NativeMethods.ContextCreate(id);

            return(new Context(ptr, id));
        }
Exemple #4
0
 public static Context Create(int uid = 0)
 {
     return(NativeMethods.ContextCreate(uid));
 }