6.1-roMediaStreamer

ON THIS PAGE

The current implementation of this object allows a player to stream .ts files over UDP and RTP. For more information, see the BrightSign Media Server section.

Object Creation: The roMediaStreamer object is created with no parameters.

CreateObject("roMediaStreamer") 

ifMediaStreamer

GetFailureReason() As String
 
SetPipeline(pipeline As String) As Boolean

Specifies a streaming pipeline. The source (a file URI) and destination (an IP address) of the stream are specified in the passed stream. This method replaces the SetSource() and SetDestination() methods from firmware version 4.7. To stream media as before, use the filesimple source designation and the udpsimple/rtpsimple destination designations:

Example
m = CreateObject("roMediaStreamer")
m.SetPipeline("filesimple:///data/clip.ts, udpsimple://239.192.0.0:1234/")
m.Start()
Initialize() As Boolean

Progresses the pipeline into the INITIALIZED state. This allocates some resources for the pipeline, but does not begin a stream.

Connect() As Boolean

Progresses the pipeline into the CONNECTED state. This allows the script to create a memory stream without starting it.

Start() As Boolean

Begins streaming.

Stop() As Boolean

Stops the pipeline stream. Some internal pipeline stages may continue running.

Disconnect() As Boolean

Regresses the steam back to the CONNECTED state.

Reset() As Boolean

Resets the pipeline stream. All internal pipeline stages are terminated.

Inject(a As Integer) As Boolean 
 

ifUserData

SetUserData(user_data As Object)

Sets the user data that will be returned when events are raised.

GetUserData() As Object

Returns the user data that has previously been set via SetUserData(). It will return Invalid if no data has been set.

ifMessagePort

SetPort(port As roMessagePort)

Posts messages of type roMediaStreamerEvent to the attached message port.

Source Specifications

The string passed to the roMediaStreamer.SetPepline() method can have unique parameters that determine the source type and playback behavior.

  • Looping: By default, a stream from a media file will not loop when it ends. You can specify a looping parameter at the end of the source string as follows: """filesimple:///data/example.mp4?loop". It is also possible to loop the stream using end-of-stream messages from roMediaStreamerEvent. However, the slightly longer restart gap that results from using BrightScript may cause problems with the streaming client. This is especially true if you attempt to set a new media file source upon looping the function.