roMediaServer

 

The roMediaServer object waits for client requests, deals with negotiation, and ultimately generates an roMediaStreamer pipeline to fulfill the request. For more information, see the BrightSign Media Server section. The JavaScript equivalent is node-media-server.

This object currently supports RTSP and HTTP requests. Requests from the client must take the following form:

protocol://IP_address:port/media_streamer_pipeline
  • protocol: Either rtsp or http

  • IP_address:port: The IP address of the BrightSign player and the port number on which the media server is running.

  • media_streamer_pipeline: A media streamer pipeline, but without the final destination component (as the destination is implicit in the request from the client).

Object Creation: The roMediaServer object is created with no parameters

CreateObject("roMediaServer")

ifMediaServer

GetFailureReason() As String

Returns useful information if the Start(), Stop(), or Terminate() methods return False.

Start(a As String) As Boolean

Begins a media server instance. This method can be passed a string that specifies the streaming protocol and the port number of the server:

s = CreateObject("roMediaServer") s.Start("http:port=8080")

A number of optional parameters can be added after the port parameter using an "&" (ampersand):

  • trace: Displays a trace of messages in the negotiation with the client. This parameter is useful particularly for debugging RTSP sessions. For example: "rtsp:port=554&trace"

  • maxbitrate: Sets the maximum instantaneous bitrate (in Kbps) of the RTP transfer initiated by RTSP. This parameter has no effect for HTTP. The parameter value 80000 (i.e. 80Mbps) has been found to work well. The default behavior (also achieved by passing a zero value) is to not limit the bitrate at all. For example: "rtsp:port=554&trace&maxbitrate=80000"

  • threads: Sets the maximum number of threads the server is prepared to have running. Each thread handles a single client request. The default value is "5". For example: "http:port=8080&threads=10"

Stop() As Boolean

Stops the media server. This method signals all threads to stop, but does not wait for this to happen before destroying the server instance.

Terminate() As Boolean

Stops the media server. This method waits for all threads to stop before destroying the server instance.

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 to the attached message port.

ifIdentity

GetIdentity() As Integer

The ifIdentity interface has been deprecated. We recommend using the ifUserData interface instead.

ON THIS PAGE