// CF2 (with some changes for network) private void cklbCameras_ItemCheck(object sender, System.Windows.Forms.ItemCheckEventArgs e) { if(e.NewValue == CheckState.Checked) { UncheckAllDevices(); vcg = new VideoCaptureGraph((FilterInfo)cklbCameras.SelectedItem); // Create filter and internal graph vcg.RenderNetwork(rtpSender); // Add network filter, connect all filters vcg.Run(); // Send data to network } else // Unchecked { DisposeDevice(); } }
// CF2 (with some changes for network) private void cklbCameras_ItemCheck(object sender, System.Windows.Forms.ItemCheckEventArgs e) { if(e.NewValue == CheckState.Checked) { UncheckAllDevices(); // Create the graph for the device vcg = new VideoCaptureGraph((FilterInfo)cklbCameras.SelectedItem); // Add a compressor and configure it vcg.AddCompressor(VideoCompressor.DefaultFilterInfo()); vcg.VideoCompressor.QualityInfo = VideoCompressor.DefaultQualityInfo; // Add network filter vcg.RenderNetwork(rtpSender); // Send data to network vcg.Run(); } else // Unchecked { DisposeDevice(); } }