DirectX.Capture类库捕获视频时出错 [英] error in capturing video by DirectX.Capture Class Library

查看:168
本文介绍了DirectX.Capture类库捕获视频时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想写一个捕捉视频的聊天程序。我从代码项目中找到了一个带有DirectX.Capture类库标题的项目,用于捕获part.It工作正常但是当我停止捕获并想再次开始捕获时出现错误:

系统资源不足以存在完成所请求的服务。

我搜索了这个错误,据我所知它与内存泄漏有关。

我应该清除内存吗?

我的由于清除内存导致程序损害?

我的代码:

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:

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();

        }

推荐答案

这篇关于DirectX.Capture类库捕获视频时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