void Update() { if (_outputModeMatchInputMode) { if (_inputDecklink.Device != null && _inputDecklink.Device.IsStreaming && _inputDecklink.OutputTexture != null) { AutoStartOutput(_inputDecklink.Device.CurrentMode); } } if (_inputDecklink.Device != null && _inputDecklink.Device.IsStreaming && _inputDecklink.OutputTexture != null) { if (_lastInputModeSet != _inputDecklink.Device.CurrentMode) { _needsInputAutoScroll = true; } } if (_renderCamera.targetTexture == null && _outputDecklink.InputTexture != null) { _outputDecklink.SetCamera(_renderCamera); } //_outputDecklink.Process(); }
void Update() { if (_outputModeMatchInputMode) { if (_inputDecklink.Device != null && _inputDecklink.Device.IsStreaming && _inputDecklink.OutputTexture != null) { AutoStartOutput(_inputDecklink.Device.CurrentMode); } } if (_inputDecklink.Device != null && _inputDecklink.Device.IsStreaming && _inputDecklink.OutputTexture != null) { if (_lastInputModeSet != _inputDecklink.Device.CurrentMode) { _needsInputAutoScroll = true; } } if (_renderCamera.targetTexture == null && _outputDecklink.InputTexture != null) { _outputDecklink.SetCamera(_renderCamera); } //_outputDecklink.Process(); if (Input.GetKeyDown(KeyCode.Space)) { _showGui = !_showGui; } // Note: This reduces garbage generation when _showGui is false this.useGUILayout = _showGui; }
private void StartOutput(DeviceMode mode) { StopOutput(); _decklink._modeIndex = mode.Index; _decklink.Begin(); _decklink.SetCamera(Camera.main); _activeMode = mode; }