Table of contents

 

 

Introduction

There are two different method groups: management methods and filter specific methods.

The first ones are related to the general management of the system, which includes creating, managing and destroying filters and paths. These actions are executed by PipelineManager.

The second ones are related to specific filter management. Each filter type has its own methods in order to configure itself. These actions are executed by the targeted filter.

Management levels

Both request and response management event messages (both general or specific) are formatted as a JSON string.

An event JSON object message contains:

  • action (string): the method/action to be executed
  • filter_id (number): the id of the filter associated to the action (0 if internal event)
  • delay (number): the execution delay
  • params (object): parameters involved in the action

Then response messages can be:

  • No error:

{ “error” : ”null” }

  • Error:

{ “error” : ”specific error explanation” }

  • If the request was a getState message then:

{

“filters” : [ array of filter objects ] ,

“paths” : [ array of path objects ]

}

 

General management level

Start
DescriptionStarts the system
Data params-
Success responseContent: { “error” : ”null” }
Error responseContent: { “error” : [string error] }

Internal message

{

”action”: ”start”,
”params”: {},
”filterId”: 0,
”delay” : 0

}

Stop
DescriptionStops the system
Data params-
Success responseContent: { “error” : ”null” }
Error responseContent: { “error” : [string error] }

Internal message

{

”action”: ”stop”,
”params”: {},
”filterId”: 0,
”delay” : 0

}

Get state
DescriptionGet the system state
Data params-
Success response{

”filters” : [

{

”id”: [numeric],
”type”: [string],
”: [],
...

},
...

],
”paths” : [

{

”id”: [numeric],
”originFilter”: [numeric],
”destinationFilter”: [numeric],
”originWriter”: [numeric],
”destinationReader”: [numeric],
”filters”: [ [numeric], [numeric], … ]

},
...

]

}
Error responseContent: { “error” : [string error] }

Internal message

{

”action”: ”getState”,
”params”: {},
”filterId”: 0,
”delay” : 0

}

Create filter
DescriptionCreates a new filter
Data params{

”id”: [numeric],
”type”: [string]

}
Success responseContent: { “error” : "null" }
Error responseContent: { “error” : [string error] }

Internal message

{

”action”: ”createFilter”,
”params”: {

”id”: [integer],
”type”: [string]

},
”filterId”: 0,
”delay” : 0

}

Delete filter
DescriptionRemoves a filter
Data params{

”id”: [numeric]

}
Success responseContent: { “error” : "null" }
Error responseContent: { “error” : [string error] }

Internal message

{

”action”: ”removeFilter”,
”params”: {

”id”: [integer]

},
”filterId”: 0,
”delay” : 0

}

Create path
DescriptionCreates a new path
Data params{

”id”: [numeric],
”orgFilterId”: [numeric],
”dstFilterId”: [numeric],
”orgWriterId”: [numeric],
”dstReaderId”: [numeric],
”midFiltersIds”: [ [numeric], [numeric], … ]

}
Success responseContent: { “error” : "null" }
Error responseContent: { “error” : [string error] }

Internal message

{

”action”: ”createPath”,
”params”: {

”id”: [integer],
”orgFilterId”: [integer],
”dstFilterId”: [integer],
”orgWriterId”: [integer],
”dstReaderId”: [integer],
”midFiltersIds”: [ [integer], [integer], … ]

},
”filterId”: 0,
”delay” : 0

}

Delete path
DescriptionRemoves a path
Data params{

”id”: [numeric]

}
Success responseContent: { “error” : "null" }
Error responseContent: { “error” : [string error] }

Internal message

{

”action”: ”removePath”,
”params”: {

 ”id”: [integer]

},
”filterId”: 0,
”delay” : 0

}

Specific filter management level

Receiver
  • Add new RTP input
DescriptionAdds a new input RTP session
Data params{

”filterId”: [numeric],
”port”: [numeric],
”medium”: [string],
”codec”: [string],
”bandwidth”:[numeric],
”timestampFreq”:[numeric],
”channels”:[numeric]

}
Success responseContent: { “error” : "null" }
Error responseContent: { “error” : [string error] }

Internal message

{

”action”: ”addSession”,
”params”: {

”port”: [integer],
”medium”: [string],
”codec”: [string],
”bandwidth”:[integer],
”timesamptFreq”:[integer],
”channels”:[integer]

},
”filterId”: [integer],
”delay” : 0

}

  • Add new RTSP input
DescriptionAdds a new input RTSP session
Data params{

”progName”: [string],
”uri”: [string],
”id”: [string]

}
Success responseContent: { “error” : "null" }
Error responseContent: { “error” : [string error] }

Internal message

{

”action”: ”addSession”,
”params”: {

”progName”: [string],
”uri”: [string],
”id”: [string]

},
”filterId”: [integer],
”delay” : 0

}

Transmitter
  • Add new RTP output
DescriptionAdds a new output RTP session
Data params{

”filterId”: [numeric],
”readers”: [numeric array],
”sessionId”: [numeric]
”ip”: [string],
”port”: [numeric],
”txFormat”: [string]

}
Success responseContent: { “error” : "null" }
Error responseContent: { “error” : [string error] }

Internal message

{

”action”: ”addRTPConnection”,
”params”: {

”readers”: [ [integer], [integer], … ],
”id”: [string],
”ip”: [string],
”port”: [numeric],
”txFormat”: [string]

},
”filterId”: [integer],
”delay” : 0

}

  • Add new RTSP output
DescriptionAdds a new output RTSP session
Data params{

”filterId”: [numeric],
”readers”: [numeric array],
”name”: [string],
”txFormat”: [string],
”info”: [string],
”desc”: [string],
”id”: [numeric],

}
Success responseContent: { “error” : "null" }
Error responseContent: { “error” : [string error] }

