private void SampleReadyCallback(int index, int fps) { VideoStreamInfo streamInfo = _streamInfoByIndex[index]; if (!streamInfo.IsRunning) { return; } streamer.Next(index); streamInfo.SetFps(fps); streamInfo.IsNewFrameReady = true; }
private void StopDXRendering(VideoStreamInfo streamInfo) { streamInfo.IsRunning = false; foreach (D3DImage image in streamInfo.Images) { image.Lock(); image.SetBackBuffer(D3DResourceType.IDirect3DSurface9, IntPtr.Zero); image.Unlock(); } streamer.StopStream(streamInfo.Index); streamInfo.SetFps(0); }