0

I have used the sample code of DirectShow in order to record a video. however, I want to display the video during recording as well. But I can't do it at the same time, this error always shows:

' Const VIDEODEVICE As Integer = 0
' zero based index of video capture device to use
Cursor.Current = Cursors.WaitCursor

If cam Is Nothing Then
    cam = New AsfFilter.Capture(VIDEODEVICE, textBox1.Text)
    previewCamera(PictureBox1) <----- this is my code regarding on previewing the video recording.
    cam.Start()

    button1.Text = "Stop"
    textBox1.[ReadOnly] = True
Else
    button1.Text = "Start"
    textBox1.[ReadOnly] = False

    ' Pause the recording
    cam.Pause()

    ' Close it down
    cam.Dispose()
    cam = Nothing
End If

Cursor.Current = Cursors.[Default]

Error:

Insufficient system resources exist to complete the requested service. (Exception from HRESULT: 0x800705AA)

What am I doing wrong? Did somebody know of this?

4

1 回答 1

0

0x800705AAERROR_NO_SYSTEM_RESOURCES“系统资源不足,无法完成请求的服务。”

这是您需要知道的事情:视频捕获设备是专有访问资源。您使用它一次,您不能在另一个过滤器图表上再次使用它(即一个用于记录的图表,另一个用于监控)。您必须有单个过滤器图来托管视频捕获。从那里,您可以使用 Smart Tee Filter 或Infinite Pin Tee Filter在录制和监控腿上复制视频馈送。或者,或者,使用多图解决方案,在单个图上进行静态视频捕获。

于 2013-01-18T06:00:11.737 回答