Synchronization of several player components

Prev

Next

 






































































































Synchronization of several player components

Description

Synchronization of several player components

It is possible to synchronize several player components.

One component is declared as the master component, the other components are the slave components.

Example:

VideoGrabber2.Synchronized = true
VideoGrabber2.SynchronizationRole = sr_Slave

VideoGrabber3.Synchronized = true
VideoGrabber3.SynchronizationRole = sr_Slave

VideoGrabber1.Synchronized = true
VideoGrabber1.SynchronizationRole = sr_Master
VideoGrabber1.PlayerFileName = "myclip.avi"
VideoGrabber1.AutoStartPlayer = false
VideoGrabber1.OpenPlayer()
VideoGrabber1.StartSynchronized()

This will open the clip in the 3 components at the same time. Starting from now all the player actions below performed on VideoGrabber1 are applied at the same time on VideoGrabber2 and VideoGrabber3:
by invoking the following functions:
OpenPlayer
ClosePlayer
RunPlayerBackwards
PausePlayer
StopPlayer
RunPlayer
RewindPlayer
FastForwardPlayer
by assigning the following properties:
PlayerTimePosition
PlayerFramePosition

Shifting the synchronization position of one slave player

You can set a delta position on a slave player (after the clip is opened on all the components) as follows:

- disable temporarily the Synchronized property on this slave
- set a new position on the slave (with PlayerFramePosition or PlayerTimePosition)
- enable the Synchronized property on this slave

Now all position changes on the master component will be performed on the slave by applying the delta position set while the Synchonized property was disabled.

Look at the SynchronizedPlayers demo project included in the package for sample code.