SetVideoSync (DVR version only)
Top  Previous  Next

Description

Sets the playback synchronization mode (freerun or triggered) for the currently open video file or memory sequence. Used in combination with PlayVideo.

Syntax


[VB]
objActiveGige.SetVideoSync Mode


[C/C++]
HRESULT SetVideoSync(short Mode);


Data Types
[VB]

   Mode: Integer


Parameters
[C/C++]

Mode [in]  
The synchronization mode of the currently open video source. Select one of the following values:  
0 - internal (freerun) synchronization. Video will be played by ActiveGige at the currently set frame rate.  
1 - external (triggered) synchronization. Video will advanced to the next frame when TriggerVideo is called.  
        

Return Values

S_OK  
Success  
E_FAIL  
Failure.  

Example


This VB example shows how to synchronously play two AVI files using two ActiveGige objects.

Private Sub Form_Load()  
ActiveGige1.OpenVideo "C:\\video1.avi"  
ActiveGige2.OpenVideo "C:\\video2.avi"  
ActiveGige1.SetVideoSync 1  
ActiveGige2.SetVideoSync 1  
ActiveGige1.PlayVideo  
ActiveGige2.PlayVideo  
fps=ActiveGige1.GetVideoFPS  
Timer1.Interval=1000/fps  
End Sub  
 
Private Sub Timer1_Timer()  
ActiveGige1.TriggerVideo  
ActiveGige2.TriggerVideo  
End Sub  
 

Remarks


When the video file or sequence has just been opened, the playback is set to the internal synchronization.

Setting the video playback to the external synchronization mode is necessary when two video files or sequences need to be played synchronously.

Note that the external synchronization cannot be applied to an AVI files opened with the sound option.