ON THIS PAGE
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 master/slave synchronization, including the network clock. Multiple synchronization groups are allowed on the same local network and even within the same video wall.
Before using roSyncManager, you will need to instantiate a synchronization group by setting all players within the group to the same PTP domain value. To do this, use the roRegistrySection.Write() method to set the ptp_domain
key of the “networking” section to a value between 0 and 127. In general, changes to the registry only take effect after a reboot, so the PTP synchronization service will start on each player after it is rebooted.
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.
CreateObject("roSyncManager", parameters as roAssociativeArray)
The associative array can have the following parameters:
Domain
: A string that is used to distinguish among different roSyncManager instances within the same synchronization group (i.e. PTP domain). The default string is "BrightSign". This parameter allows multiple roSyncManager instances to operate at the same time.MulticastAddress
: A string specifying to which multicast address synchronization messages are communicated. The default address is "224.0.126.10".MulticastPort
: A string specifying to which multicast port synchronization messages are communicated. The default port is "1539".
ifMessagePort
SetPort(port As roMessagePort)
ifSyncManager
SetMasterMode(master_mode As Boolean) As Boolean
Specifies whether the unit is running the master instance of roSyncManager.
Synchronize(identifier As String, ms_delay As Integer) As Object
Configures how the master unit will broadcast the time-stamped event to other players. It continues to send out this event every second to allow slave 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 units as part of the synchronization message.
Note
Because synchronization can involve slave units seeking to catch up with the playback of a master 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.
Currently, there are two objects that can accept synchronization parameters: The roVideoPlayer.PlayFile() call accepts the parameters provided by ifSyncManagerEvent messages, while the roImagePlayer.DisplayFile() and roImagePlayer.PreloadFile() calls accept SyncIsoTimestamp
in an associative array. To synchronize image playback, an roImagePlayer object will simply delay the transition thread prior to running the transition. If there is a separate call for DisplayFile()
, then the transition will be cancelled and the image will be displayed immediately (as with non-synchronized DisplayFile()
calls).
' 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 MASTER ' We're the master 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 SLAVE ' We're a slave 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)