| | |
| | | DeviceChannel deviceChannel = new DeviceChannel();
|
| | | deviceChannel.setName(channelName);
|
| | | deviceChannel.setChannelId(channelDeviceId);
|
| | | if (status.equals("ON") || status.equals("On")) {
|
| | | // ONLINE OFFLINE HIKVISION DS-7716N-E4 NVR的兼容性处理
|
| | | if (status.equals("ON") || status.equals("On") || status.equals("ONLINE")) {
|
| | | deviceChannel.setStatus(1);
|
| | | }
|
| | | if (status.equals("OFF") || status.equals("Off")) {
|
| | | if (status.equals("OFF") || status.equals("Off") || status.equals("OFFLINE")) {
|
| | | deviceChannel.setStatus(0);
|
| | | }
|
| | |
|
| | |
| | | device.setStreamMode("UDP");
|
| | | }
|
| | | storager.updateDevice(device);
|
| | | cmder.catalogQuery(device);
|
| | | cmder.catalogQuery(device, null);
|
| | | // 回复200 OK
|
| | | responseAck(evt);
|
| | | if (offLineDetector.isOnline(deviceId)) {
|
| | |
| | | StreamInfo streamInfo = storager.queryPlaybackByDevice(deviceId, "*");
|
| | | if (streamInfo != null) {
|
| | | storager.stopPlayback(streamInfo);
|
| | | cmder.streamByeCmd(streamInfo.getSsrc());
|
| | | cmder.streamByeCmd(streamInfo.getStreamId());
|
| | | }
|
| | | }
|
| | | } catch (ParseException | SipException | InvalidArgumentException | DocumentException e) {
|