Commit 130441e4bb6562e7036bad0241fa4a74423ba53c
1 parent
caa848a7
添加1078视频
Showing
6 changed files
with
81 additions
and
9 deletions
pom.xml
| ... | ... | @@ -268,6 +268,12 @@ |
| 268 | 268 | <version>2.7</version> |
| 269 | 269 | </dependency> |
| 270 | 270 | |
| 271 | + <dependency> | |
| 272 | + <groupId>com.xiaoleilu</groupId> | |
| 273 | + <artifactId>hutool-all</artifactId> | |
| 274 | + <version>3.1.0</version> | |
| 275 | + </dependency> | |
| 276 | + | |
| 271 | 277 | <!-- https://mvnrepository.com/artifact/net.sf.kxml/kxml2 --> |
| 272 | 278 | <!-- <dependency>--> |
| 273 | 279 | <!-- <groupId>net.sf.kxml</groupId>--> | ... | ... |
src/main/java/com/genersoft/iot/vmp/jt1078/config/JT1078Controller.java
| ... | ... | @@ -33,7 +33,7 @@ public class JT1078Controller { |
| 33 | 33 | public WVPResult<?> startLive(@PathVariable String deviceId, @PathVariable String channelId) { |
| 34 | 34 | J9101 j9101 = new J9101(); |
| 35 | 35 | j9101.setChannel(Integer.valueOf(channelId)); |
| 36 | - j9101.setIp("192.168.1.1"); | |
| 36 | + j9101.setIp("192.168.169.100"); | |
| 37 | 37 | j9101.setRate(1); |
| 38 | 38 | j9101.setTcpPort(7618); |
| 39 | 39 | j9101.setUdpPort(7618); |
| ... | ... | @@ -43,7 +43,7 @@ public class JT1078Controller { |
| 43 | 43 | // TODO 设备响应成功后,封装拉流结果集 |
| 44 | 44 | WVPResult<String> wvpResult = new WVPResult<>(); |
| 45 | 45 | wvpResult.setCode(200); |
| 46 | - wvpResult.setData(String.format("http://192.168.1.1/rtp/%s_%s.live.mp4", deviceId, channelId)); | |
| 46 | + wvpResult.setData(String.format("http://192.168.169.100/rtp/%s_%s.live.mp4", deviceId, channelId)); | |
| 47 | 47 | return wvpResult; |
| 48 | 48 | } |
| 49 | 49 | ... | ... |
src/main/java/com/genersoft/iot/vmp/media/zlm/dto/StreamPushItem.java
| 1 | 1 | package com.genersoft.iot.vmp.media.zlm.dto; |
| 2 | 2 | |
| 3 | +import com.alibaba.fastjson2.JSON; | |
| 3 | 4 | import com.genersoft.iot.vmp.gb28181.bean.GbStream; |
| 4 | 5 | import com.genersoft.iot.vmp.media.zlm.dto.hook.OnStreamChangedHookParam; |
| 5 | 6 | import com.genersoft.iot.vmp.utils.DateUtil; |
| ... | ... | @@ -385,5 +386,10 @@ public class StreamPushItem extends GbStream implements Comparable<StreamPushIte |
| 385 | 386 | // super.setStatus(status); |
| 386 | 387 | // } |
| 387 | 388 | |
| 389 | + | |
| 390 | + @Override | |
| 391 | + public String toString() { | |
| 392 | + return JSON.toJSONString(this); | |
| 393 | + } | |
| 388 | 394 | } |
| 389 | 395 | ... | ... |
src/main/java/com/genersoft/iot/vmp/utils/DateUtil.java
| ... | ... | @@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.utils; |
| 2 | 2 | |
| 3 | 3 | |
| 4 | 4 | import org.apache.commons.lang3.ObjectUtils; |
| 5 | +import org.apache.commons.lang3.time.FastDateFormat; | |
| 5 | 6 | |
| 6 | 7 | import java.time.Instant; |
| 7 | 8 | import java.time.LocalDate; |
| ... | ... | @@ -66,6 +67,8 @@ public class DateUtil { |
| 66 | 67 | public static final DateTimeFormatter DateFormatter = DateTimeFormatter.ofPattern(date_PATTERN, Locale.getDefault()).withZone(ZoneId.of(zoneStr)); |
| 67 | 68 | public static final DateTimeFormatter urlFormatter = DateTimeFormatter.ofPattern(URL_PATTERN, Locale.getDefault()).withZone(ZoneId.of(zoneStr)); |
| 68 | 69 | |
| 70 | + public static final FastDateFormat FAST_DATE_FORMAT_PATTERN= FastDateFormat.getInstance(PATTERN); | |
| 71 | + | |
| 69 | 72 | public static String yyyy_MM_dd_HH_mm_ssToISO8601(String formatTime) { |
| 70 | 73 | |
| 71 | 74 | return formatterISO8601.format(formatter.parse(formatTime)); | ... | ... |
src/main/resources/application-local.yml
| ... | ... | @@ -13,7 +13,7 @@ spring: |
| 13 | 13 | # REDIS数据库配置 |
| 14 | 14 | redis: |
| 15 | 15 | # [必须修改] Redis服务器IP, REDIS安装在本机的,使用127.0.0.1 |
| 16 | - host: 127.0.0.1 | |
| 16 | + host: 192.168.169.100 | |
| 17 | 17 | # [必须修改] 端口号 |
| 18 | 18 | port: 6379 |
| 19 | 19 | # [可选] 数据库 DB |
| ... | ... | @@ -60,7 +60,7 @@ sip: |
| 60 | 60 | # 如果要监听多张网卡,可以使用逗号分隔多个IP, 例如: 192.168.1.4,10.0.0.4 |
| 61 | 61 | # 如果不明白,就使用0.0.0.0,大部分情况都是可以的 |
| 62 | 62 | # 请不要使用127.0.0.1,任何包括localhost在内的域名都是不可以的。 |
| 63 | - ip: 192.169.1.89 | |
| 63 | + ip: 192.169.1.92 | |
| 64 | 64 | # [可选] 28181服务监听的端口 |
| 65 | 65 | port: 5060 |
| 66 | 66 | |
| ... | ... | @@ -84,15 +84,15 @@ media: |
| 84 | 84 | # [必须修改] zlm服务器的http.port |
| 85 | 85 | http-port: 1091 |
| 86 | 86 | # [可选] 返回流地址时的ip,置空使用 media.ip |
| 87 | - stream-ip: 192.168.169.100 | |
| 87 | + stream-ip: 192.169.1.92 | |
| 88 | 88 | # [可选] wvp在国标信令中使用的ip,此ip为摄像机可以访问到的ip, 置空使用 media.ip |
| 89 | - sdp-ip: 192.168.169.100 | |
| 89 | + sdp-ip: 192.169.1.92 | |
| 90 | 90 | # [可选] zlm服务器的hook所使用的IP, 默认使用sip.ip |
| 91 | - hook-ip: 192.168.169.100 | |
| 91 | + hook-ip: 192.169.1.92 | |
| 92 | 92 | # [可选] zlm服务器的http.sslport, 置空使用zlm配置文件配置 |
| 93 | 93 | http-ssl-port: 443 |
| 94 | 94 | # [可选] zlm服务器的hook.admin_params=secret |
| 95 | - secret: RPorcBlIw26uHGnEHYGesIYyFDXpgjkP | |
| 95 | + secret: RPorcBlIw26uHGnEHYGesIYyFDXpgjkP1 | |
| 96 | 96 | # 启用多端口模式, 多端口模式使用端口区分每路流,兼容性更好。 单端口使用流的ssrc区分, 点播超时建议使用多端口测试 |
| 97 | 97 | rtp: |
| 98 | 98 | # [可选] 是否启用多端口模式, 开启后会在portRange范围内选择端口用于媒体流传输 |
| ... | ... | @@ -122,7 +122,35 @@ user-settings: |
| 122 | 122 | # [可选] 日志配置, 一般不需要改 |
| 123 | 123 | logging: |
| 124 | 124 | config: classpath:logback-spring.xml |
| 125 | +jt1078: | |
| 126 | + enable: true | |
| 127 | + port: 9999 | |
| 125 | 128 | #mybatis: |
| 126 | 129 | # configuration: |
| 127 | 130 | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| 131 | +tuohua: | |
| 132 | + bsth: | |
| 133 | + login: | |
| 134 | + pageURL: http://192.169.1.92:9088/user/login/jCryptionKey | |
| 135 | + url: http://192.169.1.92:9088/user/login | |
| 136 | + userName: yuanxiaohu | |
| 137 | + password: Yxiaohu1.0 | |
| 138 | + tree: | |
| 139 | + url: | |
| 140 | + company: http://192.169.1.92:9088/video/tree | |
| 141 | + car: http://192.169.1.92:9088/video/tree/carNo/{0} | |
| 142 | + sim: http://192.169.1.92:9088/video//tree/caNO/sim/{0} | |
| 143 | + wvp28181: | |
| 144 | + rtsp: | |
| 145 | + tcpPort: 1078 | |
| 146 | + udpPort: 1078 | |
| 147 | + ip : 61.169.120.202 | |
| 148 | + jt1078: | |
| 149 | + url: http://192.168.168.241:8100/device/{0} | |
| 150 | + historyListPort: 9205 | |
| 151 | + historyPlayPort: 9201 | |
| 152 | + sendPort: 9101 | |
| 153 | + stopSendPort: 9102 | |
| 154 | + playURL: /play/wasm/ws%3A%2F%2F{ip}%3A{port}%2Fschedule%2F{sim}-{channel}.live.flv%3FcallId%{publickey} | |
| 155 | + | |
| 128 | 156 | ... | ... |
src/main/resources/application-localDev.yml
| ... | ... | @@ -63,7 +63,7 @@ sip: |
| 63 | 63 | ip: 61.169.120.202,0.0.0.0,192.168.169.100 |
| 64 | 64 | wanIp: 61.169.120.202 # zlm所在服务器的公网IP |
| 65 | 65 | # [可选] 28181服务监听的端口 |
| 66 | - port: 7000 | |
| 66 | + port: 7051 | |
| 67 | 67 | |
| 68 | 68 | # 根据国标6.1.2中规定,domain宜采用ID统一编码的前十位编码。国标附录D中定义前8位为中心编码(由省级、市级、区级、基层编号组成,参照GB/T 2260-2007) |
| 69 | 69 | # 后两位为行业编码,定义参照附录D.3 |
| ... | ... | @@ -126,4 +126,33 @@ logging: |
| 126 | 126 | #mybatis: |
| 127 | 127 | # configuration: |
| 128 | 128 | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| 129 | +tuohua: | |
| 130 | + bsth: | |
| 131 | + login: | |
| 132 | + pageURL: http://192.169.1.92:9088/user/login/jCryptionKey | |
| 133 | + url: http://192.169.1.92:9088/user/login | |
| 134 | + userName: yuanxiaohu | |
| 135 | + password: Yxiaohu1.0 | |
| 136 | + tree: | |
| 137 | + url: | |
| 138 | + company: http://192.169.1.92:9088/video/tree | |
| 139 | + car: http://192.169.1.92:9088/video/tree/carNo/{0} | |
| 140 | + sim: http://192.169.1.92:9088/video//tree/caNO/sim/{0} | |
| 141 | + wvp28181: | |
| 142 | + rtsp: | |
| 143 | + tcpPort: 1078 | |
| 144 | + udpPort: 1078 | |
| 145 | + ip : 61.169.120.202 | |
| 146 | + jt1078: | |
| 147 | + url: http://192.168.168.241:8100/device/{0} | |
| 148 | + historyListPort: 9205 | |
| 149 | + historyPlayPort: 9201 | |
| 150 | + sendPort: 9101 | |
| 151 | + stopSendPort: 9102 | |
| 152 | + playURL: /play/wasm/ws%3A%2F%2F{ip}%3A{port}%2Fschedule%2F{sim}-{channel}.live.flv%3FcallId%{publickey} | |
| 153 | + | |
| 154 | +jt1078: | |
| 155 | + enable: true | |
| 156 | + port: 9999 | |
| 157 | + | |
| 129 | 158 | ... | ... |