void _initCameras() { if (_robotIfo.ConnectionType == RobotInfo.EConnectionType.RTP) { _CreateRTPCamera(Configuration.CamSettings.StreamsCount); } else if (_robotIfo.ConnectionType == RobotInfo.EConnectionType.WebRTC) { _CreateWebRTCCamera(); } else if (_robotIfo.ConnectionType == RobotInfo.EConnectionType.Local) { _CreateLocalCamera(); } else if (_robotIfo.ConnectionType == RobotInfo.EConnectionType.Ovrvision) { _CreateOvrvisionCamera(); } else if (_robotIfo.ConnectionType == RobotInfo.EConnectionType.Movie) { _CreateMediaCamera(); } _camRenderer[0].CreateMesh(EyeName.LeftEye); _camRenderer[1].CreateMesh(EyeName.RightEye); if (_cameraSource != null) { _cameraSource.SetCameraConfigurations(Configuration.CamSettings); } _camsInited = true; }
void _initCameras() { _createImageProcessor(); if (_robotIfo.ConnectionType == RobotInfo.EConnectionType.RTP) { _CreateRTPCamera(Configuration.CamSettings.StreamsCount); } else if (_robotIfo.ConnectionType == RobotInfo.EConnectionType.WebRTC) { _CreateWebRTCCamera(); } else if (_robotIfo.ConnectionType == RobotInfo.EConnectionType.Local) { _CreateLocalCamera(); } else if (_robotIfo.ConnectionType == RobotInfo.EConnectionType.Ovrvision) { _CreateOvrvisionCamera(); } else if (_robotIfo.ConnectionType == RobotInfo.EConnectionType.Movie) { _CreateMediaCamera(); } if (_cameraSource != null) { _cameraSource.SetCameraConfigurations(Configuration.CamSettings); } { Output.Configuration.CameraType = CameraConfigurations.ECameraType.WebCamera; Output.Configuration.streamCodec = CameraConfigurations.EStreamCodec.Raw; Output.Configuration.CameraStreams = Configuration.CamSettings.CameraStreams; Output.Configuration.OptimizeOVRVision = Configuration.CamSettings.OptimizeOVRVision; Output.Configuration.FrameSize = Configuration.CamSettings.FrameSize; Output.Configuration.CamerConfigurationsStr = Configuration.CamSettings.CamerConfigurationsStr; Output.Configuration.FlipXAxis = Configuration.CamSettings.FlipXAxis; Output.Configuration.FlipYAxis = Configuration.CamSettings.FlipYAxis; Output.Configuration.Focal = Configuration.CamSettings.Focal; Output.Configuration.FocalLength = Configuration.CamSettings.FocalLength; Output.Configuration.FoV = Configuration.CamSettings.FoV; Output.Configuration.KPCoeff = Configuration.CamSettings.KPCoeff; Output.Configuration.LensCenter = Configuration.CamSettings.LensCenter; Output.Configuration.Name = Configuration.CamSettings.Name; Output.Configuration.OffsetAngle = Configuration.CamSettings.OffsetAngle; Output.Configuration.PixelShiftLeft = Configuration.CamSettings.PixelShiftLeft; Output.Configuration.PixelShiftRight = Configuration.CamSettings.PixelShiftRight; Output.Configuration.Rotation = Configuration.CamSettings.Rotation; Output.Configuration.SeparateStreams = Configuration.CamSettings.SeparateStreams; Output.Configuration.StreamsCount = Configuration.CamSettings.StreamsCount; Output.Configuration.CameraCorrectionRequired = _imageProcessor.RequireCameraCorrection(); Output.TriggerOnChanged(); } _imageProcessor.PostInit(); _camsInited = true; if (OnCameraSourceCreated != null) { OnCameraSourceCreated(this, _cameraSource); } }