private void Awake() { //创建一个管线 cameraPipe = OeipManager.Instance.CreatePipe <OeipPipe3D>(OeipGpgpuType.OEIP_CUDA); //生成一个视频渲染管线 VideoPipe = new OeipVideoPipe(cameraPipe); VideoPipe.SetOutput(false, true); //生成一个摄像机处理类 oeipCamera = new OeipCamera(); oeipCamera.OnReviceEvent += OeipCamera_OnReviceEvent; }
public void NativeLoad(OeipGpgpuType gpuType, int index = 0, bool bCpu = false) { var pipe = OeipManager.Instance.CreatePipe <OeipPipe>(gpuType); VideoPipe = new OeipVideoPipe(pipe); VideoPipe.Pipe.OnProcessEvent += Pipe_OnProcessEvent; VideoPipe.SetOutput(bCpu, !bCpu); camera = OeipManager.Instance.GetCamera <OeipCamera>(index); camera.OnReviceEvent += Camera_OnReviceEvent; var cameraList = OeipManager.Instance.OeipDevices; OeipDeviceInfo nullDevice = new OeipDeviceInfo(); nullDevice.id = -1; cbx_cameraList.Items.Add(nullDevice); foreach (var camera in cameraList) { cbx_cameraList.Items.Add(camera); } cbx_cameraList.SelectedIndex = Math.Min(index + 1, cameraList.Count); }