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]
objActiveGeni.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 ActiveGeni 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 ActiveGeni objects.

Private Sub Form_Load()  
ActiveGeni1.OpenVideo "C:\\video1.avi"  
ActiveGeni2.OpenVideo "C:\\video2.avi"  
ActiveGeni1.SetVideoSync 1  
ActiveGeni2.SetVideoSync 1  
ActiveGeni1.PlayVideo  
ActiveGeni2.PlayVideo  
fps=ActiveGeni1.GetVideoFPS  
Timer1.Interval=1000/fps  
End Sub  
 
Private Sub Timer1_Timer()  
ActiveGeni1.TriggerVideo  
ActiveGeni2.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.