Пример #1
0
 public static Camera GetInstance()
 {
     if (_instance == null)
     {
         _instance = new Camera();
     }
     return _instance;
 }
Пример #2
0
 /// <summary>
 /// Class constructor.
 /// </summary>
 public DefaultVideo()
 {
     _webcamera = Camera.GetInstance();
     _video_timer = new DispatcherTimer();
     /*
      * default video settings
      */
     _framerate = new TimeSpan(0, 0, 0, 0, 34); // sets timer to 34ms, aka 30fps: 1000ms/30frames = 34ms/frame
     _video_timer.Tick += new EventHandler(CollectImage);
     _video_timer.Interval = _framerate;
     _image = null;
     _lock = new Object();
 }