Exemple #1
0
        public void Stop()
        {
            if (_rawFramesSource == null)
            {
                return;
            }

            _rawFramesSource.Stop();
            _realtimeVideoSource.SetRawFramesSource(null);
            _rawFramesSource = null;
        }
Exemple #2
0
        public void Start(ConnectionParameters connectionParameters)
        {
            if (_rawFramesSource != null)
            {
                return;
            }

            _rawFramesSource = new RawFramesSource(connectionParameters);
            _rawFramesSource.ConnectionStatusChanged += ConnectionStatusChanged;

            _realtimeVideoSource.SetRawFramesSource(_rawFramesSource);

            _rawFramesSource.Start();
        }
Exemple #3
0
        public void SetRawFramesSource(IRawFramesSource rawFramesSource)
        {
            if (_rawFramesSource != null)
            {
                _rawFramesSource.FrameReceived -= OnFrameReceived;
            }

            _rawFramesSource = rawFramesSource;

            if (rawFramesSource == null)
            {
                return;
            }

            rawFramesSource.FrameReceived += OnFrameReceived;
        }
Exemple #4
0
        public void SetRawFramesSource(IRawFramesSource rawFramesSource)
        {
            if (_rawFramesSource != null)
            {
                _rawFramesSource.FrameReceived -= OnFrameReceived;
                DropAllVideoDecoders();
            }

            _rawFramesSource = rawFramesSource;

            if (rawFramesSource == null)
            {
                return;
            }

            rawFramesSource.FrameReceived += OnFrameReceived;
        }
Exemple #5
0
        public void Start(ConnectionParameters connectionParameters)
        {
            if (_rawFramesSource != null)
            {
                return;
            }

            _yoloWrapper             = new YoloWrapper();
            _yoloWrapper.ObjectsOut += YoloWrapper_ObjectsOut;

            _rawFramesSource = new RawFramesSource(connectionParameters);
            _rawFramesSource.ConnectionStatusChanged += ConnectionStatusChanged;

            _realtimeVideoSource.SetRawFramesSource(_rawFramesSource);
            _realtimeAudioSource.SetRawFramesSource(_rawFramesSource);

            _realtimeVideoSource.FrameReceived += OnFrameReceived;

            _rawFramesSource.Start();
        }