Previous | Next |
Returns a Long value indicating the time difference between send duration and play duration for each stream.
Syntax
MCMAdmin2.GetPlaySendDelta(StreamID)
Parameter
StreamID
A Long value indicating the unique ID of the stream.
Remarks
With the GetPlaySendDelta property, provided by the IMCMAdim2 hidden interface, you can properly switch between two stream objects. To mimic playlist capabilities by using the SDK, you must open a station and at least two stream objects. The server fires an OnStreamStop event immediately after the first stream object (that is, an on-demand file) finishes playing. Once this event is received, the next stream object is activated. In this case, the end of the first clip is cut off in the player because the client is not given enough time to finish rendering the first stream before new data arrives. When the player receives this new data for the second stream, it flushes everything in the buffer, including any remaining content from the first stream. To prevent this from happening, the program manager uses the GetPlaySendDelta property. The value of this property is calculated based on the time difference between the send and presentation times in the header of every stream. To let the player finish playing the data in its buffer, the program manager remains idle for the duration specified in GetPlaySendDelta before starting the next stream.
You must access this property through the IMCMAdmin2 interface exposed by the NSChannelMgr object. The IMCMAdmin2 interface is a superset of the IMCMAdmin interface. This means that you can access all properties provided by the IMCMAdmin interface plus the GetPlaySendDelta property through the IMCMAdmin2 interface. However, to retrieve the properties, you must follow the steps shown in the following example code.
Example
Private WithEvents stations As NSChannelMgr.NSChannelMgrObj
Private MCMAdmin2 As NSChannelMgr.IMCMAdmin2
Private Delta As Long
Sub Form_Load()
Set stations = New NSChannelMgr.NSChannelMgrObj
Set MCMAdmin2 = stations
stations.Connect "localhost"
Delta = MCMAdimin2.GetPlaySendDelta(dwStreamID)
End Sub
Previous | Next |