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,6 +123,8 @@ | ||
| 123 | <groupId>javax.sip</groupId> | 123 | <groupId>javax.sip</groupId> |
| 124 | <artifactId>jain-sip-ri</artifactId> | 124 | <artifactId>jain-sip-ri</artifactId> |
| 125 | <version>1.3.0-91</version> | 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 | </dependency> | 128 | </dependency> |
| 127 | <dependency> | 129 | <dependency> |
| 128 | <groupId>org.dom4j</groupId> | 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,6 +155,13 @@ public class VideoManagerRedisStoragerImpl implements IVideoManagerStorager { | ||
| 155 | "_" + "*"; | 155 | "_" + "*"; |
| 156 | // List<Object> deviceChannelList = redis.keys(queryStr); | 156 | // List<Object> deviceChannelList = redis.keys(queryStr); |
| 157 | List<Object> deviceChannelList = redis.scan(queryStr); | 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 | pageResult.setPage(page); | 165 | pageResult.setPage(page); |
| 159 | pageResult.setCount(count); | 166 | pageResult.setCount(count); |
| 160 | pageResult.setTotal(deviceChannelList.size()); | 167 | pageResult.setTotal(deviceChannelList.size()); |
src/main/java/com/genersoft/iot/vmp/vmanager/play/PlayController.java
| @@ -58,13 +58,13 @@ public class PlayController { | @@ -58,13 +58,13 @@ public class PlayController { | ||
| 58 | 58 | ||
| 59 | } | 59 | } |
| 60 | String streamId = String.format("%08x", Integer.parseInt(streamInfo.getSsrc())).toUpperCase(); | 60 | String streamId = String.format("%08x", Integer.parseInt(streamInfo.getSsrc())).toUpperCase(); |
| 61 | - // 等待推流, TODO 默认超时15s | 61 | + // 等待推流, TODO 默认超时30s |
| 62 | boolean lockFlag = true; | 62 | boolean lockFlag = true; |
| 63 | long startTime = System.currentTimeMillis(); | 63 | long startTime = System.currentTimeMillis(); |
| 64 | 64 | ||
| 65 | while (lockFlag) { | 65 | while (lockFlag) { |
| 66 | try { | 66 | try { |
| 67 | - if (System.currentTimeMillis() - startTime > 15 * 1000) { | 67 | + if (System.currentTimeMillis() - startTime > 30 * 1000) { |
| 68 | storager.stopPlay(streamInfo); | 68 | storager.stopPlay(streamInfo); |
| 69 | return new ResponseEntity<String>("timeout",HttpStatus.OK); | 69 | return new ResponseEntity<String>("timeout",HttpStatus.OK); |
| 70 | }else { | 70 | }else { |
web_src/src/components/channelList.vue
| @@ -54,7 +54,8 @@ | @@ -54,7 +54,8 @@ | ||
| 54 | <el-table-column label="操作" width="280" align="center" fixed="right"> | 54 | <el-table-column label="操作" width="280" align="center" fixed="right"> |
| 55 | <template slot-scope="scope"> | 55 | <template slot-scope="scope"> |
| 56 | <el-button-group> | 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 | <el-button size="mini" icon="el-icon-switch-button" type="danger" v-if="scope.row.play" @click="stopDevicePush(scope.row)">停止</el-button> | 59 | <el-button size="mini" icon="el-icon-switch-button" type="danger" v-if="scope.row.play" @click="stopDevicePush(scope.row)">停止</el-button> |
| 59 | <el-button size="mini" icon="el-icon-s-open" type="primary" v-if="scope.row.parental == 1" @click="changeSubchannel(scope.row)">查看</el-button> | 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 | <!-- <el-button size="mini" icon="el-icon-video-camera" type="primary" >设备录象</el-button>--> | 61 | <!-- <el-button size="mini" icon="el-icon-video-camera" type="primary" >设备录象</el-button>--> |
web_src/src/components/gb28181/devicePlayer.vue
| @@ -127,7 +127,7 @@ export default { | @@ -127,7 +127,7 @@ export default { | ||
| 127 | realHasAudio = true; | 127 | realHasAudio = true; |
| 128 | } | 128 | } |
| 129 | } | 129 | } |
| 130 | - this.hasaudio = realHasAudio; //&& this.hasaudio; | 130 | + this.hasaudio = realHasAudio && this.hasaudio; |
| 131 | } | 131 | } |
| 132 | this.ssrc = streamInfo.ssrc; | 132 | this.ssrc = streamInfo.ssrc; |
| 133 | this.deviceId = deviceId; | 133 | this.deviceId = deviceId; |