mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-24 05:57:49 +08:00
增加RPC调用停止实时流播放
This commit is contained in:
parent
d69b5d810b
commit
152a4954aa
@ -119,5 +119,23 @@ public class RedisRpcPlayServiceImpl implements IRedisRpcPlayService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void stop(String serverId, InviteSessionType type, int channelId, String stream) {
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
jsonObject.put("channelId", channelId);
|
||||||
|
jsonObject.put("stream", stream);
|
||||||
|
jsonObject.put("inviteSessionType", type);
|
||||||
|
RedisRpcRequest request = buildRequest("channel/stop", jsonObject.toJSONString());
|
||||||
|
request.setToId(serverId);
|
||||||
|
RedisRpcResponse response = redisRpcConfig.request(request, 50);
|
||||||
|
if (response == null) {
|
||||||
|
throw new ControllerException(ErrorCode.ERROR100.getCode(), ErrorCode.ERROR100.getMsg());
|
||||||
|
}else {
|
||||||
|
if (response.getStatusCode() != Response.OK) {
|
||||||
|
throw new ControllerException(ErrorCode.ERROR100.getCode(), ErrorCode.ERROR100.getMsg());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user