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?