...
This object provides advanced synchronization capabilities for video walls and other deployments that require closely calibrated interaction among players. roSyncManager handles all network traffic for masterleader/slave follower synchronization, including the network clock. Multiple synchronization groups are allowed on the same local network and even within the same video wall.
...
Code Block | ||
---|---|---|
| ||
regSec = CreateObject("roRegistrySection", "networking") regSec.Write("ptp_domain", "0") regSec.Flush() RebootSystem() |
...
Object Creation: The roSyncManager object is created with an associative array representing a set of parameters.
...
Specifies whether the unit is running the master/leader instance of roSyncManager.
Synchronize(identifier As String, ms_delay As Integer) As Object
Configures how the master leader unit will broadcast the time-stamped event to other players. It continues to send out this event every second to allow slave follower units that are powered on late to catch up. The network message contains the sync ID, as well as the domain and a timestamp. The timestamp is created at the point when this method is called; however, it can be offset by passing a non-zero ms_delay
, allowing synchronization points to be set slightly in the future and giving the client enough time to switch video files and perform other actions. The event is returned from the call so that the caller can access the timestamp. The identifier
parameter allows scripts to pass a filename, or some other useful marker, to the slave follower units as part of the synchronization message.
Note | ||
---|---|---|
| ||
Because synchronization can involve slave follower units seeking to catch up with the playback of a master leader unit, we recommend using the more efficient MOV/MP4 container format when synchronizing video files. Transport Stream files (MPEG-TS) are also supported, but they must begin with a presentation timestamp (PTS) of 0. Program Stream files (MPEG-PS) are not supported. |
...
Code Block | ||
---|---|---|
| ||
' Create a sync manager with default address and port. aa1=CreateObject("roAssociativeArray") aa1.Domain = "BS1" s=CreateObject("roSyncManager", aa1) p=CreateObject("roMessagePort") s.SetPort(p) ' Create a video player - we're going to play a seamlessly looped file v=CreateObject("roVideoPlayer") v.SetLoopMode(True) ' THIS SECTION IS ONLY DONE BY THE MASTERLEADER ' We're the masterleader unit - send out a synchronize event saying that we're starting. ' playback 1000ms from now s.SetMasterMode(True) msg = s.Synchronize("Blah1", 1000) ' THIS SECTION IS ONLY DONE BY THE SLAVEFOLLOWER ' We're a slavefollower unit, and we're sitting waiting for a sync message. msg=Wait(4000, p) ' EVERYONE DOES THE REST aa=CreateObject("roAssociativeArray") aa.Filename = "Text_1.mov" aa.SyncDomain = msg.GetDomain() aa.SyncId = msg.GetId() aa.SyncIsoTimestamp = msg.GetIsoTimestamp() v.PlayFile(aa) |
...