设备默认媒体流 改为 MediaStreamMode.TCP_PASSIVE

This commit is contained in:
shikong 2023-10-06 13:57:12 +08:00
parent 72c11e4625
commit f02d18e1e3

View File

@ -140,14 +140,14 @@ public class RegisterRequestProcessor implements MessageProcessor {
if (device == null) {
device = new DockingDevice();
device.setStreamMode(MediaStreamMode.TCP_ACTIVE.getMode());
device.setStreamMode(MediaStreamMode.TCP_PASSIVE.getMode());
device.setCharset(GB28181Constant.CHARSET);
device.setGeoCoordSys(GB28181Constant.GEO_COORD_SYS);
device.setDeviceId(deviceId);
device.setOnLine(false);
} else {
if (ObjectUtils.isEmpty(device.getStreamMode())) {
device.setStreamMode(MediaStreamMode.TCP_ACTIVE.getMode());
device.setStreamMode(MediaStreamMode.TCP_PASSIVE.getMode());
}
if (ObjectUtils.isEmpty(device.getCharset())) {
device.setCharset(GB28181Constant.CHARSET);