void OnRobotConnected(RobotInfo ifo, RobotConnector.TargetPorts ports) { HandController c = GameObject.FindObjectOfType <HandController> (); if (c == null || !c.IsConnected()) { return; } _streamer = new GstNetworkImageStreamer(); _imageGrabber = new GstUnityImageGrabber(); _imageGrabber.SetTexture2D(HandRenderer.LeapRetrival [0].MainTextureData, HandRenderer.LeapRetrival [0].Width, HandRenderer.LeapRetrival [0].Height, TextureFormat.Alpha8); _imageGrabber.Update(); //update once _handsPort = Settings.Instance.GetPortValue("HandsPort", 0); _streamer.SetBitRate(300); _streamer.SetResolution(640, 240, 30); _streamer.SetGrabber(_imageGrabber); _streamer.SetIP(ports.RobotIP, _handsPort, false); RobotConnector.Connector.SendData(TxKitHands.ServiceName, "HandPorts", _handsPort.ToString(), false); _streamer.CreateStream(); _streamer.Stream(); _isConnected = true; }
public void SetRobotInfo(RobotInfo ifo, RobotConnector.TargetPorts ports) { _robotIfo = ifo; if (ifo.ConnectionType == RobotInfo.EConnectionType.Movie || ifo.ConnectionType == RobotInfo.EConnectionType.Local || ifo.ConnectionType == RobotInfo.EConnectionType.WebRTC) { _customConfigurations = false; } _camsInited = false; if (!_customConfigurations) { _initCameras(); } else { //this should be changed to request system parameters //request A/V settings RobotConnector.Connector.SendData(TxKitEyes.ServiceName, "CameraParameters", "", false, true); } }
void OnRobotConnected(RobotInfo ifo, RobotConnector.TargetPorts ports) { var c = GameObject.FindObjectOfType <LeapServiceProvider> (); if (c == null || !c.GetLeapController().IsConnected) { return; } _streamer = new GstNetworkImageStreamer(); _imageGrabber = new GstUnityImageGrabber(); Hands2D = _retrival.TextureData.RawTexture.CombinedTexture; BlitTexture(); _handsPort = Settings.Instance.GetPortValue("HandsPort", 0); _streamer.SetBitRate(500); _streamer.SetResolution(Hands2D.width, Hands2D.height, 30); _streamer.SetGrabber(_imageGrabber); _streamer.SetIP(ports.RobotIP, _handsPort, false); RobotConnector.Connector.SendData(TxKitHands.ServiceName, "Ports", _handsPort.ToString(), false); _streamer.CreateStream(); _streamer.Stream(); _isConnected = true; }
void OnRobotConnected(RobotInfo ifo, RobotConnector.TargetPorts ports) { if (Interface != null) { Interface.SetPowered(true); } }
void OnRobotConnected(RobotInfo ifo, RobotConnector.TargetPorts ports) { if (!Active) { return; } OnConnect.Invoke(); }
public void ConnectRobot(RobotInfo r) { if (_connected) { if (r.IP == _Robot.IP) { return; } DisconnectRobot(); } _Robot = r; if (_Robot == null) { Debug.Log("No robot is set to connect to!"); return; } if (_connector.RobotCommunicator != null) { _connector.RobotCommunicator.Disconnect(); } if (r.ConnectionType == RobotInfo.EConnectionType.WebRTC) { // _connector.RobotCommunicator = new WebRTCRobotCommunicator (); // _connector.RobotCommunicator._ownerConnection = this; } else if (r.ConnectionType == RobotInfo.EConnectionType.RTP || r.ConnectionType == RobotInfo.EConnectionType.Ovrvision) { _connector.RobotCommunicator = new RTPRobotCommunicator(); _connector.RobotCommunicator._ownerConnection = this; } Debug.Log("Connecting to: " + _Robot.IP); _ports = new RobotConnector.TargetPorts(); _Robot.communicationPort = _ports.CommPort = Settings.Instance.GetPortValue("CommPort", 6000); //_Robot.communicationPort;// _ports.RobotIP = _Robot.IP; _connector.ConnectRobot(_Robot); _connected = true; /* * if (VideoStream != null) { * VideoStream.SetRemoteHost(_Robot.IP,ports); * }*/ if (OnRobotConnected != null) { OnRobotConnected(r, _ports); } LogSystem.Instance.Log("Connecting to Robot:" + _Robot.Name, LogSystem.LogType.Info); }
void OnRobotConnected(RobotInfo ifo, RobotConnector.TargetPorts ports) { if (Interface != null) { Interface.ConnectScreen.SetMessage(captions [1]); Interface.SetPowered(true); Interface.ConnectScreen.SetBackgroundAlpha(0.95f); } }
void OnRobotConnected(RobotInfo ifo, RobotConnector.TargetPorts ports) { _streamer = new GstNetworkImageStreamer(); BlitTexture(); _handsPort = Settings.Instance.GetPortValue("VisualsPort", 0); _streamer.SetBitRate(TargetBitrate, TargetQuality); _streamer.SetResolution(SourceImage.width, SourceImage.height, TargetFPS); _streamer.SetGrabber(_imageGrabber); _streamer.SetIP(ports.RobotIP, _handsPort, false); RobotConnector.Connector.SendData(TxKitHands.ServiceName, "Ports", _handsPort.ToString(), false); _streamer.CreateStream(); _streamer.Stream(); _isConnected = true; }
void OnRobotConnected(RobotInfo ifo, RobotConnector.TargetPorts ports) { _imageGrabber = new GstUnityImageGrabber(); _srcTexWrapper.ConvertTexture(SrcTexture); _imageGrabber.SetTexture2D(_srcTexWrapper.WrappedTexture); _imageGrabber.Update(); //update once _videoPort = Settings.Instance.GetPortValue("VideoStreamPort", _videoPort); _streamer = new GstNetworkImageStreamer(); _streamer.SetBitRate(BitRate); _streamer.SetResolution(_srcTexWrapper.WrappedTexture.width, _srcTexWrapper.WrappedTexture.height, 30); _streamer.SetGrabber(_imageGrabber); _streamer.SetIP(ports.RobotIP, _videoPort, false); _streamer.CreateStream(); _streamer.Stream(); RobotConnector.Connector.SendData(TxKitWindow.ServiceName, "VideoWindowPorts", _videoPort.ToString(), false, false); _isConnected = true; }
void _OnRobotConnected(RobotInfo ifo, RobotConnector.TargetPorts ports) { OnRobotConnected(); }
public void SetRobotInfo(RobotInfo ifo, RobotConnector.TargetPorts ports) { _robotIfo = ifo; RobotConnector.Connector.SendData(TxKitEars.ServiceName, "AudioParameters", "", false, true); }
void OnRobotConnected(RobotInfo ifo, RobotConnector.TargetPorts ports) { SetRobotInfo(ifo, ports); }
void OnRobotConnected(RobotInfo ifo, RobotConnector.TargetPorts ports) { SetMessage("Please wait to be connected"); PowerIcon.SetPowered(true); }
public void ConnectRobot(RobotInfo r) { if (_connected) { if(r.IP==_RobotIP.IP) return; DisconnectRobot (); } _RobotIP = r; RobotConnector.TargetPorts ports = new RobotConnector.TargetPorts (); ports.CommPort = Settings.Instance.GetPortValue ("CommPort", 6000); ports.RobotIP = _RobotIP.IP; _connector.ConnectRobotIP (ports); _connected=true; /* if (VideoStream != null) { VideoStream.SetRemoteHost(_RobotIP.IP,ports); }*/ if (OnRobotConnected!=null) { OnRobotConnected(ports); } LogSystem.Instance.Log ("Connecting to Robot:" + _RobotIP.Name, LogSystem.LogType.Info); }
void OnRobotConnected(RobotInfo ifo, RobotConnector.TargetPorts ports) { SetRobotInfo(ifo, ports); _audioInited = false; }
public void SetRobotInfo(RobotInfo ifo, RobotConnector.TargetPorts ports) { _robotIfo = ifo; }/*
void OnRobotConnected(RobotInfo ifo, RobotConnector.TargetPorts ports) { RobotCommunicator = RobotConnector.Connector.RobotCommunicator; }