mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-25 14:37:53 +08:00
Merge branch 'refs/heads/master' into dev/1078-newUI
This commit is contained in:
commit
1a7f517c5a
@ -1,27 +1,16 @@
|
|||||||
package com.genersoft.iot.vmp.gb28181.bean;
|
package com.genersoft.iot.vmp.gb28181.bean;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.sip.Dialog;
|
import javax.sip.Dialog;
|
||||||
import java.util.EventObject;
|
import java.util.EventObject;
|
||||||
|
|
||||||
public class DeviceNotFoundEvent extends EventObject {
|
@Data
|
||||||
|
public class DeviceNotFoundEvent {
|
||||||
|
|
||||||
private String callId;
|
private String callId;
|
||||||
|
|
||||||
/**
|
public DeviceNotFoundEvent(String callId) {
|
||||||
* Constructs a prototypical Event.
|
|
||||||
*
|
|
||||||
* @param dialog
|
|
||||||
* @throws IllegalArgumentException if source is null.
|
|
||||||
*/
|
|
||||||
public DeviceNotFoundEvent(Dialog dialog) {
|
|
||||||
super(dialog);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCallId() {
|
|
||||||
return callId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCallId(String callId) {
|
|
||||||
this.callId = callId;
|
this.callId = callId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -83,17 +83,17 @@ public class SipSubscribe {
|
|||||||
failedResult
|
failedResult
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class EventResult<EventObject>{
|
public static class EventResult<T>{
|
||||||
public int statusCode;
|
public int statusCode;
|
||||||
public EventResultType type;
|
public EventResultType type;
|
||||||
public String msg;
|
public String msg;
|
||||||
public String callId;
|
public String callId;
|
||||||
public EventObject event;
|
public T event;
|
||||||
|
|
||||||
public EventResult() {
|
public EventResult() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public EventResult(EventObject event) {
|
public EventResult(T event) {
|
||||||
this.event = event;
|
this.event = event;
|
||||||
if (event instanceof ResponseEvent) {
|
if (event instanceof ResponseEvent) {
|
||||||
ResponseEvent responseEvent = (ResponseEvent)event;
|
ResponseEvent responseEvent = (ResponseEvent)event;
|
||||||
|
|||||||
@ -120,7 +120,6 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
|
|||||||
List<DeviceChannel> updateChannels = new ArrayList<>();
|
List<DeviceChannel> updateChannels = new ArrayList<>();
|
||||||
HashMap<String, DeviceChannel> channelsInStore = new HashMap<>();
|
HashMap<String, DeviceChannel> channelsInStore = new HashMap<>();
|
||||||
int result = 0;
|
int result = 0;
|
||||||
if (channels != null && !channels.isEmpty()) {
|
|
||||||
List<DeviceChannel> channelList = channelMapper.queryChannelsByDeviceDbId(device.getId());
|
List<DeviceChannel> channelList = channelMapper.queryChannelsByDeviceDbId(device.getId());
|
||||||
if (channelList.isEmpty()) {
|
if (channelList.isEmpty()) {
|
||||||
for (DeviceChannel channel : channels) {
|
for (DeviceChannel channel : channels) {
|
||||||
@ -200,7 +199,6 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
|
|||||||
result += channelMapper.batchUpdate(updateChannelList);
|
result += channelMapper.batchUpdate(updateChannelList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -293,7 +293,7 @@ public class DeviceServiceImpl implements IDeviceService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
log.info("[移除移动位置订阅]失败,设备已经离线 : {}", device.getDeviceId());
|
log.info("[移除目录订阅订阅]失败,设备已经离线 : {}", device.getDeviceId());
|
||||||
if (callback != null) {
|
if (callback != null) {
|
||||||
callback.run(false);
|
callback.run(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -70,10 +70,10 @@ public class SIPSender {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (okEvent != null || errorEvent != null) {
|
|
||||||
CallIdHeader callIdHeader = (CallIdHeader) message.getHeader(CallIdHeader.NAME);
|
CallIdHeader callIdHeader = (CallIdHeader) message.getHeader(CallIdHeader.NAME);
|
||||||
CSeqHeader cSeqHeader = (CSeqHeader) message.getHeader(CSeqHeader.NAME);
|
CSeqHeader cSeqHeader = (CSeqHeader) message.getHeader(CSeqHeader.NAME);
|
||||||
String key = callIdHeader.getCallId() + cSeqHeader.getSeqNumber();
|
String key = callIdHeader.getCallId() + cSeqHeader.getSeqNumber();
|
||||||
|
if (okEvent != null || errorEvent != null) {
|
||||||
SipEvent sipEvent = SipEvent.getInstance(key, eventResult -> {
|
SipEvent sipEvent = SipEvent.getInstance(key, eventResult -> {
|
||||||
sipSubscribe.removeSubscribe(key);
|
sipSubscribe.removeSubscribe(key);
|
||||||
if(okEvent != null) {
|
if(okEvent != null) {
|
||||||
@ -87,7 +87,7 @@ public class SIPSender {
|
|||||||
}), timeout == null ? sipConfig.getTimeout() : timeout);
|
}), timeout == null ? sipConfig.getTimeout() : timeout);
|
||||||
sipSubscribe.addSubscribe(key, sipEvent);
|
sipSubscribe.addSubscribe(key, sipEvent);
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
if ("TCP".equals(transport)) {
|
if ("TCP".equals(transport)) {
|
||||||
SipProviderImpl tcpSipProvider = sipLayer.getTcpSipProvider(ip);
|
SipProviderImpl tcpSipProvider = sipLayer.getTcpSipProvider(ip);
|
||||||
if (tcpSipProvider == null) {
|
if (tcpSipProvider == null) {
|
||||||
@ -112,6 +112,10 @@ public class SIPSender {
|
|||||||
sipProvider.sendResponse((Response) message);
|
sipProvider.sendResponse((Response) message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}catch (SipException e) {
|
||||||
|
sipSubscribe.removeSubscribe(key);
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public CallIdHeader getNewCallIdHeader(String ip, String transport) {
|
public CallIdHeader getNewCallIdHeader(String ip, String transport) {
|
||||||
|
|||||||
@ -70,8 +70,6 @@ public class RegisterRequestProcessor extends SIPRequestProcessorParent implemen
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 收到注册请求 处理
|
* 收到注册请求 处理
|
||||||
*
|
|
||||||
* @param evt
|
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void process(RequestEvent evt) {
|
public void process(RequestEvent evt) {
|
||||||
|
|||||||
@ -98,8 +98,7 @@ public class MessageRequestProcessor extends SIPRequestProcessorParent implement
|
|||||||
log.warn("[设备未找到 ]deviceId: {}, callId: {}", deviceId, callIdHeader.getCallId());
|
log.warn("[设备未找到 ]deviceId: {}, callId: {}", deviceId, callIdHeader.getCallId());
|
||||||
SipEvent sipEvent = sipSubscribe.getSubscribe(callIdHeader.getCallId() + cSeqHeader.getSeqNumber());
|
SipEvent sipEvent = sipSubscribe.getSubscribe(callIdHeader.getCallId() + cSeqHeader.getSeqNumber());
|
||||||
if (sipEvent != null && sipEvent.getErrorEvent() != null){
|
if (sipEvent != null && sipEvent.getErrorEvent() != null){
|
||||||
DeviceNotFoundEvent deviceNotFoundEvent = new DeviceNotFoundEvent(evt.getDialog());
|
DeviceNotFoundEvent deviceNotFoundEvent = new DeviceNotFoundEvent(callIdHeader.getCallId());
|
||||||
deviceNotFoundEvent.setCallId(callIdHeader.getCallId());
|
|
||||||
SipSubscribe.EventResult eventResult = new SipSubscribe.EventResult(deviceNotFoundEvent);
|
SipSubscribe.EventResult eventResult = new SipSubscribe.EventResult(deviceNotFoundEvent);
|
||||||
sipEvent.getErrorEvent().response(eventResult);
|
sipEvent.getErrorEvent().response(eventResult);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,8 +14,8 @@
|
|||||||
"test:ci": "npm run lint && npm run test:unit"
|
"test:ci": "npm run lint && npm run test:unit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@wchbrad/vue-easy-tree": "^1.0.13",
|
|
||||||
"@femessage/log-viewer": "^1.5.0",
|
"@femessage/log-viewer": "^1.5.0",
|
||||||
|
"@wchbrad/vue-easy-tree": "^1.0.13",
|
||||||
"axios": "^0.24.0",
|
"axios": "^0.24.0",
|
||||||
"core-js": "3.6.5",
|
"core-js": "3.6.5",
|
||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
@ -31,6 +31,7 @@
|
|||||||
"strip-ansi": "^7.1.0",
|
"strip-ansi": "^7.1.0",
|
||||||
"v-charts": "^1.19.0",
|
"v-charts": "^1.19.0",
|
||||||
"vue": "2.6.10",
|
"vue": "2.6.10",
|
||||||
|
"vue-clipboard2": "^0.3.3",
|
||||||
"vue-clipboards": "^1.3.0",
|
"vue-clipboards": "^1.3.0",
|
||||||
"vue-contextmenujs": "^1.4.11",
|
"vue-contextmenujs": "^1.4.11",
|
||||||
"vue-router": "3.0.6",
|
"vue-router": "3.0.6",
|
||||||
|
|||||||
@ -16,7 +16,8 @@ import '@/icons' // icon
|
|||||||
import '@/permission' // permission control
|
import '@/permission' // permission control
|
||||||
|
|
||||||
import VueClipboards from 'vue-clipboards'
|
import VueClipboards from 'vue-clipboards'
|
||||||
import Contextmenu from "vue-contextmenujs"
|
import Contextmenu from 'vue-contextmenujs'
|
||||||
|
import VueClipboard from 'vue-clipboard2'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If you don't want to use mock-server
|
* If you don't want to use mock-server
|
||||||
@ -34,6 +35,7 @@ if (process.env.NODE_ENV === 'production') {
|
|||||||
Vue.use(ElementUI)
|
Vue.use(ElementUI)
|
||||||
Vue.use(VueClipboards)
|
Vue.use(VueClipboards)
|
||||||
Vue.use(Contextmenu)
|
Vue.use(Contextmenu)
|
||||||
|
Vue.use(VueClipboard)
|
||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
|
|||||||
@ -60,7 +60,7 @@ export const constantRoutes = [
|
|||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/live',
|
redirect: '/live',
|
||||||
children: [{
|
children: [{
|
||||||
path: 'live',
|
path: '',
|
||||||
name: 'Live',
|
name: 'Live',
|
||||||
component: () => import('@/views/live/index'),
|
component: () => import('@/views/live/index'),
|
||||||
meta: { title: '分屏监控', icon: 'live' }
|
meta: { title: '分屏监控', icon: 'live' }
|
||||||
@ -264,6 +264,17 @@ export const constantRoutes = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/play/wasm/:url',
|
||||||
|
name: 'wasmPlayer',
|
||||||
|
hidden: true,
|
||||||
|
component: () => import('@/views/common/jessibuca.vue')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/play/rtc/:url',
|
||||||
|
name: 'rtcPlayer',
|
||||||
|
component: () => import('@/views/common/rtcPlayer.vue')
|
||||||
|
},
|
||||||
// 404 page must be placed at the end !!!
|
// 404 page must be placed at the end !!!
|
||||||
{ path: '*', redirect: '/404', hidden: true }
|
{ path: '*', redirect: '/404', hidden: true }
|
||||||
]
|
]
|
||||||
|
|||||||
@ -116,9 +116,6 @@ export default {
|
|||||||
height = clientHeight
|
height = clientHeight
|
||||||
width = (16 / 9) * height
|
width = (16 / 9) * height
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$refs.playerBox.style.width = width + 'px'
|
|
||||||
this.$refs.playerBox.style.height = height + 'px'
|
|
||||||
this.playerWidth = width
|
this.playerWidth = width
|
||||||
this.playerHeight = height
|
this.playerHeight = height
|
||||||
if (this.playing) {
|
if (this.playing) {
|
||||||
|
|||||||
@ -111,10 +111,10 @@
|
|||||||
<el-input v-model="getPlayerShared.sharedUrl" :disabled="true">
|
<el-input v-model="getPlayerShared.sharedUrl" :disabled="true">
|
||||||
<template slot="append">
|
<template slot="append">
|
||||||
<i
|
<i
|
||||||
v-clipboard="getPlayerShared.sharedUrl"
|
|
||||||
class="cpoy-btn el-icon-document-copy"
|
class="cpoy-btn el-icon-document-copy"
|
||||||
title="点击拷贝"
|
title="点击拷贝"
|
||||||
@success="$message({type:'success', message:'成功拷贝到粘贴板'})"
|
style="cursor: pointer"
|
||||||
|
@click="copyUrl(getPlayerShared.sharedUrl)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
@ -124,10 +124,10 @@
|
|||||||
<el-input v-model="getPlayerShared.sharedIframe" :disabled="true">
|
<el-input v-model="getPlayerShared.sharedIframe" :disabled="true">
|
||||||
<template slot="append">
|
<template slot="append">
|
||||||
<i
|
<i
|
||||||
v-clipboard="getPlayerShared.sharedIframe"
|
|
||||||
class="cpoy-btn el-icon-document-copy"
|
class="cpoy-btn el-icon-document-copy"
|
||||||
title="点击拷贝"
|
title="点击拷贝"
|
||||||
@success="$message({type:'success', message:'成功拷贝到粘贴板'})"
|
style="cursor: pointer"
|
||||||
|
@click="copyUrl(getPlayerShared.sharedIframe)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
@ -137,10 +137,10 @@
|
|||||||
<el-input v-model="getPlayerShared.sharedRtmp" :disabled="true">
|
<el-input v-model="getPlayerShared.sharedRtmp" :disabled="true">
|
||||||
<el-button
|
<el-button
|
||||||
slot="append"
|
slot="append"
|
||||||
v-clipboard="getPlayerShared.sharedRtmp"
|
|
||||||
icon="el-icon-document-copy"
|
icon="el-icon-document-copy"
|
||||||
title="点击拷贝"
|
title="点击拷贝"
|
||||||
@success="$message({type:'success', message:'成功拷贝到粘贴板'})"
|
style="cursor: pointer"
|
||||||
|
@click="copyUrl(getPlayerShared.sharedIframe)"
|
||||||
/>
|
/>
|
||||||
<el-dropdown v-if="streamInfo" slot="prepend" trigger="click" @command="copyUrl">
|
<el-dropdown v-if="streamInfo" slot="prepend" trigger="click" @command="copyUrl">
|
||||||
<el-button>
|
<el-button>
|
||||||
@ -362,7 +362,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import elDragDialog from '@/directive/el-drag-dialog'
|
import elDragDialog from '@/directive/el-drag-dialog'
|
||||||
import crypto from 'crypto'
|
import crypto from 'crypto'
|
||||||
import rtcPlayer from '../dialog/rtcPlayer.vue'
|
import rtcPlayer from '../common/rtcPlayer.vue'
|
||||||
import jessibucaPlayer from '../common/jessibuca.vue'
|
import jessibucaPlayer from '../common/jessibuca.vue'
|
||||||
import PtzPreset from '../common/ptzPreset.vue'
|
import PtzPreset from '../common/ptzPreset.vue'
|
||||||
import PtzCruising from '../common/ptzCruising.vue'
|
import PtzCruising from '../common/ptzCruising.vue'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user