public void Initialize(StreamInfo streamInfo, int maxItemsInQueue) { if (streamInfo == null) { throw new ArgumentNullException("streamInfo"); } m_streamInfo = streamInfo; AddOptions(MediaOptions.ToList()); m_queue = new BlockingCollection<FrameData>(maxItemsInQueue); m_initilaized = true; }
public void AddStream(StreamInfo streamInfo, int maxItemsInQueue = 30) { if (_mIsComplete) { throw new InvalidOperationException("Stream adding is complete. No more streams allowed"); } _mStreamData[streamInfo.Id] = new StreamData(streamInfo, maxItemsInQueue); }
private void SetupInput(BitmapFormat format) { var streamInfo = new StreamInfo(); streamInfo.Category = StreamCategory.Video; streamInfo.Codec = VideoCodecs.Bgr24; streamInfo.Width = format.Width; streamInfo.Height = format.Height; streamInfo.Size = format.ImageSize; _mInputMedia.Initialize(streamInfo); _mInputMedia.SetExceptionHandler(OnErrorCallback); _mRenderPlayer.Open(_mInputMedia); }
public StreamData(StreamInfo streamInfo, int maxQueueSize) { StreamInfo = streamInfo; Queue = new BlockingCollection<FrameData>(maxQueueSize); }