Commit ef19b4f85ff6442fbf87ae5c447575b0852fe463
Committed by
GitHub
Merge pull request #2 from lawrencehj/master
增加GB网络校时功能
Showing
7 changed files
with
15 additions
and
5 deletions
.gitignore
libs/jain-sip-ri-1.3.0-91.jar
0 → 100644
No preview for this file type
pom.xml
| ... | ... | @@ -123,6 +123,8 @@ |
| 123 | 123 | <groupId>javax.sip</groupId> |
| 124 | 124 | <artifactId>jain-sip-ri</artifactId> |
| 125 | 125 | <version>1.3.0-91</version> |
| 126 | + <scope>system</scope> | |
| 127 | + <systemPath>${basedir}/libs/jain-sip-ri-1.3.0-91.jar</systemPath> | |
| 126 | 128 | </dependency> |
| 127 | 129 | <dependency> |
| 128 | 130 | <groupId>org.dom4j</groupId> | ... | ... |
src/main/java/com/genersoft/iot/vmp/storager/redis/VideoManagerRedisStoragerImpl.java
| ... | ... | @@ -155,6 +155,13 @@ public class VideoManagerRedisStoragerImpl implements IVideoManagerStorager { |
| 155 | 155 | "_" + "*"; |
| 156 | 156 | // List<Object> deviceChannelList = redis.keys(queryStr); |
| 157 | 157 | List<Object> deviceChannelList = redis.scan(queryStr); |
| 158 | + //对查询结果排序,避免出现通道排列顺序乱序的情况 | |
| 159 | + Collections.sort(deviceChannelList,new Comparator<Object>(){ | |
| 160 | + @Override | |
| 161 | + public int compare(Object o1, Object o2) { | |
| 162 | + return o1.toString().compareToIgnoreCase(o2.toString()); | |
| 163 | + } | |
| 164 | + }); | |
| 158 | 165 | pageResult.setPage(page); |
| 159 | 166 | pageResult.setCount(count); |
| 160 | 167 | pageResult.setTotal(deviceChannelList.size()); | ... | ... |
src/main/java/com/genersoft/iot/vmp/vmanager/play/PlayController.java
| ... | ... | @@ -58,13 +58,13 @@ public class PlayController { |
| 58 | 58 | |
| 59 | 59 | } |
| 60 | 60 | String streamId = String.format("%08x", Integer.parseInt(streamInfo.getSsrc())).toUpperCase(); |
| 61 | - // 等待推流, TODO 默认超时15s | |
| 61 | + // 等待推流, TODO 默认超时30s | |
| 62 | 62 | boolean lockFlag = true; |
| 63 | 63 | long startTime = System.currentTimeMillis(); |
| 64 | 64 | |
| 65 | 65 | while (lockFlag) { |
| 66 | 66 | try { |
| 67 | - if (System.currentTimeMillis() - startTime > 15 * 1000) { | |
| 67 | + if (System.currentTimeMillis() - startTime > 30 * 1000) { | |
| 68 | 68 | storager.stopPlay(streamInfo); |
| 69 | 69 | return new ResponseEntity<String>("timeout",HttpStatus.OK); |
| 70 | 70 | }else { | ... | ... |
web_src/src/components/channelList.vue
| ... | ... | @@ -54,7 +54,8 @@ |
| 54 | 54 | <el-table-column label="操作" width="280" align="center" fixed="right"> |
| 55 | 55 | <template slot-scope="scope"> |
| 56 | 56 | <el-button-group> |
| 57 | - <el-button size="mini" icon="el-icon-video-play" v-if="scope.row.parental == 0" @click="sendDevicePush(scope.row)">播放</el-button> | |
| 57 | + <!-- <el-button size="mini" icon="el-icon-video-play" v-if="scope.row.parental == 0" @click="sendDevicePush(scope.row)">播放</el-button> --> | |
| 58 | + <el-button size="mini" icon="el-icon-video-play" @click="sendDevicePush(scope.row)">播放</el-button> | |
| 58 | 59 | <el-button size="mini" icon="el-icon-switch-button" type="danger" v-if="scope.row.play" @click="stopDevicePush(scope.row)">停止</el-button> |
| 59 | 60 | <el-button size="mini" icon="el-icon-s-open" type="primary" v-if="scope.row.parental == 1" @click="changeSubchannel(scope.row)">查看</el-button> |
| 60 | 61 | <!-- <el-button size="mini" icon="el-icon-video-camera" type="primary" >设备录象</el-button>--> | ... | ... |
web_src/src/components/gb28181/devicePlayer.vue