private void CreateCapturingChannel(VideoStreamInfo streamInfo)
        {
            _logger.LogInformation("CreateCapturingChannel: {streamId}", streamInfo.Id);

            var newChannel = CreateCapturingChannel();

            _capturingChannels.Add(newChannel);

            VideoStreamGrabber vs = new VideoStreamGrabber(_logger, streamInfo, newChannel);

            _streams.Add(vs);
        }
Beispiel #2
0
        public VideoStreamGrabber(ILogger logger, VideoStreamInfo streamInfo, Channel <VideoFrame> outputChannel)
        {
            if (logger is null)
            {
                throw new ArgumentNullException(nameof(logger));
            }
            if (streamInfo is null)
            {
                throw new ArgumentNullException(nameof(streamInfo));
            }

            Info          = streamInfo;
            Path          = streamInfo.Path;
            _fps          = streamInfo.Fps;
            StreamName    = streamInfo.Id;
            IsContinuous  = streamInfo.IsContinuous;
            RotateFlags   = streamInfo.RotateFlags;
            OutputChannel = outputChannel;

            _stopping = false;
            _logger   = logger;
        }
Beispiel #3
0
 public VideoFrameContext(DateTime timestamp, int index, VideoStreamInfo info)
 {
     Timestamp = timestamp;
     Index     = index;
     Info      = info;
 }