StartVideoCapture (DVR version only)
Top  Previous  Next

Description

Starts time-lapse video capture to the AVI file created by CreateVideo. Use StopVideoCapture to end video capture.


Syntax


[VB]
objActiveGeni.StartVideoCapture [Frames = 0 [, Timelapse = 0, Playrate = 0 ]

[C/C++]
HRESULT StartVideoCapture( long Frames, float Timelapse, float Playrate );



Data Types [VB]

Frames : Long
Timelapse : Single (optional)
Playrate : Single (optional)

Parameters
[C/C++]

Frames [in]  
The number of frames to capture. The video capture will stop automatically after the specified number of frames is reached or StopVideoCapture is called. If zero or omitted, the video capture will continue until the disk is full or or StopVideoCapture is called.  
Timelapse [in]  
The interval between consecutive frames in seconds. If zero or omitted, the video will be recorded at the maximum frame rate define by the camera settings and system throughput.  
Playrate [in]  
The frame rate at which AVT file will be played in frames per second. If zero or omitted, the video will be played back at the same rate it was captured.  


Return Values


S_OK  
Success  
E_FAIL  
Failure.  


Example


This VB example demonstrates how to create an AVI file and capture 1000 frames into it.

Private Sub
LoadForm()

ActiveGeni1.CreateVideo "c:\\mycapture.avi"
ActiveGeni1.Acquire = True

End Sub


Private Sub
StartButton_Click()
ActiveGeni1.StartVideoCapture 1000

End Sub


Remarks

The advantage of using this method as opposed to StartCapture is that StartVideoCapture is called after an AVI file is already opened and preallocated with CreateVideo. As a result, the video capture starts immediatelly with no delay.

The Acquire property must be set to TRUE prior to calling this method.

To record compressed AVI files, use ShowCompressionDlg, SetCodec and ShowCodecDlg. If no codec has been selected, ActiveGeni will record AVI files in the uncompressed format, 8- or 24-bits per pixel.

If the external device (typically, a hard drive or memory card) does not have enough space, the capture will stop automatically when the device is full and the CaptureCompleted event will be fired.