screenId:screen的id;
deviceId:device的id;
name:图层的名称;
layerId:模板开窗自定义图层的id;
sizeType:定义如下:
[
0:SL,
1:DL,
2:4K
];
type:图层的类型,定义如下:
[
0:mix,
1:SL,
2:remapping
];
zorder:图层的z序;
source:图层的源信息;
window:图层的位置信息;
color:无源图层颜色
zorder:图层的z序;
isBackground:图层是否为所在screen的背景;
width、height:图层的宽度和高度;
x、y:图层的坐标
"sourceType :源类型,定义如下:
[
0:无源,
1:输入类型,
3:IPC类型,
4:纯色图层
5:IPC拼接类
];
inputId :源的id。
cropId:截取源id, 为255时,表示使用原始源
isAvailable:图层的音频是否可用,(readonly)
isOpen:图层的音频是否打开播放。(r/w)
lock: 图层是否锁定
connectCapacity: 链接容量{
"body":{
"deviceId":0,
"screenId":3,
"layers":[
{
"layerId":0,
"general":{
"layerId":0,
"zorder":0,
"name":"图层1",
"isBackground":false,
"isFreeze":false,
"flipType":0
},
"lock":0,
"source":{
"sourceType":1,
"inputId":4,
"cropId":255,
"interfaceType":10,
"connectCapacity":0,
"name":"input 2-1"
},
"window":{
"width":960,
"height":540,
"x":1000,
"y":1000
}
},
{
"layerId":1,
"general":{
"layerId":1,
"zorder":1,
"name":"图层2",
"isBackground":false,
"isFreeze":false,
"flipType":0
},
"lock":0,
"source":{
"sourceType":1,
"inputId":5,
"cropId":255,
"interfaceType":10,
"connectCapacity":0,
"name":"input 2-2"
},
"window":{
"width":960,
"height":540,
"x":1960,
"y":1000
}
},
{
"layerId":2,
"general":{
"layerId":2,
"zorder":2,
"name":"图层3",
"isBackground":false,
"isFreeze":false,
"flipType":0
},
"lock":0,
"source":{
"sourceType":1,
"inputId":6,
"cropId":255,
"interfaceType":10,
"connectCapacity":0,
"name":"input 2-3"
},
"window":{
"width":960,
"height":540,
"x":1000,
"y":1540
}
},
{
"layerId":3,
"general":{
"layerId":3,
"zorder":3,
"name":"图层4",
"isBackground":false,
"isFreeze":false,
"flipType":0
},
"lock":0,
"source":{
"sourceType":1,
"inputId":7,
"cropId":255,
"interfaceType":10,
"connectCapacity":0,
"name":"input 2-4"
},
"window":{
"width":960,
"height":540,
"x":1960,
"y":1540
}
}
]
},
"sign":"MjI0OGYzMGQwMjhlMmI4YTNmMjM2MjE3MjYzYTFkODg=",
"pId":"1",
"timeStamp":"1631949094265"
}curl --location --request POST '/open/api/layer/screenLayerLayout' \
--header 'Content-Type: application/json' \
--data-raw '{
"body":{
"deviceId":0,
"screenId":3,
"layers":[
{
"layerId":0,
"general":{
"layerId":0,
"zorder":0,
"name":"图层1",
"isBackground":false,
"isFreeze":false,
"flipType":0
},
"lock":0,
"source":{
"sourceType":1,
"inputId":4,
"cropId":255,
"interfaceType":10,
"connectCapacity":0,
"name":"input 2-1"
},
"window":{
"width":960,
"height":540,
"x":1000,
"y":1000
}
},
{
"layerId":1,
"general":{
"layerId":1,
"zorder":1,
"name":"图层2",
"isBackground":false,
"isFreeze":false,
"flipType":0
},
"lock":0,
"source":{
"sourceType":1,
"inputId":5,
"cropId":255,
"interfaceType":10,
"connectCapacity":0,
"name":"input 2-2"
},
"window":{
"width":960,
"height":540,
"x":1960,
"y":1000
}
},
{
"layerId":2,
"general":{
"layerId":2,
"zorder":2,
"name":"图层3",
"isBackground":false,
"isFreeze":false,
"flipType":0
},
"lock":0,
"source":{
"sourceType":1,
"inputId":6,
"cropId":255,
"interfaceType":10,
"connectCapacity":0,
"name":"input 2-3"
},
"window":{
"width":960,
"height":540,
"x":1000,
"y":1540
}
},
{
"layerId":3,
"general":{
"layerId":3,
"zorder":3,
"name":"图层4",
"isBackground":false,
"isFreeze":false,
"flipType":0
},
"lock":0,
"source":{
"sourceType":1,
"inputId":7,
"cropId":255,
"interfaceType":10,
"connectCapacity":0,
"name":"input 2-4"
},
"window":{
"width":960,
"height":540,
"x":1960,
"y":1540
}
}
]
},
"sign":"MjI0OGYzMGQwMjhlMmI4YTNmMjM2MjE3MjYzYTFkODg=",
"pId":"1",
"timeStamp":"1631949094265"
}'{"data":{},"msg":"","status":0}