コード例 #1
0
        void CameraCapture(int number_cramera, int indexDevice)
        {
            Global.Addlist_device_camera();
            VideoCaptureDevice CaptureDeviceFrame = new VideoCaptureDevice(Global.cameraDeviec[indexDevice].MonikerString);

            CaptureDeviceFrame.NewFrame += new NewFrameEventHandler(CaptureNewFrame);
            CameraCaptureSet(CaptureDeviceFrame, indexDevice);
            CaptureDeviceFrame.VideoResolution = CaptureDeviceFrame.VideoCapabilities[Convert.ToInt32(Global.setResolution_List[indexDevice])];
            Global.CaptureDeviceFrame_pool.Add(CaptureDeviceFrame);
            Thread theard       = Thread.CurrentThread;
            string souce_device = CaptureDeviceFrame.Source;

            Global.DirCameraThr.Add(CaptureDeviceFrame.GetHashCode().ToString(), theard.Name);
            Global.DirCameraThr.Add(theard.Name, 0.ToString());
            CaptureDeviceFrame.Start();
            logs_box(Logs_txt.theard_start + number_cramera);
        }