Example #1
0
 private void SetVideoSourceProperty(VideoCaptureDevice device, VideoProcAmpProperty prop, string n)
 {
     try
     {
         int v;
         if (Int32.TryParse(Nv(Camobject.settings.procAmpConfig, n), out v))
         {
             if (v > Int32.MinValue)
             {
                 int fv;
                 if (Int32.TryParse(Nv(Camobject.settings.procAmpConfig, "f" + n), out fv))
                 {
                     device.SetProperty(prop, v, (VideoProcAmpFlags)fv);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         ErrorHandler?.Invoke(ex.Message);
     }
 }