Ejemplo n.º 1
0
 public static WebSocketManager GetInstance()
 {
     if (manager == null)
     {
         manager = new WebSocketManager();
     }
     return(manager);
 }
Ejemplo n.º 2
0
        // ==========================================
        //  CONSTRUCTOR
        // ==========================================

        public override void Init()
        {
            // Start Sensors
            InitSensors();

            // Start WebSocket Server
            WebSocketManager.GetInstance().StartWebSocketServer();

            base.Init();
        }
Ejemplo n.º 3
0
        public void SetupColorFrame(KinectSensor sensor)
        {
            logInfo("KINECT", "Starting Color sensor");

              // Turn on the color stream to receive color frames
              // sensor.ColorStream.Enable(ColorImageFormat.RgbResolution1280x960Fps12);
              sensor.ColorStream.Enable(ColorImageFormat.RgbResolution640x480Fps30);

              ColorW = sensor.ColorStream.FrameWidth;
              ColorH = sensor.ColorStream.FrameHeight;

              // Allocate space to put the pixels we'll receive
              ColorPixels = new byte[sensor.ColorStream.FramePixelDataLength];

              // Init Common ----------
              sensor.ColorFrameReady += new EventHandler<ColorImageFrameReadyEventArgs>(handle_ColorFrameReady);

              // Init QRCode ----------
              QRCodeManager qrmgr = new QRCodeManager();
              if (qrmgr.SetupQRCode()) {
            sensor.ColorFrameReady += qrmgr.SensorColorFrameReady;
              }

              // Init WebSocket ----------
              WebSocketManager wsmgr = new WebSocketManager();
              if (wsmgr.SetupWebSocket()) {
            wsmgr.SetupGreenScreen(sensor);
              }

              // Init WSRCamera ----------
              if (WSRConfig.GetInstance().facetrack > 0) {
            WSRCamera.Start();
              }
        }
Ejemplo n.º 4
0
 public static WebSocketManager GetInstance() {
   if (manager == null) {
     manager = new WebSocketManager();
   }
   return manager;
 }