CreateVideo (DVR version only)
Top  Previous  Next

Description

Creates an AVI file for the video recording and preallocates its size. Used in combination with StartVideoCapture and StopVideoCapture.


Syntax


[VB]
objActiveGige.CreateVideo File [, Size = 0]


[C/C++]
HRESULT CreateVideo( bstr File, long Size);



Data Types [VB]

File : String
Size : Long (optional)

Parameters
[C/C++]

File [in]  
The string containing the path to the AVI file to be created.  
Size [in]  
The size of the file to allocate, in bytes.  


Return Values


S_OK  
Success  
E_FAIL  
Failure  
E_INVALIDARG  
Invalid file name  
E_OUTOFMEMORY  
Not enough space to allocate  


Example


This VB example demonstrates how to preallocate an AVI file with the size of 80 MBytes and perform the video capture.

Private Sub
LoadForm()

ActiveGige1.CreateVideo "c:\\mycapture.avi",
80000000
ActiveGige1.Acquire = True

End Sub


Private Sub
StartButton_Click()
ActiveGige1.StartVideoCapture

End Sub


Private Sub
StopButton_Click()
ActiveGige1.StopVideoCapture

End Sub



Remarks

Use this method to create an AVI file and perform an initialization of the currently selected video codec prior to calling StartVideoCapture.

It is recommended to allocate enough space to accommodate the length of a typical video recording. If the allocated size is not sufficient, the video capture engine will append the AVI file on the fly, but this may reduce the recording throughput and result to frames being dropped.