diff --git a/.gitmodules b/.gitmodules
index e3c4e68..e69de29 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +0,0 @@
-[submodule "wvpcode"]
- path = docker/wvp/wvpcode
- url = http://th.local.t-aaron.com:13000/THENG/stream-wvp.git
diff --git a/docker/wvp/wvpcode b/docker/wvp/wvpcode
deleted file mode 160000
index 2de9110..0000000
--- a/docker/wvp/wvpcode
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 2de911024322133b374bb22e897c81822ed1c6a4
diff --git a/docker/wvp/wvpcode/.gitignore b/docker/wvp/wvpcode/.gitignore
new file mode 100644
index 0000000..9a74b11
--- /dev/null
+++ b/docker/wvp/wvpcode/.gitignore
@@ -0,0 +1,81 @@
+# Maven 构建产物
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+# 编译输出
+*.class
+*.war
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# Maven 构建的 jar 文件(但保留 libs 目录下的依赖 jar)
+target/**/*.jar
+!libs/**/*.jar
+
+# 日志文件
+*.log
+logs/
+
+# IDE 配置文件
+.idea/
+*.iml
+*.ipr
+*.iws
+.vscode/
+.settings/
+.classpath
+.project
+.factorypath
+
+# Eclipse
+.metadata
+bin/
+tmp/
+*.tmp
+*.bak
+*.swp
+*~.nib
+local.properties
+
+# IntelliJ IDEA
+out/
+.idea_modules/
+
+# NetBeans
+nbproject/private/
+build/
+nbbuild/
+dist/
+nbdist/
+.nb-gradle/
+
+# macOS
+.DS_Store
+.AppleDouble
+.LSOverride
+
+# Windows
+Thumbs.db
+ehthumbs.db
+Desktop.ini
+
+# Linux
+*~
+
+# Node.js (web 前端)
+web/node_modules/
+web/dist/
+web/.temp/
+web/.cache/
+
+# Maven Wrapper
+.mvn/timing.properties
+.mvn/wrapper/maven-wrapper.jar
+
+# 临时文件
+*.tmp
+*.temp
diff --git a/docker/wvp/wvpcode/libs/jdbc-aarch/kingbase8-8.6.0.jar b/docker/wvp/wvpcode/libs/jdbc-aarch/kingbase8-8.6.0.jar
new file mode 100644
index 0000000..489bf53
Binary files /dev/null and b/docker/wvp/wvpcode/libs/jdbc-aarch/kingbase8-8.6.0.jar differ
diff --git a/docker/wvp/wvpcode/libs/jdbc-aarch/kingbase8-8.6.0.jre7.jar b/docker/wvp/wvpcode/libs/jdbc-aarch/kingbase8-8.6.0.jre7.jar
new file mode 100644
index 0000000..28102eb
Binary files /dev/null and b/docker/wvp/wvpcode/libs/jdbc-aarch/kingbase8-8.6.0.jre7.jar differ
diff --git a/docker/wvp/wvpcode/libs/jdbc-aarch/postgresql-42.2.9.jar b/docker/wvp/wvpcode/libs/jdbc-aarch/postgresql-42.2.9.jar
new file mode 100644
index 0000000..62d0b6d
Binary files /dev/null and b/docker/wvp/wvpcode/libs/jdbc-aarch/postgresql-42.2.9.jar differ
diff --git a/docker/wvp/wvpcode/libs/jdbc-aarch/postgresql-42.2.9.jre7.jar b/docker/wvp/wvpcode/libs/jdbc-aarch/postgresql-42.2.9.jre7.jar
new file mode 100644
index 0000000..f6077b6
Binary files /dev/null and b/docker/wvp/wvpcode/libs/jdbc-aarch/postgresql-42.2.9.jre7.jar differ
diff --git a/docker/wvp/wvpcode/libs/jdbc-x86/bcprov-jdk15on-1.70.jar b/docker/wvp/wvpcode/libs/jdbc-x86/bcprov-jdk15on-1.70.jar
new file mode 100644
index 0000000..0e4198e
Binary files /dev/null and b/docker/wvp/wvpcode/libs/jdbc-x86/bcprov-jdk15on-1.70.jar differ
diff --git a/docker/wvp/wvpcode/libs/jdbc-x86/kingbase8-8.6.0.jar b/docker/wvp/wvpcode/libs/jdbc-x86/kingbase8-8.6.0.jar
new file mode 100644
index 0000000..ff4664e
Binary files /dev/null and b/docker/wvp/wvpcode/libs/jdbc-x86/kingbase8-8.6.0.jar differ
diff --git a/docker/wvp/wvpcode/libs/jdbc-x86/kingbase8-8.6.0.jre6.jar b/docker/wvp/wvpcode/libs/jdbc-x86/kingbase8-8.6.0.jre6.jar
new file mode 100644
index 0000000..fcdf628
Binary files /dev/null and b/docker/wvp/wvpcode/libs/jdbc-x86/kingbase8-8.6.0.jre6.jar differ
diff --git a/docker/wvp/wvpcode/libs/jdbc-x86/kingbase8-8.6.0.jre7.jar b/docker/wvp/wvpcode/libs/jdbc-x86/kingbase8-8.6.0.jre7.jar
new file mode 100644
index 0000000..a039358
Binary files /dev/null and b/docker/wvp/wvpcode/libs/jdbc-x86/kingbase8-8.6.0.jre7.jar differ
diff --git a/docker/wvp/wvpcode/libs/jdbc-x86/postgresql-42.2.9.jar b/docker/wvp/wvpcode/libs/jdbc-x86/postgresql-42.2.9.jar
new file mode 100644
index 0000000..487cfc1
Binary files /dev/null and b/docker/wvp/wvpcode/libs/jdbc-x86/postgresql-42.2.9.jar differ
diff --git a/docker/wvp/wvpcode/libs/jdbc-x86/postgresql-42.2.9.jre6.jar b/docker/wvp/wvpcode/libs/jdbc-x86/postgresql-42.2.9.jre6.jar
new file mode 100644
index 0000000..11e9f99
Binary files /dev/null and b/docker/wvp/wvpcode/libs/jdbc-x86/postgresql-42.2.9.jre6.jar differ
diff --git a/docker/wvp/wvpcode/libs/jdbc-x86/postgresql-42.2.9.jre7.jar b/docker/wvp/wvpcode/libs/jdbc-x86/postgresql-42.2.9.jre7.jar
new file mode 100644
index 0000000..522738d
Binary files /dev/null and b/docker/wvp/wvpcode/libs/jdbc-x86/postgresql-42.2.9.jre7.jar differ
diff --git a/docker/wvp/wvpcode/libs/smiley-http-proxy-servlet-2.0.jar b/docker/wvp/wvpcode/libs/smiley-http-proxy-servlet-2.0.jar
new file mode 100644
index 0000000..876b56c
Binary files /dev/null and b/docker/wvp/wvpcode/libs/smiley-http-proxy-servlet-2.0.jar differ
diff --git a/docker/wvp/wvpcode/pom.xml b/docker/wvp/wvpcode/pom.xml
new file mode 100644
index 0000000..7011827
--- /dev/null
+++ b/docker/wvp/wvpcode/pom.xml
@@ -0,0 +1,512 @@
+
+
+ 4.0.0
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 3.4.4
+
+
+ com.genersoft
+ wvp-pro
+ 2.7.4
+ web video platform
+ 国标28181视频平台
+ ${project.packaging}
+
+
+
+ nexus-aliyun
+ Nexus aliyun
+ https://maven.aliyun.com/repository/public
+ default
+
+ false
+
+
+ true
+
+
+
+ ECC
+ https://maven.ecc.no/releases
+
+
+
+
+
+ nexus-aliyun
+ Nexus aliyun
+ https://maven.aliyun.com/repository/public
+
+ false
+
+
+ true
+
+
+
+
+
+ UTF-8
+ MMddHHmm
+
+
+ ${project.build.directory}/generated-snippets
+ ${project.basedir}/docs/asciidoc
+ ${project.build.directory}/asciidoc
+ ${project.build.directory}/asciidoc/html
+ ${project.build.directory}/asciidoc/pdf
+
+ 21
+ 21
+
+
+
+
+ jar
+
+ true
+
+
+ jar
+
+
+
+ war
+
+ war
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-jetty
+
+
+
+
+ javax.servlet
+ javax.servlet-api
+ 3.1.0
+ provided
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+ org.springframework.boot
+ spring-boot-starter-cache
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+ org.springframework.boot
+ spring-boot-starter-websocket
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-aop
+
+
+
+ org.springframework.session
+ spring-session-core
+
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ true
+
+
+ org.mybatis.spring.boot
+ mybatis-spring-boot-starter
+ 3.0.4
+
+
+ com.zaxxer
+ HikariCP
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-security
+
+
+
+ org.springframework.boot
+ spring-boot-starter-jdbc
+
+
+
+
+ com.h2database
+ h2
+ 2.3.232
+
+
+
+
+ com.mysql
+ mysql-connector-j
+ 8.2.0
+
+
+
+
+ org.postgresql
+ postgresql
+ 42.5.1
+
+
+
+
+
+
+ com.kingbase
+ kingbase8
+ 8.6.0
+ system
+ ${basedir}/libs/jdbc-aarch/kingbase8-8.6.0.jar
+
+
+ com.kingbase
+ kingbase8
+ 8.6.0
+ system
+ ${basedir}/libs/jdbc-x86/kingbase8-8.6.0.jar
+
+
+
+
+
+
+
+
+
+
+ com.github.pagehelper
+ pagehelper-spring-boot-starter
+ 2.1.1
+
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-ui
+ 2.8.6
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ 2.8.6
+
+
+ org.springdoc
+ springdoc-openapi-security
+ 1.8.0
+
+
+
+ com.github.xiaoymin
+ knife4j-openapi3-jakarta-spring-boot-starter
+ 4.5.0
+
+
+
+
+
+
+
+
+
+
+
+ javax.sip
+ jain-sip-ri
+ 1.3.0-91
+
+
+
+
+ org.slf4j
+ log4j-over-slf4j
+ 2.0.17
+
+
+
+
+ org.dom4j
+ dom4j
+ 2.1.4
+
+
+
+
+ com.alibaba.fastjson2
+ fastjson2
+ 2.0.57
+
+
+ com.alibaba.fastjson2
+ fastjson2-extension
+ 2.0.57
+
+
+ com.alibaba.fastjson2
+ fastjson2-extension-spring5
+ 2.0.57
+
+
+
+
+ com.squareup.okhttp3
+ okhttp
+ 4.12.0
+
+
+
+
+ com.squareup.okhttp3
+ logging-interceptor
+ 4.12.0
+
+
+
+
+ io.github.rburgst
+ okhttp-digest
+ 3.1.1
+
+
+
+
+
+
+
+
+
+
+
+ org.bitbucket.b_c
+ jose4j
+ 0.9.6
+
+
+
+ org.apache.httpcomponents
+ httpclient
+ 4.5.14
+
+
+
+
+ com.alibaba
+ easyexcel
+ 4.0.3
+
+
+ org.apache.commons
+ commons-compress
+
+
+
+
+ org.apache.commons
+ commons-compress
+ 1.27.1
+
+
+
+
+ com.github.oshi
+ oshi-core
+ 6.6.5
+
+
+
+
+ com.google.guava
+ guava
+ 33.4.8-jre
+
+
+
+
+ org.apache.ftpserver
+ ftpserver-core
+ 1.2.1
+
+
+
+ org.apache.ftpserver
+ ftplet-api
+ 1.2.1
+
+
+
+
+ org.projectlombok
+ lombok
+ 1.18.38
+ provided
+
+
+
+
+
+
+
+
+
+
+ io.github.sevdokimov.logviewer
+ log-viewer-spring-boot
+ 1.0.10
+
+
+
+ cn.hutool
+ hutool-all
+ 5.8.38
+
+
+
+ org.bouncycastle
+ bcpkix-jdk18on
+ 1.78.1
+
+
+
+
+ no.ecc.vectortile
+ java-vector-tile
+ 1.4.1
+
+
+
+
+ org.locationtech.jts
+ jts-core
+ 1.18.2
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+ ${project.artifactId}-${project.version}-${maven.build.timestamp}
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ 3.4.10
+
+ true
+ true
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.14.0
+
+ 21
+ 21
+
+
+ org.projectlombok
+ lombok
+ 1.18.30
+
+
+
+
+
+
+ pl.project13.maven
+ git-commit-id-plugin
+ 4.9.10
+
+ true
+ false
+ yyyyMMdd
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 3.2.5
+
+ true
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ 3.4.2
+
+
+ maven-resources-plugin
+
+
+ copy-resources
+ package
+
+ copy-resources
+
+
+
+
+ src/main/resources
+
+ application.yml
+ application-*.yml
+
+
+
+ ${project.build.directory}
+
+
+
+
+
+
+
+ src/main/resources
+
+
+ src/main/java
+
+ **/*.xml
+
+
+
+
+
diff --git a/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/VManageBootstrap.java b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/VManageBootstrap.java
new file mode 100644
index 0000000..cabb8b2
--- /dev/null
+++ b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/VManageBootstrap.java
@@ -0,0 +1,68 @@
+package com.genersoft.iot.vmp;
+
+import com.genersoft.iot.vmp.jt1078.util.ClassUtil;
+import com.genersoft.iot.vmp.utils.GitUtil;
+import com.genersoft.iot.vmp.utils.SpringBeanFactory;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.servlet.ServletComponentScan;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+import jakarta.servlet.ServletContext;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.SessionCookieConfig;
+import jakarta.servlet.SessionTrackingMode;
+import java.util.Collections;
+
+/**
+ * 启动类
+ */
+@ServletComponentScan("com.genersoft.iot.vmp.conf")
+@SpringBootApplication
+@EnableScheduling
+@EnableCaching
+@Slf4j
+public class VManageBootstrap extends SpringBootServletInitializer {
+
+ private static String[] args;
+ private static ConfigurableApplicationContext context;
+ public static void main(String[] args) {
+ VManageBootstrap.args = args;
+ VManageBootstrap.context = SpringApplication.run(VManageBootstrap.class, args);
+ ClassUtil.context = VManageBootstrap.context;
+ GitUtil gitUtil = SpringBeanFactory.getBean("gitUtil");
+ if (gitUtil == null) {
+ log.info("获取版本信息失败");
+ }else {
+ log.info("构建版本: {}", gitUtil.getBuildVersion());
+ log.info("构建时间: {}", gitUtil.getBuildDate());
+ log.info("GIT信息: 分支: {}, ID: {}, 时间: {}", gitUtil.getBranch(), gitUtil.getCommitIdShort(), gitUtil.getCommitTime());
+ }
+ }
+ // 项目重启
+ public static void restart() {
+ context.close();
+ VManageBootstrap.context = SpringApplication.run(VManageBootstrap.class, args);
+ }
+
+ @Override
+ protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
+ return application.sources(VManageBootstrap.class);
+ }
+
+ @Override
+ public void onStartup(ServletContext servletContext) throws ServletException {
+ super.onStartup(servletContext);
+
+ servletContext.setSessionTrackingModes(
+ Collections.singleton(SessionTrackingMode.COOKIE)
+ );
+ SessionCookieConfig sessionCookieConfig = servletContext.getSessionCookieConfig();
+ sessionCookieConfig.setHttpOnly(true);
+ }
+}
diff --git a/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/CivilCodePo.java b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/CivilCodePo.java
new file mode 100644
index 0000000..3885197
--- /dev/null
+++ b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/CivilCodePo.java
@@ -0,0 +1,46 @@
+package com.genersoft.iot.vmp.common;
+
+import org.springframework.util.ObjectUtils;
+
+public class CivilCodePo {
+
+ private String code;
+
+ private String name;
+
+ private String parentCode;
+
+ public static CivilCodePo getInstance(String[] infoArray) {
+ CivilCodePo civilCodePo = new CivilCodePo();
+ civilCodePo.setCode(infoArray[0]);
+ civilCodePo.setName(infoArray[1]);
+ if (!ObjectUtils.isEmpty(infoArray[2])) {
+ civilCodePo.setParentCode(infoArray[2]);
+ }
+ return civilCodePo;
+ }
+
+ public String getCode() {
+ return code;
+ }
+
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getParentCode() {
+ return parentCode;
+ }
+
+ public void setParentCode(String parentCode) {
+ this.parentCode = parentCode;
+ }
+}
diff --git a/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/CommonCallback.java b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/CommonCallback.java
new file mode 100644
index 0000000..819fe0d
--- /dev/null
+++ b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/CommonCallback.java
@@ -0,0 +1,5 @@
+package com.genersoft.iot.vmp.common;
+
+public interface CommonCallback{
+ public void run(T t);
+}
diff --git a/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/DeviceStatusCallback.java b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/DeviceStatusCallback.java
new file mode 100644
index 0000000..9ee9b9e
--- /dev/null
+++ b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/DeviceStatusCallback.java
@@ -0,0 +1,7 @@
+package com.genersoft.iot.vmp.common;
+
+import com.genersoft.iot.vmp.gb28181.bean.SipTransactionInfo;
+
+public interface DeviceStatusCallback {
+ public void run(String deviceId, SipTransactionInfo transactionInfo);
+}
diff --git a/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/InviteInfo.java b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/InviteInfo.java
new file mode 100644
index 0000000..0c12796
--- /dev/null
+++ b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/InviteInfo.java
@@ -0,0 +1,63 @@
+package com.genersoft.iot.vmp.common;
+
+import com.genersoft.iot.vmp.service.bean.SSRCInfo;
+import lombok.Data;
+
+/**
+ * 记录每次发送invite消息的状态
+ */
+@Data
+public class InviteInfo {
+
+ private String deviceId;
+
+ private Integer channelId;
+
+ private String stream;
+
+ private SSRCInfo ssrcInfo;
+
+ private String receiveIp;
+
+ private Integer receivePort;
+
+ private String streamMode;
+
+ private InviteSessionType type;
+
+ private InviteSessionStatus status;
+
+ private StreamInfo streamInfo;
+
+ private String mediaServerId;
+
+ private Long expirationTime;
+
+ private Long createTime;
+
+ private Boolean record;
+
+ private String startTime;
+
+ private String endTime;
+
+
+ public static InviteInfo getInviteInfo(String deviceId, Integer channelId, String stream, SSRCInfo ssrcInfo, String mediaServerId,
+ String receiveIp, Integer receivePort, String streamMode,
+ InviteSessionType type, InviteSessionStatus status, Boolean record) {
+ InviteInfo inviteInfo = new InviteInfo();
+ inviteInfo.setDeviceId(deviceId);
+ inviteInfo.setChannelId(channelId);
+ inviteInfo.setStream(stream);
+ inviteInfo.setSsrcInfo(ssrcInfo);
+ inviteInfo.setReceiveIp(receiveIp);
+ inviteInfo.setReceivePort(receivePort);
+ inviteInfo.setStreamMode(streamMode);
+ inviteInfo.setType(type);
+ inviteInfo.setStatus(status);
+ inviteInfo.setMediaServerId(mediaServerId);
+ inviteInfo.setRecord(record);
+ return inviteInfo;
+ }
+
+}
diff --git a/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/InviteSessionStatus.java b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/InviteSessionStatus.java
new file mode 100644
index 0000000..04cc7c9
--- /dev/null
+++ b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/InviteSessionStatus.java
@@ -0,0 +1,11 @@
+package com.genersoft.iot.vmp.common;
+
+/**
+ * 标识invite消息发出后的各个状态,
+ * 收到ok钱停止invite发送cancel,
+ * 收到200ok后发送BYE停止invite
+ */
+public enum InviteSessionStatus {
+ ready,
+ ok,
+}
diff --git a/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/InviteSessionType.java b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/InviteSessionType.java
new file mode 100644
index 0000000..9241305
--- /dev/null
+++ b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/InviteSessionType.java
@@ -0,0 +1,9 @@
+package com.genersoft.iot.vmp.common;
+
+public enum InviteSessionType {
+ PLAY,
+ PLAYBACK,
+ DOWNLOAD,
+ BROADCAST,
+ TALK
+}
diff --git a/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/RemoteAddressInfo.java b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/RemoteAddressInfo.java
new file mode 100755
index 0000000..39478d8
--- /dev/null
+++ b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/RemoteAddressInfo.java
@@ -0,0 +1,27 @@
+package com.genersoft.iot.vmp.common;
+
+public class RemoteAddressInfo {
+ private String ip;
+ private int port;
+
+ public RemoteAddressInfo(String ip, int port) {
+ this.ip = ip;
+ this.port = port;
+ }
+
+ public String getIp() {
+ return ip;
+ }
+
+ public void setIp(String ip) {
+ this.ip = ip;
+ }
+
+ public int getPort() {
+ return port;
+ }
+
+ public void setPort(int port) {
+ this.port = port;
+ }
+}
diff --git a/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/ServerInfo.java b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/ServerInfo.java
new file mode 100644
index 0000000..fb1941a
--- /dev/null
+++ b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/ServerInfo.java
@@ -0,0 +1,23 @@
+package com.genersoft.iot.vmp.common;
+
+import com.genersoft.iot.vmp.utils.DateUtil;
+import lombok.Data;
+
+@Data
+public class ServerInfo {
+
+ private String ip;
+ private int port;
+ /**
+ * 现在使用的线程数
+ */
+ private String createTime;
+
+ public static ServerInfo create(String ip, int port) {
+ ServerInfo serverInfo = new ServerInfo();
+ serverInfo.setIp(ip);
+ serverInfo.setPort(port);
+ serverInfo.setCreateTime(DateUtil.getNow());
+ return serverInfo;
+ }
+}
diff --git a/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/StatisticsInfo.java b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/StatisticsInfo.java
new file mode 100644
index 0000000..8d7ab28
--- /dev/null
+++ b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/StatisticsInfo.java
@@ -0,0 +1,97 @@
+package com.genersoft.iot.vmp.common;
+
+import lombok.Data;
+
+/**
+ * 统计信息
+ */
+@Data
+public class StatisticsInfo {
+
+ private long id;
+
+ /**
+ * ID
+ */
+ private String deviceId;
+
+ /**
+ * 分支
+ */
+ private String branch;
+
+ /**
+ * git提交版本ID
+ */
+ private String gitCommitId;
+
+ /**
+ * git地址
+ */
+ private String gitUrl;
+
+ /**
+ * 构建版本
+ */
+ private String version;
+
+ /**
+ * 操作系统名称
+ */
+ private String osName;
+
+ /**
+ * 是否是docker环境
+ */
+ private Boolean docker;
+
+ /**
+ * 架构
+ */
+ private String arch;
+
+ /**
+ * jdk版本
+ */
+ private String jdkVersion;
+
+ /**
+ * redis版本
+ */
+ private String redisVersion;
+
+ /**
+ * sql数据库版本
+ */
+ private String sqlVersion;
+
+ /**
+ * sql数据库类型, mysql/postgresql/金仓等
+ */
+ private String sqlType;
+
+ /**
+ * 创建时间
+ */
+ private String time;
+
+ @Override
+ public String toString() {
+ return "StatisticsInfo{" +
+ "id=" + id +
+ ", deviceId='" + deviceId + '\'' +
+ ", branch='" + branch + '\'' +
+ ", gitCommitId='" + gitCommitId + '\'' +
+ ", gitUrl='" + gitUrl + '\'' +
+ ", version='" + version + '\'' +
+ ", osName='" + osName + '\'' +
+ ", docker=" + docker +
+ ", arch='" + arch + '\'' +
+ ", jdkVersion='" + jdkVersion + '\'' +
+ ", redisVersion='" + redisVersion + '\'' +
+ ", sqlVersion='" + sqlVersion + '\'' +
+ ", sqlType='" + sqlType + '\'' +
+ ", time='" + time + '\'' +
+ '}';
+ }
+}
diff --git a/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/StreamInfo.java b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/StreamInfo.java
new file mode 100644
index 0000000..78c93e5
--- /dev/null
+++ b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/StreamInfo.java
@@ -0,0 +1,372 @@
+package com.genersoft.iot.vmp.common;
+
+import com.genersoft.iot.vmp.media.bean.MediaInfo;
+import com.genersoft.iot.vmp.media.bean.MediaServer;
+import com.genersoft.iot.vmp.service.bean.DownloadFileInfo;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Objects;
+
+@Data
+@Schema(description = "流信息")
+public class StreamInfo implements Serializable, Cloneable{
+
+ @Schema(description = "应用名")
+ private String app;
+ @Schema(description = "流ID")
+ private String stream;
+ @Schema(description = "设备编号")
+ private String deviceId;
+ @Schema(description = "通道ID")
+ private Integer channelId;
+
+ @Schema(description = "IP")
+ private String ip;
+
+ @Schema(description = "HTTP-FLV流地址")
+ private StreamURL flv;
+
+ @Schema(description = "HTTPS-FLV流地址")
+ private StreamURL https_flv;
+ @Schema(description = "Websocket-FLV流地址")
+ private StreamURL ws_flv;
+ @Schema(description = "Websockets-FLV流地址")
+ private StreamURL wss_flv;
+ @Schema(description = "HTTP-FMP4流地址")
+ private StreamURL fmp4;
+ @Schema(description = "HTTPS-FMP4流地址")
+ private StreamURL https_fmp4;
+ @Schema(description = "Websocket-FMP4流地址")
+ private StreamURL ws_fmp4;
+ @Schema(description = "Websockets-FMP4流地址")
+ private StreamURL wss_fmp4;
+ @Schema(description = "HLS流地址")
+ private StreamURL hls;
+ @Schema(description = "HTTPS-HLS流地址")
+ private StreamURL https_hls;
+ @Schema(description = "Websocket-HLS流地址")
+ private StreamURL ws_hls;
+ @Schema(description = "Websockets-HLS流地址")
+ private StreamURL wss_hls;
+ @Schema(description = "HTTP-TS流地址")
+ private StreamURL ts;
+ @Schema(description = "HTTPS-TS流地址")
+ private StreamURL https_ts;
+ @Schema(description = "Websocket-TS流地址")
+ private StreamURL ws_ts;
+ @Schema(description = "Websockets-TS流地址")
+ private StreamURL wss_ts;
+ @Schema(description = "RTMP流地址")
+ private StreamURL rtmp;
+ @Schema(description = "RTMPS流地址")
+ private StreamURL rtmps;
+ @Schema(description = "RTSP流地址")
+ private StreamURL rtsp;
+ @Schema(description = "RTSPS流地址")
+ private StreamURL rtsps;
+ @Schema(description = "RTC流地址")
+ private StreamURL rtc;
+
+ @Schema(description = "RTCS流地址")
+ private StreamURL rtcs;
+ @Schema(description = "流媒体节点")
+ private MediaServer mediaServer;
+ @Schema(description = "流编码信息")
+ private MediaInfo mediaInfo;
+ @Schema(description = "开始时间")
+ private String startTime;
+ @Schema(description = "结束时间")
+ private String endTime;
+ @Schema(description = "时长(回放时使用)")
+ private Double duration;
+ @Schema(description = "进度(录像下载使用)")
+ private double progress;
+ @Schema(description = "文件下载地址(录像下载使用)")
+ private DownloadFileInfo downLoadFilePath;
+ @Schema(description = "点播请求的callId")
+ private String callId;
+
+ @Schema(description = "是否暂停(录像回放使用)")
+ private boolean pause;
+
+ @Schema(description = "产生源类型,包括 unknown = 0,rtmp_push=1,rtsp_push=2,rtp_push=3,pull=4,ffmpeg_pull=5,mp4_vod=6,device_chn=7")
+ private int originType;
+
+ @Schema(description = "originType的文本描述")
+ private String originTypeStr;
+
+ @Schema(description = "转码后的视频流")
+ private StreamInfo transcodeStream;
+
+ @Schema(description = "使用的WVP ID")
+ private String serverId;
+
+ @Schema(description = "流绑定的流媒体操作key")
+ private String key;
+
+ public void setRtmp(String host, Integer port, Integer sslPort, String app, String stream, String callIdParam) {
+ String file = String.format("%s/%s%s", app, stream, callIdParam);
+ if (port != null && port > 0) {
+ this.rtmp = new StreamURL("rtmp", host, port, file);
+ }
+ if (sslPort != null && sslPort > 0) {
+ this.rtmps = new StreamURL("rtmps", host, sslPort, file);
+ }
+ }
+
+ public void setRtsp(String host, Integer port, Integer sslPort, String app, String stream, String callIdParam) {
+ String file = String.format("%s/%s%s", app, stream, callIdParam);
+ if (port != null && port > 0) {
+ this.rtsp = new StreamURL("rtsp", host, port, file);
+ }
+ if (sslPort != null && sslPort > 0) {
+ this.rtsps = new StreamURL("rtsps", host, sslPort, file);
+ }
+ }
+
+ public void setFlv(String host, Integer port, Integer sslPort, String file) {
+ if (port != null && port > 0) {
+ this.flv = new StreamURL("http", host, port, file);
+ }
+ if (sslPort != null && sslPort > 0) {
+ this.https_flv = new StreamURL("https", host, sslPort, file);
+ }
+ }
+
+ public void setWsFlv(String host, Integer port, Integer sslPort, String file) {
+ if (port != null && port > 0) {
+ this.ws_flv = new StreamURL("ws", host, port, file);
+ }
+ if (sslPort != null && sslPort > 0) {
+ this.wss_flv = new StreamURL("wss", host, sslPort, file);
+ }
+ }
+
+ public void setFmp4(String host, Integer port, Integer sslPort, String file) {
+ if (port != null && port > 0) {
+ this.fmp4 = new StreamURL("http", host, port, file);
+ }
+ if (sslPort != null && sslPort > 0) {
+ this.https_fmp4 = new StreamURL("https", host, sslPort, file);
+ }
+ }
+
+ public void setWsMp4(String host, Integer port, Integer sslPort, String file) {
+ if (port != null && port > 0) {
+ this.ws_fmp4 = new StreamURL("ws", host, port, file);
+ }
+ if (sslPort != null && sslPort > 0) {
+ this.wss_fmp4 = new StreamURL("wss", host, sslPort, file);
+ }
+ }
+
+ public void setHls(String host, Integer port, Integer sslPort, String app, String stream, String callIdParam) {
+ String file = String.format("%s/%s/hls.m3u8%s", app, stream, callIdParam);
+ if (port != null && port > 0) {
+ this.hls = new StreamURL("http", host, port, file);
+ }
+ if (sslPort != null && sslPort > 0) {
+ this.https_hls = new StreamURL("https", host, sslPort, file);
+ }
+ }
+
+ public void setWsHls(String host, Integer port, Integer sslPort, String app, String stream, String callIdParam) {
+ String file = String.format("%s/%s/hls.m3u8%s", app, stream, callIdParam);
+ if (port != null && port > 0) {
+ this.ws_hls = new StreamURL("ws", host, port, file);
+ }
+ if (sslPort != null && sslPort > 0) {
+ this.wss_hls = new StreamURL("wss", host, sslPort, file);
+ }
+ }
+
+ public void setTs(String host, Integer port, Integer sslPort, String app, String stream, String callIdParam) {
+ String file = String.format("%s/%s.live.ts%s", app, stream, callIdParam);
+
+ if (port != null && port > 0) {
+ this.ts = new StreamURL("http", host, port, file);
+ }
+ if (sslPort != null && sslPort > 0) {
+ this.https_ts = new StreamURL("https", host, sslPort, file);
+ }
+ }
+
+ public void setWsTs(String host, Integer port, Integer sslPort, String app, String stream, String callIdParam) {
+ String file = String.format("%s/%s.live.ts%s", app, stream, callIdParam);
+
+ if (port != null && port > 0) {
+ this.ws_ts = new StreamURL("ws", host, port, file);
+ }
+ if (sslPort != null && sslPort > 0) {
+ this.wss_ts = new StreamURL("wss", host, sslPort, file);
+ }
+ }
+
+ public void setRtc(String host, Integer port, Integer sslPort, String app, String stream, String callIdParam, boolean isPlay) {
+ if (callIdParam != null) {
+ callIdParam = Objects.equals(callIdParam, "") ? callIdParam : callIdParam.replace("?", "&");
+ }
+// String file = String.format("%s/%s?type=%s%s", app, stream, isPlay?"play":"push", callIdParam);
+ String file = String.format("index/api/webrtc?app=%s&stream=%s&type=%s%s", app, stream, isPlay?"play":"push", callIdParam);
+ if (port > 0) {
+ this.rtc = new StreamURL("http", host, port, file);
+ }
+ if (sslPort > 0) {
+ this.rtcs = new StreamURL("https", host, sslPort, file);
+ }
+ }
+
+ public void changeStreamIp(String localAddr) {
+ if (this.flv != null) {
+ this.flv.setHost(localAddr);
+ }
+ if (this.ws_flv != null ){
+ this.ws_flv.setHost(localAddr);
+ }
+ if (this.hls != null ) {
+ this.hls.setHost(localAddr);
+ }
+ if (this.ws_hls != null ) {
+ this.ws_hls.setHost(localAddr);
+ }
+ if (this.ts != null ) {
+ this.ts.setHost(localAddr);
+ }
+ if (this.ws_ts != null ) {
+ this.ws_ts.setHost(localAddr);
+ }
+ if (this.fmp4 != null ) {
+ this.fmp4.setHost(localAddr);
+ }
+ if (this.ws_fmp4 != null ) {
+ this.ws_fmp4.setHost(localAddr);
+ }
+ if (this.rtc != null ) {
+ this.rtc.setHost(localAddr);
+ }
+ if (this.https_flv != null) {
+ this.https_flv.setHost(localAddr);
+ }
+ if (this.wss_flv != null) {
+ this.wss_flv.setHost(localAddr);
+ }
+ if (this.https_hls != null) {
+ this.https_hls.setHost(localAddr);
+ }
+ if (this.wss_hls != null) {
+ this.wss_hls.setHost(localAddr);
+ }
+ if (this.wss_ts != null) {
+ this.wss_ts.setHost(localAddr);
+ }
+ if (this.https_fmp4 != null) {
+ this.https_fmp4.setHost(localAddr);
+ }
+ if (this.wss_fmp4 != null) {
+ this.wss_fmp4.setHost(localAddr);
+ }
+ if (this.rtcs != null) {
+ this.rtcs.setHost(localAddr);
+ }
+ if (this.rtsp != null) {
+ this.rtsp.setHost(localAddr);
+ }
+ if (this.rtsps != null) {
+ this.rtsps.setHost(localAddr);
+ }
+ if (this.rtmp != null) {
+ this.rtmp.setHost(localAddr);
+ }
+ if (this.rtmps != null) {
+ this.rtmps.setHost(localAddr);
+ }
+ }
+
+
+ public static class TransactionInfo{
+ public String callId;
+ public String localTag;
+ public String remoteTag;
+ public String branch;
+ }
+
+ private TransactionInfo transactionInfo;
+
+
+ @Override
+ public StreamInfo clone() {
+ StreamInfo instance = null;
+ try{
+ instance = (StreamInfo)super.clone();
+ if (this.flv != null) {
+ instance.flv=this.flv.clone();
+ }
+ if (this.ws_flv != null ){
+ instance.ws_flv= this.ws_flv.clone();
+ }
+ if (this.hls != null ) {
+ instance.hls= this.hls.clone();
+ }
+ if (this.ws_hls != null ) {
+ instance.ws_hls= this.ws_hls.clone();
+ }
+ if (this.ts != null ) {
+ instance.ts= this.ts.clone();
+ }
+ if (this.ws_ts != null ) {
+ instance.ws_ts= this.ws_ts.clone();
+ }
+ if (this.fmp4 != null ) {
+ instance.fmp4= this.fmp4.clone();
+ }
+ if (this.ws_fmp4 != null ) {
+ instance.ws_fmp4= this.ws_fmp4.clone();
+ }
+ if (this.rtc != null ) {
+ instance.rtc= this.rtc.clone();
+ }
+ if (this.https_flv != null) {
+ instance.https_flv= this.https_flv.clone();
+ }
+ if (this.wss_flv != null) {
+ instance.wss_flv= this.wss_flv.clone();
+ }
+ if (this.https_hls != null) {
+ instance.https_hls= this.https_hls.clone();
+ }
+ if (this.wss_hls != null) {
+ instance.wss_hls= this.wss_hls.clone();
+ }
+ if (this.wss_ts != null) {
+ instance.wss_ts= this.wss_ts.clone();
+ }
+ if (this.https_fmp4 != null) {
+ instance.https_fmp4= this.https_fmp4.clone();
+ }
+ if (this.wss_fmp4 != null) {
+ instance.wss_fmp4= this.wss_fmp4.clone();
+ }
+ if (this.rtcs != null) {
+ instance.rtcs= this.rtcs.clone();
+ }
+ if (this.rtsp != null) {
+ instance.rtsp= this.rtsp.clone();
+ }
+ if (this.rtsps != null) {
+ instance.rtsps= this.rtsps.clone();
+ }
+ if (this.rtmp != null) {
+ instance.rtmp= this.rtmp.clone();
+ }
+ if (this.rtmps != null) {
+ instance.rtmps= this.rtmps.clone();
+ }
+ }catch(CloneNotSupportedException e) {
+ e.printStackTrace();
+ }
+ return instance;
+ }
+
+}
diff --git a/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/StreamURL.java b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/StreamURL.java
new file mode 100644
index 0000000..40bd7e2
--- /dev/null
+++ b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/StreamURL.java
@@ -0,0 +1,84 @@
+package com.genersoft.iot.vmp.common;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+
+import java.io.Serializable;
+
+
+@Schema(description = "流地址信息")
+public class StreamURL implements Serializable,Cloneable {
+
+ @Schema(description = "协议")
+ private String protocol;
+
+ @Schema(description = "主机地址")
+ private String host;
+
+ @Schema(description = "端口")
+ private int port = -1;
+
+ @Schema(description = "定位位置")
+ private String file;
+
+ @Schema(description = "拼接后的地址")
+ private String url;
+
+ public StreamURL() {
+ }
+
+ public StreamURL(String protocol, String host, int port, String file) {
+ this.protocol = protocol;
+ this.host = host;
+ this.port = port;
+ this.file = file;
+ }
+
+ public String getProtocol() {
+ return protocol;
+ }
+
+ public void setProtocol(String protocol) {
+ this.protocol = protocol;
+ }
+
+ public String getHost() {
+ return host;
+ }
+
+ public void setHost(String host) {
+ this.host = host;
+ }
+
+ public int getPort() {
+ return port;
+ }
+
+ public void setPort(int port) {
+ this.port = port;
+ }
+
+ public String getFile() {
+ return file;
+ }
+
+ public void setFile(String file) {
+ this.file = file;
+ }
+
+ public String getUrl() {
+ return this.toString();
+ }
+
+ @Override
+ public String toString() {
+ if (protocol != null && host != null && port != -1 ) {
+ return String.format("%s://%s:%s/%s", protocol, host, port, file);
+ }else {
+ return null;
+ }
+ }
+ @Override
+ public StreamURL clone() throws CloneNotSupportedException {
+ return (StreamURL) super.clone();
+ }
+}
diff --git a/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/SubscribeCallback.java b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/SubscribeCallback.java
new file mode 100644
index 0000000..5443b50
--- /dev/null
+++ b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/SubscribeCallback.java
@@ -0,0 +1,7 @@
+package com.genersoft.iot.vmp.common;
+
+import com.genersoft.iot.vmp.gb28181.bean.SipTransactionInfo;
+
+public interface SubscribeCallback{
+ public void run(String deviceId, SipTransactionInfo transactionInfo);
+}
diff --git a/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/SystemAllInfo.java b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/SystemAllInfo.java
new file mode 100644
index 0000000..48485da
--- /dev/null
+++ b/docker/wvp/wvpcode/src/main/java/com/genersoft/iot/vmp/common/SystemAllInfo.java
@@ -0,0 +1,54 @@
+package com.genersoft.iot.vmp.common;
+
+import java.util.List;
+
+public class SystemAllInfo {
+
+ private List