Browse Source
Merge pull request #2 from lawrencehj/master
增加GB网络校时功能
pull/1/head
648540858
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with
15 additions and
5 deletions
-
.gitignore
-
BIN
libs/jain-sip-ri-1.3.0-91.jar
-
pom.xml
-
src/main/java/com/genersoft/iot/vmp/storager/redis/VideoManagerRedisStoragerImpl.java
-
src/main/java/com/genersoft/iot/vmp/vmanager/play/PlayController.java
-
web_src/src/components/channelList.vue
-
web_src/src/components/gb28181/devicePlayer.vue
|
|
@ -11,7 +11,7 @@ |
|
|
|
.mtj.tmp/ |
|
|
|
|
|
|
|
# Package Files # |
|
|
|
*.jar |
|
|
|
#*.jar |
|
|
|
*.war |
|
|
|
*.nar |
|
|
|
*.ear |
|
|
|
|
|
@ -123,6 +123,8 @@ |
|
|
|
<groupId>javax.sip</groupId> |
|
|
|
<artifactId>jain-sip-ri</artifactId> |
|
|
|
<version>1.3.0-91</version> |
|
|
|
<scope>system</scope> |
|
|
|
<systemPath>${basedir}/libs/jain-sip-ri-1.3.0-91.jar</systemPath> |
|
|
|
</dependency> |
|
|
|
<dependency> |
|
|
|
<groupId>org.dom4j</groupId> |
|
|
|
|
|
@ -155,6 +155,13 @@ public class VideoManagerRedisStoragerImpl implements IVideoManagerStorager { |
|
|
|
"_" + "*"; |
|
|
|
// List<Object> deviceChannelList = redis.keys(queryStr);
|
|
|
|
List<Object> deviceChannelList = redis.scan(queryStr); |
|
|
|
//对查询结果排序,避免出现通道排列顺序乱序的情况
|
|
|
|
Collections.sort(deviceChannelList,new Comparator<Object>(){ |
|
|
|
@Override |
|
|
|
public int compare(Object o1, Object o2) { |
|
|
|
return o1.toString().compareToIgnoreCase(o2.toString()); |
|
|
|
} |
|
|
|
}); |
|
|
|
pageResult.setPage(page); |
|
|
|
pageResult.setCount(count); |
|
|
|
pageResult.setTotal(deviceChannelList.size()); |
|
|
|
|
|
@ -58,13 +58,13 @@ public class PlayController { |
|
|
|
|
|
|
|
} |
|
|
|
String streamId = String.format("%08x", Integer.parseInt(streamInfo.getSsrc())).toUpperCase(); |
|
|
|
// 等待推流, TODO 默认超时15s
|
|
|
|
// 等待推流, TODO 默认超时30s
|
|
|
|
boolean lockFlag = true; |
|
|
|
long startTime = System.currentTimeMillis(); |
|
|
|
|
|
|
|
while (lockFlag) { |
|
|
|
try { |
|
|
|
if (System.currentTimeMillis() - startTime > 15 * 1000) { |
|
|
|
if (System.currentTimeMillis() - startTime > 30 * 1000) { |
|
|
|
storager.stopPlay(streamInfo); |
|
|
|
return new ResponseEntity<String>("timeout",HttpStatus.OK); |
|
|
|
}else { |
|
|
|
|
|
@ -54,7 +54,8 @@ |
|
|
|
<el-table-column label="操作" width="280" align="center" fixed="right"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button-group> |
|
|
|
<el-button size="mini" icon="el-icon-video-play" v-if="scope.row.parental == 0" @click="sendDevicePush(scope.row)">播放</el-button> |
|
|
|
<!-- <el-button size="mini" icon="el-icon-video-play" v-if="scope.row.parental == 0" @click="sendDevicePush(scope.row)">播放</el-button> --> |
|
|
|
<el-button size="mini" icon="el-icon-video-play" @click="sendDevicePush(scope.row)">播放</el-button> |
|
|
|
<el-button size="mini" icon="el-icon-switch-button" type="danger" v-if="scope.row.play" @click="stopDevicePush(scope.row)">停止</el-button> |
|
|
|
<el-button size="mini" icon="el-icon-s-open" type="primary" v-if="scope.row.parental == 1" @click="changeSubchannel(scope.row)">查看</el-button> |
|
|
|
<!-- <el-button size="mini" icon="el-icon-video-camera" type="primary" >设备录象</el-button>--> |
|
|
|
|
|
@ -127,7 +127,7 @@ export default { |
|
|
|
realHasAudio = true; |
|
|
|
} |
|
|
|
} |
|
|
|
this.hasaudio = realHasAudio; //&& this.hasaudio; |
|
|
|
this.hasaudio = realHasAudio && this.hasaudio; |
|
|
|
} |
|
|
|
this.ssrc = streamInfo.ssrc; |
|
|
|
this.deviceId = deviceId; |
|
|
|