public void SetCameraConfigurations(CameraConfigurations config) { _config = config; if (m_Texture != null) { m_Texture.SetConfiguration(_config); } }
public void Init(RobotInfo ifo, string profileType, GstImageInfo.EPixelFormat fmt = GstImageInfo.EPixelFormat.EPixel_I420) { m_Texture = TargetNode.AddComponent <GstNetworkMultipleTexture> (); m_Texture.StreamsCount = StreamsCount; m_Texture.profileType = profileType; m_Texture.Initialize(); int texCount = m_Texture.GetTextureCount(); _Processor = new OffscreenProcessor[texCount]; _needProcessing = new bool[texCount]; for (int i = 0; i < texCount; ++i) { _Processor[i] = new OffscreenProcessor(); _Processor[i].ShaderName = "Image/I420ToRGB"; _needProcessing [i] = false; } string ip = Settings.Instance.GetValue("Ports", "ReceiveHost", ifo.IP); m_Texture.ConnectToHost(ip, port, StreamsCount, fmt); m_Texture.Play(); if (_config != null) { m_Texture.SetConfiguration(_config); } m_Texture.OnFrameGrabbed += OnFrameGrabbed; _videoPorts = new uint[StreamsCount]; //{0,0}; string streamsVals = ""; for (int i = 0; i < StreamsCount; ++i) { _videoPorts [i] = Texture.Player.GetVideoPort(i); streamsVals += _videoPorts [i].ToString(); if (i != StreamsCount - 1) { streamsVals += ","; } } RobotConnector.Connector.SendData(TxKitEyes.ServiceName, "VideoPorts", streamsVals, true); }