Internal message

{

”action”: ”addRTSPConnection”,
”params”: {

    ”readers”: [numeric array],
”name”: [string],
”txFormat”: [string],
”info”: [string],
”desc”: [string],
”id”: [numeric],

},
”filterId”: [integer],
”delay” : 0

}

Video decoder

It is autoconfigured. It depends on the previous filter connected to.

Video resampler
DescriptionConfigures a video resampler
Data params{

”filterId”: [numeric],
”width”: [numeric],
”height”: [numeric],
"discartPeriod": [numeric],
"pixelFormat": [numeric]

}
Success responseContent: { “error” : "null" }
Error responseContent: { “error” : [string error] }

Internal message

{

”action”: ”configure”,
”params”: {

”width” : [integer],
”height” : [integer],
”pixelFormat” : [integer],
”discartPeriod” : [integer]

},
”filterId”: [integer],
”delay” : 0

}

Video encoder
DescriptionConfigures a video encoder
Data params{

”filterId”: [numeric],
”fps” : [integer],
”gop” : [integer],
”bitrate” : [integer],
"lookahead": [integer],
"threads": [integer],
"annexb": [boolean],
"preset":" [string]"

}
Success responseContent: { “error” : "null" }
Error responseContent: { “error” : [string error] }

Internal message

{

”action”: ”configure”,
”params”: {

”fps” : [integer],
”gop” : [integer],
”bitrate” : [integer],
“lookahead”: [integer],
“threads”: [integer],
“annexb”: [boolean],
“preset”:” [string]”

},
”filterId”: [integer],
”delay” : 0

}

Video mixer
DescriptionUpdates a video mixer channel configuration
Data params{

”id”: [numeric],
”width” : [numeric],
”height” : [numeric],
”x” : [numeric],
”y” : [numeric],
”layer” : [numeric],
”opacity” : [numeric],
”enabled” : [boolean]

}
Success responseContent: { “error” : "null" }
Error responseContent: { “error” : [string error] }

Internal message

{

”action”: ”configChannel”,
”params”: {

 ”id” : [integer],
”width” : [float],
”height” : [float],
”x” : [float],
”y” : [float],
”layer” : [int],
”opacity” : [float],
”enabled” : [boolean]

},
”filterId”: [integer],
”delay” : 0

}

Audio decoder

It is autoconfigured. It depends on the previous filter connected to.

Audio encoder
DescriptionConfigures an audio encoder
Data params{

”id”: [numeric],
”codec” : [string],
”sampleRate” : [integer],
”channels” : [integer],
”bitrate” : [float]

}
Success responseContent: { “error” : "null" }
Error responseContent: { “error” : [string error] }

Internal message

{

”action”: ”configure”,
”params”: {

”id” : [integer],
”codec” : [string],
”sampleRate” : [integer],
”channels” : [integer],
”bitrate” : [float]

},
”filterId”: [integer],
”delay” : 0

}

Audio mixer
  • Change master volume
DescriptionChanges audio mixer master channel volume
Data params{

”filterId”: [numeric],
”volume”: [numeric]

}
Success responseContent: { “error” : "null" }
Error responseContent: { “error” : [string error] }

Internal message

{

”action”: ”changeMasterVolume”,
”params”: {

”volume”: [float],

},
”filterId”: [integer],
”delay” : 0

}

  • Change channel volume
DescriptionChanges audio mixer channel volume
Data params{

”filterId”: [numeric],
”id”: [numeric],
”volume”: [numeric]

}
Success responseContent: { “error” : "null" }
Error responseContent: { “error” : [string error] }

Internal message

{

”action”: ”changeChannelVolume”,
”params”: {

”id” : [integer],
”volume” : [float]

},
”filterId”: [integer],
”delay” : 0

}

 

Demuxer
DescriptionConfigure Demuxer input URI
Data params{

”uri”: [string]

}
Success responseContent: { “error” : "null" }
Error responseContent: { “error” : [string error] }

Internal message

{

”action”: ”configure”,
”params”: {

”uri” : [string]

},
”filterId”: [integer],
”delay” : 0

}

Dasher
  • Configure Dasher parameters
DescriptionConfigure Dasher filter with folder, base name and segment duration
Data params{

"filterId": [integer],
"folder": [string],
"baseName": [string],
"segDurInSec": [integer],
"maxSeg": [integer],
"minBuffTime": [integer]

}
Success responseContent: { “error” : "null" }
Error responseContent: { “error” : [string error] }

Internal message

{

”action”: ”configure”,
”params”: {

“folder”: [string],
“baseName”: [string],
“segDurInSec”: [integer],
“maxSeg”: [integer],
“minBuffTime”: [integer]

},
”filterId”: [integer],
”delay” : 0

}

  • Add Dasher segmenter
DescriptionAdd a segmenter to Dasher filter
Data params{

"filterId": [integer],
"id": [integer]

}
Success responseContent: { “error” : "null" }
Error responseContent: { “error” : [string error] }

Internal message

{

”action”: ”addSegmenter”,
”params”: {

“id”: [integer]

},
”filterId”: [integer],
”delay” : 0

}

  • Set Dasher segmenter bitrate
DescriptionSet bitrate to Dasher segmenter
Data params{

"filterId": [integer],
"id": [integer],
"bitrate": [float]

}
Success responseContent: { “error” : "null" }
Error responseContent: { “error” : [string error] }

Internal message

{

”action”: ”setBitrate”,
”params”: {

“id”: [integer],
“bitrate”: [float]

},
”filterId”: [integer],
”delay” : 0

}