Click here to Skip to main content
15,878,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to write a chat program that capturing video. I found a project from code project with DirectX.Capture Class Library title for capturing part.It works correctly but when i stoped capturing and want to start capturing again there is an error:
Insufficient system resources exist to complete the requested service.
I searched this error,as i understand it relates to memory leak.
Should i clear memory?
Does my program harm because of clearing memory?
my code:
XML
Filters fl = new Filters();
Capture capture;
private void btnCaptureFilm_Click(object sender, EventArgs e)
        {
            capture = new Capture(fl.VideoInputDevices[0], fl.AudioInputDevices[0]);
            capture.Filename = D:\\MyVide-anyany.avi;
            capture.PreviewWindow = pbFilm;
            capture.Start();
            btnCaptureFilm.Enabled = false;
        }

        private void btnStopCapture_Click(object sender, EventArgs e)
        {
            capture.Stop();
            btnCaptureFilm.Enabled = true;
            this.Close();

        }
Posted
Updated 30-Jun-14 20:38pm
v5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900