Programming approach

<< Click to Display Table of Contents >>

Navigation:  Movie >

Programming approach

 

The programming approach for both, the DLL and the ActiveX control, in principle is the same :

 

1.Create an Movie Recorder object with CreateMovie2Recorder or CreateMovie2RecorderEx
(this is done internally when using the ActiveX control, so ActiveX users won't have to worry about this).
 

2.Make all the settings necessary for AVI recording.
Some settings (Codec, Framerate, etc.) have sensible default values.
Two settings the user must define before start recording AVI files: The filename and the source image.
 

3.Start recording.
This is initiated by calling the respective method (Movie2StartRecording) or function (StartRecording).
Depending on your acquisition mode this either

starts the automatic recording of the AVI file (Synchronous or Asynchronous mode) or

allows frames to be added with the Movie2AddFrame method or the function AddFrame.
 

4.When finished, stop recording by calling ReleaseObject. Again, ActiveX control users don't have to worry about this.

 

Have a look at the descriptions of the above mentioned (and of course also the other) functions and properties in this documentation to get details about their calling parameters and return values.
Also it is a good idea to look at the sample applications provided with the Movie tool to get an illustration of the above-mentioned.

 

Refer %CVB%Tutorial\Movie2 directory.