From bf8fbf4927d8ddec69893a6bebb79dadf1b4225d Mon Sep 17 00:00:00 2001 From: chenzhangyue Date: Fri, 1 Sep 2023 17:22:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?bugfix:=E8=BF=99=E9=87=8C=E5=BA=94=E8=AF=A5?= =?UTF-8?q?=E4=B8=8D=E5=AD=98=E5=9C=A8key=E6=89=8D=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E4=B8=80=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/service/impl/MediaServerServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java index f8c1ba18..6bbb4bc3 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java @@ -128,7 +128,7 @@ public class MediaServerServiceImpl implements IMediaServerService { continue; } // 更新 - if (ssrcFactory.hasMediaServerSSRC(mediaServerItem.getId())) { + if (!ssrcFactory.hasMediaServerSSRC(mediaServerItem.getId())) { ssrcFactory.initMediaServerSSRC(mediaServerItem.getId(), null); } // 查询redis是否存在此mediaServer @@ -229,7 +229,7 @@ public class MediaServerServiceImpl implements IMediaServerService { mediaServerMapper.update(mediaSerItem); MediaServerItem mediaServerItemInRedis = getOne(mediaSerItem.getId()); MediaServerItem mediaServerItemInDataBase = mediaServerMapper.queryOne(mediaSerItem.getId()); - if (mediaServerItemInRedis == null || ssrcFactory.hasMediaServerSSRC(mediaSerItem.getId())) { + if (mediaServerItemInRedis == null || !ssrcFactory.hasMediaServerSSRC(mediaSerItem.getId())) { ssrcFactory.initMediaServerSSRC(mediaServerItemInDataBase.getId(),null); } String key = VideoManagerConstants.MEDIA_SERVER_PREFIX + userSetting.getServerId() + "_" + mediaServerItemInDataBase.getId(); @@ -411,7 +411,7 @@ public class MediaServerServiceImpl implements IMediaServerService { } mediaServerMapper.update(serverItem); String key = VideoManagerConstants.MEDIA_SERVER_PREFIX + userSetting.getServerId() + "_" + zlmServerConfig.getGeneralMediaServerId(); - if (ssrcFactory.hasMediaServerSSRC(serverItem.getId())) { + if (!ssrcFactory.hasMediaServerSSRC(serverItem.getId())) { ssrcFactory.initMediaServerSSRC(zlmServerConfig.getGeneralMediaServerId(), null); } redisTemplate.opsForValue().set(key, serverItem); From 73f6f044a1aa58b9c422d19c30198bb515e7616d Mon Sep 17 00:00:00 2001 From: chenzhangyue Date: Fri, 1 Sep 2023 17:53:48 +0800 Subject: [PATCH 2/2] local dev --- src/main/resources/application-dev.yml | 24 ++++++++++++------------ src/main/resources/application.yml | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 504c9c66..e149886e 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -19,14 +19,14 @@ spring: # [可选] 数据库 DB database: 7 # [可选] 访问密码,若你的redis服务器没有设置密码,就不需要用密码去连接 - password: + password: luna # [可选] 超时时间 timeout: 10000 # mysql数据源 datasource: type: com.zaxxer.hikari.HikariDataSource driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://127.0.0.1:3306/test_gb-89wulian?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&serverTimezone=PRC&useSSL=false&allowMultiQueries=true + url: jdbc:mysql://127.0.0.1:3306/wvp?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&serverTimezone=PRC&useSSL=false&allowMultiQueries=true username: root password: root hikari: @@ -38,7 +38,7 @@ spring: max-lifetime: 1200000 # 是池中连接关闭后的最长生命周期(以毫秒为单位) #[可选] WVP监听的HTTP端口, 网页和接口调用都是这个端口 server: - port: 18978 + port: 8080 # [可选] HTTPS配置, 默认不开启 ssl: # [可选] 是否开启HTTPS访问 @@ -56,7 +56,7 @@ sip: # 如果要监听多张网卡,可以使用逗号分隔多个IP, 例如: 192.168.1.4,10.0.0.4 # 如果不明白,就使用0.0.0.0,大部分情况都是可以的 # 请不要使用127.0.0.1,任何包括localhost在内的域名都是不可以的。 - ip: 192.168.1.18 + ip: 172.19.128.50 # [可选] 28181服务监听的端口 port: 8116 # 根据国标6.1.2中规定,domain宜采用ID统一编码的前十位编码。国标附录D中定义前8位为中心编码(由省级、市级、区级、基层编号组成,参照GB/T 2260-2007) @@ -73,21 +73,21 @@ sip: #zlm 默认服务器配置 media: - id: 89wulian-one + id: zlmediakit-local # [必须修改] zlm服务器的内网IP - ip: 192.168.1.18 + ip: 172.19.128.50 # [必须修改] zlm服务器的http.port - http-port: 80 + http-port: 9092 # [可选] 返回流地址时的ip,置空使用 media.ip - stream-ip: 192.168.1.18 + stream-ip: 172.19.128.50 # [可选] wvp在国标信令中使用的ip,此ip为摄像机可以访问到的ip, 置空使用 media.ip - sdp-ip: 192.168.1.18 + sdp-ip: 172.19.128.50 # [可选] zlm服务器的hook所使用的IP, 默认使用sip.ip - hook-ip: 192.168.1.18 + hook-ip: 172.19.128.50 # [可选] zlm服务器的http.sslport, 置空使用zlm配置文件配置 - http-ssl-port: 443 + http-ssl-port: 1443 # [可选] zlm服务器的hook.admin_params=secret - secret: 035c73f7-bb6b-4889-a715-d9eb2d1925cc + secret: 10000 # 启用多端口模式, 多端口模式使用端口区分每路流,兼容性更好。 单端口使用流的ssrc区分, 点播超时建议使用多端口测试 rtp: # [可选] 是否启用多端口模式, 开启后会在portRange范围内选择端口用于媒体流传输 diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 3f478442..80de5efb 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -2,4 +2,4 @@ spring: application: name: wvp profiles: - active: local \ No newline at end of file + active: dev \ No newline at end of file