Configure SPLITMUX-HD-4RT Using HTTP-Based Text Commands
To use the HTTP API's for manipulating custom config mode in SPLITMUX, there are 3 API's to use:
1. Login API to login and get the session ID required by other API's
2. Get Config API to Get Current Settings including output resolution
3. Save Config API used to save the channel settings for a layout.
Login API
Login API shown in below curl command requires username and password and responds with a sessionID in JSON
format shown below.
Request Type: POST
Request Endpoint:/goform/login
curl '<IP_ADDRESS>/goform/login' -X POST --data 'username=root&password=nti'
Note: the single quote marks used in the above command (‘ ‘ ) work with Linux and Mac PCs, but when
using a Windows PC, substitute double quotation marks (“ “ ) instead.
Get Config API requires session ID to be sent in header as below along with a callback function value. The JSON
response will be wrapped in this callback function. Developers can remove this callback function wrapper to get the
JSON object in the format shown below.
Request Type: GET
Request Endpoint: /goform/login
curl '<IP_ADDRESS>/goform/getCustomConfig?callback=callbackfunc' -X GET -H 'Cookie:
sessionId=cm9vdDpudGk6MTE=;'
Response Format:
callbackfunc({
"lout":{ Layout Object
1:{ ID of layout generated by Device. Range from 1 to 10
"nm":"Layout 1", Name of layout given by user or a default layout name in case of new addition
"ch1": { Reference for Channel 1 Object, 4 such objects will be there in each layout
"t":0, Top : position of top left corner of uncropped unzoomed Channel from top of screen in
pixels of output resolution
"l":0, Left: position of top left corner of uncropped unzoomed Channel from left of screen in
pixels of output resolution
"w":90, width: width of the uncropped unzoomed channel in pixels of output resolution
"h": 90, height: height of the uncropped unzoomed channel in pixels of output resolution
"ar": "0", Aspect Ratio: can be ignored by API.
"vl": 1, Volume Left: indicates if Left volume indicator is enabled(1) or disabled(0)
"vr": 1, Volume Right: indicates if right volume indicator is enabled or disabled
"umd": 1, UMD : indicates if UMD display is enabled (1) or disabled (0)
"nm":"Channel 1", Name: Name of channel given by user or a default name. Same name is shown as UMD
"en": 1, Enabled : indicates if channel is enabled or not
"bc": 1, Border Color: indicates the position of border color selected. values can be 0 to 23. Color
values and names are described below
"bw": 1, Border Width: indicates the width of border for this channel. values can be 0 to 50
Page 2
"au": 1, Audio Enabled: inidicates whether audio is enabled for this channel
"tr": 64, Transparency: value from 0 to 64. 64 corresponds to 0% transparency and 0 corresponds
to 100% transparency
"it": 0, Image Top: vertical distance in pixels of input resolution FROM top left corner of Zoomed
but uncropped image TO top left corner of Crop Window (which is the actual area of the
output used by this channel).
"il": 0, Image Left: Horizontal distance in pixels of input resolution FROM top left corner of
Zoomed but uncropped image TO top left corner of Crop Window (which is the actual
area of the output used by this channel).
"iw": 1920, Input resolution of the connected channel( Provided by device, can be set same value in
save API
"ih": 1080, Input resolution of the connected channel ( Provided by device, can be set same value
in save API)
"iz": 100, Zoom percentage. Values should be from 100 to 500
"ct": 0, Crop Window Top: Vertical position of top left corner of output to be used by this channel
in pixels of output resolution
"cl": 0, Crop Window Left: Horizontal position of top left corner of output to be used by this
channel in pixels of output resolution
"cw": 200, Crop Window Width: Width of output to be used by this channel in pixels of output
resolution
"ch": 200, Crop Window Height: Width of output to be used by this channel in pixels of output
resolution
}, (End bracket for the command)
.
.
"ch4":{ …}, 4 channels are provided for each layout (all of the above can be applied to channels
2-4)
"cord": [1, 2, 3, 4, 5] Channel Order: represents which channels are on top. 1 is at top here and 5 ( logo
which is deprecated) at bottom
"logo":{ . } This block is deprecated and should be ignored
"sn": 1, Can be ignored by API
"r": 10, Can be ignored by API
"c": 10, Can be ignored by API
"en": 0, Enabled: indicates if this layout is the active layout or not. Only one layout will be active at
a time.
"res": { resolution: resolution of screen when this layout was saved. If user selects this layout after
changing resolution, GUI should prompt to reorder layout or Change resolution
"w":1080, width of screen in pixels of output resolution
"h": 700 height of screen in pixels of output resolution
}
},
2:{ Further layouts may continue here
}
.
.
}, End of layout object
"loutord": [1, 15, 2, 4] Layout Order: represents the order in which layouts are listed
"cres": { Current Output Resolution:
"w":1080, width of output screen in pixels of output resolution
"h": 700 height of output screen in pixes of output resolution
}
});
To save the settings for a layout, the parameters need to be sent in xml format as shown in below API along with the
current output resolution. Device automatically enables this layout as the active layout. Parameter descriptions are
same as in Get Config API. If save is successful, it responds with code 0 in JSON format
Request Type: POST
Request Endpoint: /goform/saveLayout
. If not it responds with an error message and an error code.
curl 'http://98.17.207.211/goform/saveLayout
Response: {code: 0, msg: "layout saved"}
Please note that behavior of output when Invalid parameters are set is undefined. Developers should take care to
confine output within the resolutions set and its designated window.
Page 4
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.