Exemplo n.º 1
0
        public void Stop()
        {
            if (_rawFramesSource == null)
            {
                return;
            }

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

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

            _realtimeVideoSource.SetRawFramesSource(_rawFramesSource);

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

            _rawFramesSource = rawFramesSource;

            if (rawFramesSource == null)
            {
                return;
            }

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

            _rawFramesSource = rawFramesSource;

            if (rawFramesSource == null)
            {
                return;
            }

            rawFramesSource.FrameReceived += OnFrameReceived;
        }
Exemplo n.º 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();
        }