From 4a4692342a4ba22283d5e580d15b645f3be65da0 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期三, 21 八月 2024 15:03:40 +0800
Subject: [PATCH] 对接wvp获取rtsp视频流取图片定时任务
---
ycl-pojo/src/main/java/com/ycl/platform/wvp/ErrorCode.java | 30
ycl-pojo/src/main/java/com/ycl/platform/wvp/MediaServer.java | 390 +++++
ycl-server/src/main/java/com/ycl/platform/service/DeviceInfoService.java | 15
ycl-pojo/src/main/java/com/ycl/platform/domain/vo/DeviceInfoVO.java | 39
ycl-server/src/main/resources/application-prod.yml | 4
ycl-server/src/main/java/com/ycl/platform/mapper/DeviceInfoMapper.java | 22
ycl-pojo/src/main/java/com/ycl/platform/wvp/WVPResult.java | 75 +
ycl-server/src/main/java/com/ycl/task/WorkOrderImgTask.java | 48
ycl-server/src/main/java/com/ycl/platform/service/impl/WorkOrderServiceImpl.java | 68
ycl-server/src/main/java/com/ycl/platform/mapper/WorkOrderMapper.java | 7
ycl-pojo/src/main/java/com/ycl/platform/wvp/OnStreamChangedHookParam.java | 534 +++++++
ycl-pojo/src/main/java/com/ycl/platform/wvp/MediaInfo.java | 315 ++++
ycl-pojo/src/main/java/com/ycl/platform/wvp/StreamContent.java | 442 ++++++
ycl-pojo/src/main/java/com/ycl/platform/wvp/StreamInfo.java | 647 +++++++++
ycl-server/src/main/resources/mapper/zgyw/WorkOrderMapper.xml | 10
ycl-server/pom.xml | 7
ycl-pojo/src/main/java/com/ycl/platform/wvp/StreamURL.java | 84 +
ycl-server/src/main/resources/application-dev.yml | 4
ycl-pojo/src/main/java/com/ycl/platform/wvp/DownloadFileInfo.java | 41
ycl-server/src/main/java/com/ycl/platform/service/WorkOrderService.java | 26
ycl-pojo/src/main/java/com/ycl/platform/domain/form/DeviceInfoForm.java | 18
ycl-server/src/main/java/com/ycl/platform/service/impl/DeviceInfoServiceImpl.java | 23
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/WorkOrder.java | 4
ycl-pojo/src/main/java/com/ycl/platform/wvp/HookParam.java | 19
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/DeviceInfo.java | 30
ycl-pojo/src/main/java/com/ycl/platform/wvp/ZLMServerConfig.java | 1224 +++++++++++++++++
26 files changed, 4,126 insertions(+), 0 deletions(-)
diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/DeviceInfo.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/DeviceInfo.java
new file mode 100644
index 0000000..f8a17e0
--- /dev/null
+++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/DeviceInfo.java
@@ -0,0 +1,30 @@
+package com.ycl.platform.domain.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.ycl.platform.base.AbsEntity;
+import lombok.Data;
+
+/**
+ * 鍥芥爣绾ц仈鍚屾鏁版嵁
+ *
+ * @author xp
+ * @since 2024-08-21
+ */
+@Data
+@TableName("t_device_info")
+public class DeviceInfo extends AbsEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableField("device_id")
+ /** 璁惧缂栧彿/鍥芥爣鐮� */
+ private String deviceId;
+
+ @TableField("channel_id")
+ /** 璁惧閫氶亾ID */
+ private String channelId;
+
+
+}
diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/WorkOrder.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/WorkOrder.java
index d895863..48d9220 100644
--- a/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/WorkOrder.java
+++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/WorkOrder.java
@@ -66,6 +66,10 @@
@TableField("yw_condition")
private String ywCondition;
+ @ApiModelProperty("杩愮淮妫�娴嬫儏鍐�/涓�寮犲浘")
+ @TableField("yw_check_condition")
+ private String ywCheckCondition;
+
@ApiModelProperty("澶勭悊鏈熼檺")
@TableField("processing_period")
private Integer processingPeriod;
diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/form/DeviceInfoForm.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/form/DeviceInfoForm.java
new file mode 100644
index 0000000..fc9426d
--- /dev/null
+++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/form/DeviceInfoForm.java
@@ -0,0 +1,18 @@
+package com.ycl.platform.domain.form;
+
+import com.ycl.platform.base.AbsForm;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+/**
+ * 鍥芥爣绾ц仈鍚屾鏁版嵁琛ㄥ崟
+ *
+ * @author xp
+ * @since 2024-08-21
+ */
+@Data
+@ApiModel(value = "DeviceInfo琛ㄥ崟", description = "鍥芥爣绾ц仈鍚屾鏁版嵁琛ㄥ崟")
+public class DeviceInfoForm extends AbsForm {
+
+
+}
diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/vo/DeviceInfoVO.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/vo/DeviceInfoVO.java
new file mode 100644
index 0000000..bcb6362
--- /dev/null
+++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/vo/DeviceInfoVO.java
@@ -0,0 +1,39 @@
+package com.ycl.platform.domain.vo;
+
+import com.ycl.platform.base.AbsVo;
+import com.ycl.platform.domain.entity.DeviceInfo;
+import org.springframework.lang.NonNull;
+import org.springframework.beans.BeanUtils;
+import lombok.Data;
+import java.util.Date;
+
+/**
+ * 鍥芥爣绾ц仈鍚屾鏁版嵁灞曠ず
+ *
+ * @author xp
+ * @since 2024-08-21
+ */
+@Data
+public class DeviceInfoVO extends AbsVo {
+
+ /** 宸ュ崟ID */
+ private Integer workOrderId;
+
+ /** 璁惧缂栧彿/鍥芥爣鐮� */
+ private String deviceId;
+
+ /** 璁惧閫氶亾ID */
+ private String channelId;
+
+ /** 鍒涘缓鏃堕棿 */
+ private Date createTime;
+
+ public static DeviceInfoVO getVoByEntity(@NonNull DeviceInfo entity, DeviceInfoVO vo) {
+ if(vo == null) {
+ vo = new DeviceInfoVO();
+ }
+ BeanUtils.copyProperties(entity, vo);
+ return vo;
+ }
+
+}
diff --git a/ycl-pojo/src/main/java/com/ycl/platform/wvp/DownloadFileInfo.java b/ycl-pojo/src/main/java/com/ycl/platform/wvp/DownloadFileInfo.java
new file mode 100644
index 0000000..b680852
--- /dev/null
+++ b/ycl-pojo/src/main/java/com/ycl/platform/wvp/DownloadFileInfo.java
@@ -0,0 +1,41 @@
+package com.ycl.platform.wvp;
+
+public class DownloadFileInfo {
+
+ private String httpPath;
+ private String httpsPath;
+ private String httpDomainPath;
+ private String httpsDomainPath;
+
+ public String getHttpPath() {
+ return httpPath;
+ }
+
+ public void setHttpPath(String httpPath) {
+ this.httpPath = httpPath;
+ }
+
+ public String getHttpsPath() {
+ return httpsPath;
+ }
+
+ public void setHttpsPath(String httpsPath) {
+ this.httpsPath = httpsPath;
+ }
+
+ public String getHttpDomainPath() {
+ return httpDomainPath;
+ }
+
+ public void setHttpDomainPath(String httpDomainPath) {
+ this.httpDomainPath = httpDomainPath;
+ }
+
+ public String getHttpsDomainPath() {
+ return httpsDomainPath;
+ }
+
+ public void setHttpsDomainPath(String httpsDomainPath) {
+ this.httpsDomainPath = httpsDomainPath;
+ }
+}
diff --git a/ycl-pojo/src/main/java/com/ycl/platform/wvp/ErrorCode.java b/ycl-pojo/src/main/java/com/ycl/platform/wvp/ErrorCode.java
new file mode 100644
index 0000000..1da3747
--- /dev/null
+++ b/ycl-pojo/src/main/java/com/ycl/platform/wvp/ErrorCode.java
@@ -0,0 +1,30 @@
+package com.ycl.platform.wvp;
+
+/**
+ * 鍏ㄥ眬閿欒鐮�
+ */
+public enum ErrorCode {
+ SUCCESS(0, "鎴愬姛"),
+ ERROR100(100, "澶辫触"),
+ ERROR400(400, "鍙傛暟鎴栨柟娉曢敊璇�"),
+ ERROR404(404, "璧勬簮鏈壘鍒�"),
+ ERROR403(403, "鏃犳潈闄愭搷浣�"),
+ ERROR401(401, "璇风櫥褰曞悗閲嶆柊璇锋眰"),
+ ERROR500(500, "绯荤粺寮傚父");
+
+ private final int code;
+ private final String msg;
+
+ ErrorCode(int code, String msg) {
+ this.code = code;
+ this.msg = msg;
+ }
+
+ public int getCode() {
+ return code;
+ }
+
+ public String getMsg() {
+ return msg;
+ }
+}
diff --git a/ycl-pojo/src/main/java/com/ycl/platform/wvp/HookParam.java b/ycl-pojo/src/main/java/com/ycl/platform/wvp/HookParam.java
new file mode 100644
index 0000000..45514d0
--- /dev/null
+++ b/ycl-pojo/src/main/java/com/ycl/platform/wvp/HookParam.java
@@ -0,0 +1,19 @@
+package com.ycl.platform.wvp;
+
+/**
+ * zlm hook浜嬩欢鐨勫弬鏁�
+ * @author lin
+ */
+public class HookParam {
+ private String mediaServerId;
+
+
+
+ public String getMediaServerId() {
+ return mediaServerId;
+ }
+
+ public void setMediaServerId(String mediaServerId) {
+ this.mediaServerId = mediaServerId;
+ }
+}
diff --git a/ycl-pojo/src/main/java/com/ycl/platform/wvp/MediaInfo.java b/ycl-pojo/src/main/java/com/ycl/platform/wvp/MediaInfo.java
new file mode 100644
index 0000000..397dceb
--- /dev/null
+++ b/ycl-pojo/src/main/java/com/ycl/platform/wvp/MediaInfo.java
@@ -0,0 +1,315 @@
+package com.ycl.platform.wvp;
+
+import com.alibaba.fastjson2.JSONArray;
+import com.alibaba.fastjson2.JSONObject;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+import java.util.List;
+
+/**
+ * 瑙嗛淇℃伅
+ */
+@Schema(description = "瑙嗛淇℃伅")
+public class MediaInfo {
+ @Schema(description = "搴旂敤鍚�")
+ private String app;
+ @Schema(description = "娴両D")
+ private String stream;
+ @Schema(description = "娴佸獟浣撹妭鐐�")
+ private MediaServer mediaServer;
+ @Schema(description = "鍗忚")
+ private String schema;
+
+ @Schema(description = "瑙傜湅浜烘暟")
+ private Integer readerCount;
+ @Schema(description = "瑙嗛缂栫爜绫诲瀷")
+ private String videoCodec;
+ @Schema(description = "瑙嗛瀹藉害")
+ private Integer width;
+ @Schema(description = "瑙嗛楂樺害")
+ private Integer height;
+ @Schema(description = "闊抽缂栫爜绫诲瀷")
+ private String audioCodec;
+ @Schema(description = "闊抽閫氶亾鏁�")
+ private Integer audioChannels;
+ @Schema(description = "闊抽閲囨牱鐜�")
+ private Integer audioSampleRate;
+ @Schema(description = "闊抽閲囨牱鐜�")
+ private Long duration;
+ @Schema(description = "鍦ㄧ嚎")
+ private Boolean online;
+ @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 Integer originType;
+ @Schema(description = "瀛樻椿鏃堕棿锛屽崟浣嶇")
+ private Long aliveSecond;
+ @Schema(description = "鏁版嵁浜х敓閫熷害锛屽崟浣峛yte/s")
+ private Long bytesSpeed;
+ @Schema(description = "閴存潈鍙傛暟")
+ private String callId;
+
+ public static MediaInfo getInstance(JSONObject jsonObject, MediaServer mediaServer) {
+ MediaInfo mediaInfo = new MediaInfo();
+ mediaInfo.setMediaServer(mediaServer);
+ String app = jsonObject.getString("app");
+ mediaInfo.setApp(app);
+ String stream = jsonObject.getString("stream");
+ mediaInfo.setStream(stream);
+ String schema = jsonObject.getString("schema");
+ mediaInfo.setSchema(schema);
+ Integer totalReaderCount = jsonObject.getInteger("totalReaderCount");
+ Boolean online = jsonObject.getBoolean("online");
+ Integer originType = jsonObject.getInteger("originType");
+ Long aliveSecond = jsonObject.getLong("aliveSecond");
+ Long bytesSpeed = jsonObject.getLong("bytesSpeed");
+ if (totalReaderCount != null) {
+ mediaInfo.setReaderCount(totalReaderCount);
+ }
+ if (online != null) {
+ mediaInfo.setOnline(online);
+ }
+ if (originType != null) {
+ mediaInfo.setOriginType(originType);
+ }
+ if (aliveSecond != null) {
+ mediaInfo.setAliveSecond(aliveSecond);
+ }
+ if (bytesSpeed != null) {
+ mediaInfo.setBytesSpeed(bytesSpeed);
+ }
+ JSONArray jsonArray = jsonObject.getJSONArray("tracks");
+ if (jsonArray.isEmpty()) {
+ return null;
+ }
+ for (int i = 0; i < jsonArray.size(); i++) {
+ JSONObject trackJson = jsonArray.getJSONObject(i);
+ Integer channels = trackJson.getInteger("channels");
+ Integer codecId = trackJson.getInteger("codec_id");
+ Integer codecType = trackJson.getInteger("codec_type");
+ Integer sampleRate = trackJson.getInteger("sample_rate");
+ Integer height = trackJson.getInteger("height");
+ Integer width = trackJson.getInteger("height");
+ Long duration = trackJson.getLongValue("duration");
+ if (channels != null) {
+ mediaInfo.setAudioChannels(channels);
+ }
+ if (sampleRate != null) {
+ mediaInfo.setAudioSampleRate(sampleRate);
+ }
+ if (height != null) {
+ mediaInfo.setHeight(height);
+ }
+ if (width != null) {
+ mediaInfo.setWidth(width);
+ }
+ if (duration > 0L) {
+ mediaInfo.setDuration(duration);
+ }
+ if (codecId != null) {
+ switch (codecId) {
+ case 0:
+ mediaInfo.setVideoCodec("H264");
+ break;
+ case 1:
+ mediaInfo.setVideoCodec("H265");
+ break;
+ case 2:
+ mediaInfo.setAudioCodec("AAC");
+ break;
+ case 3:
+ mediaInfo.setAudioCodec("G711A");
+ break;
+ case 4:
+ mediaInfo.setAudioCodec("G711U");
+ break;
+ }
+ }
+ }
+ return mediaInfo;
+ }
+
+ public static MediaInfo getInstance(OnStreamChangedHookParam param, MediaServer mediaServer) {
+
+ MediaInfo mediaInfo = new MediaInfo();
+ mediaInfo.setApp(param.getApp());
+ mediaInfo.setStream(param.getStream());
+ mediaInfo.setSchema(param.getSchema());
+ mediaInfo.setMediaServer(mediaServer);
+ mediaInfo.setReaderCount(param.getTotalReaderCount());
+ mediaInfo.setOnline(param.isRegist());
+ mediaInfo.setOriginType(param.getOriginType());
+ mediaInfo.setAliveSecond(param.getAliveSecond());
+ mediaInfo.setBytesSpeed(param.getBytesSpeed());
+ List<OnStreamChangedHookParam.MediaTrack> tracks = param.getTracks();
+ if (tracks == null || tracks.isEmpty()) {
+ return mediaInfo;
+ }
+ for (OnStreamChangedHookParam.MediaTrack mediaTrack : tracks) {
+ switch (mediaTrack.getCodec_id()) {
+ case 0:
+ mediaInfo.setVideoCodec("H264");
+ break;
+ case 1:
+ mediaInfo.setVideoCodec("H265");
+ break;
+ case 2:
+ mediaInfo.setAudioCodec("AAC");
+ break;
+ case 3:
+ mediaInfo.setAudioCodec("G711A");
+ break;
+ case 4:
+ mediaInfo.setAudioCodec("G711U");
+ break;
+ }
+ if (mediaTrack.getSample_rate() > 0) {
+ mediaInfo.setAudioSampleRate(mediaTrack.getSample_rate());
+ }
+ if (mediaTrack.getChannels() > 0) {
+ mediaInfo.setAudioChannels(mediaTrack.getChannels());
+ }
+ if (mediaTrack.getHeight() > 0) {
+ mediaInfo.setHeight(mediaTrack.getHeight());
+ }
+ if (mediaTrack.getWidth() > 0) {
+ mediaInfo.setWidth(mediaTrack.getWidth());
+ }
+ }
+ return mediaInfo;
+ }
+
+ public Integer getReaderCount() {
+ return readerCount;
+ }
+
+ public void setReaderCount(Integer readerCount) {
+ this.readerCount = readerCount;
+ }
+
+ public String getVideoCodec() {
+ return videoCodec;
+ }
+
+ public void setVideoCodec(String videoCodec) {
+ this.videoCodec = videoCodec;
+ }
+
+ public Integer getWidth() {
+ return width;
+ }
+
+ public void setWidth(Integer width) {
+ this.width = width;
+ }
+
+ public Integer getHeight() {
+ return height;
+ }
+
+ public void setHeight(Integer height) {
+ this.height = height;
+ }
+
+ public String getAudioCodec() {
+ return audioCodec;
+ }
+
+ public void setAudioCodec(String audioCodec) {
+ this.audioCodec = audioCodec;
+ }
+
+ public Integer getAudioChannels() {
+ return audioChannels;
+ }
+
+ public void setAudioChannels(Integer audioChannels) {
+ this.audioChannels = audioChannels;
+ }
+
+ public Integer getAudioSampleRate() {
+ return audioSampleRate;
+ }
+
+ public void setAudioSampleRate(Integer audioSampleRate) {
+ this.audioSampleRate = audioSampleRate;
+ }
+
+ public Long getDuration() {
+ return duration;
+ }
+
+ public void setDuration(Long duration) {
+ this.duration = duration;
+ }
+
+ public Boolean getOnline() {
+ return online;
+ }
+
+ public void setOnline(Boolean online) {
+ this.online = online;
+ }
+
+ public Integer getOriginType() {
+ return originType;
+ }
+
+ public void setOriginType(Integer originType) {
+ this.originType = originType;
+ }
+
+ public Long getAliveSecond() {
+ return aliveSecond;
+ }
+
+ public void setAliveSecond(Long aliveSecond) {
+ this.aliveSecond = aliveSecond;
+ }
+
+ public Long getBytesSpeed() {
+ return bytesSpeed;
+ }
+
+ public void setBytesSpeed(Long bytesSpeed) {
+ this.bytesSpeed = bytesSpeed;
+ }
+
+ public String getApp() {
+ return app;
+ }
+
+ public void setApp(String app) {
+ this.app = app;
+ }
+
+ public String getStream() {
+ return stream;
+ }
+
+ public void setStream(String stream) {
+ this.stream = stream;
+ }
+
+ public MediaServer getMediaServer() {
+ return mediaServer;
+ }
+
+ public void setMediaServer(MediaServer mediaServer) {
+ this.mediaServer = mediaServer;
+ }
+
+ public String getSchema() {
+ return schema;
+ }
+
+ public void setSchema(String schema) {
+ this.schema = schema;
+ }
+
+ public String getCallId() {
+ return callId;
+ }
+
+ public void setCallId(String callId) {
+ this.callId = callId;
+ }
+}
diff --git a/ycl-pojo/src/main/java/com/ycl/platform/wvp/MediaServer.java b/ycl-pojo/src/main/java/com/ycl/platform/wvp/MediaServer.java
new file mode 100644
index 0000000..153cf3a
--- /dev/null
+++ b/ycl-pojo/src/main/java/com/ycl/platform/wvp/MediaServer.java
@@ -0,0 +1,390 @@
+package com.ycl.platform.wvp;
+
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import org.springframework.util.ObjectUtils;
+
+@Schema(description = "娴佸獟浣撴湇鍔′俊鎭�")
+public class MediaServer {
+
+ @Schema(description = "ID")
+ private String id;
+
+ @Schema(description = "IP")
+ private String ip;
+
+ @Schema(description = "hook浣跨敤鐨処P锛坺lm璁块棶WVP浣跨敤鐨処P锛�")
+ private String hookIp = "127.0.0.1";
+
+ @Schema(description = "SDP IP")
+ private String sdpIp;
+
+ @Schema(description = "娴両P")
+ private String streamIp;
+
+ @Schema(description = "HTTP绔彛")
+ private int httpPort;
+
+ @Schema(description = "HTTPS绔彛")
+ private int httpSSlPort;
+
+ @Schema(description = "RTMP绔彛")
+ private int rtmpPort;
+
+ @Schema(description = "flv绔彛")
+ private int flvPort;
+
+ @Schema(description = "https-flv绔彛")
+ private int flvSSLPort;
+
+ @Schema(description = "ws-flv绔彛")
+ private int wsFlvPort;
+
+ @Schema(description = "wss-flv绔彛")
+ private int wsFlvSSLPort;
+
+ @Schema(description = "RTMPS绔彛")
+ private int rtmpSSlPort;
+
+ @Schema(description = "RTP鏀舵祦绔彛锛堝崟绔彛妯″紡鏈夌敤锛�")
+ private int rtpProxyPort;
+
+ @Schema(description = "RTSP绔彛")
+ private int rtspPort;
+
+ @Schema(description = "RTSPS绔彛")
+ private int rtspSSLPort;
+
+ @Schema(description = "鏄惁寮�鍚嚜鍔ㄩ厤缃甖LM")
+ private boolean autoConfig;
+
+ @Schema(description = "ZLM閴存潈鍙傛暟")
+ private String secret;
+
+ @Schema(description = "keepalive hook瑙﹀彂闂撮殧,鍗曚綅绉�")
+ private Float hookAliveInterval;
+
+ @Schema(description = "鏄惁浣跨敤澶氱鍙fā寮�")
+ private boolean rtpEnable;
+
+ @Schema(description = "鐘舵��")
+ private boolean status;
+
+ @Schema(description = "澶氱鍙TP鏀舵祦绔彛鑼冨洿")
+ private String rtpPortRange;
+
+ @Schema(description = "RTP鍙戞祦绔彛鑼冨洿")
+ private String sendRtpPortRange;
+
+ @Schema(description = "assist鏈嶅姟绔彛")
+ private int recordAssistPort;
+
+ @Schema(description = "鍒涘缓鏃堕棿")
+ private String createTime;
+
+ @Schema(description = "鏇存柊鏃堕棿")
+ private String updateTime;
+
+ @Schema(description = "涓婃蹇冭烦鏃堕棿")
+ private String lastKeepaliveTime;
+
+ @Schema(description = "鏄惁鏄粯璁LM")
+ private boolean defaultServer;
+
+ @Schema(description = "褰曞儚瀛樺偍鏃堕暱")
+ private int recordDay;
+
+ @Schema(description = "褰曞儚瀛樺偍璺緞")
+ private String recordPath;
+ @Schema(description = "绫诲瀷锛� zlm/abl")
+ private String type;
+
+ @Schema(description = "杞爜鐨勫墠缂�")
+ private String transcodeSuffix;
+
+ public MediaServer() {
+ }
+
+ public MediaServer(ZLMServerConfig zlmServerConfig, String sipIp) {
+ id = zlmServerConfig.getGeneralMediaServerId();
+ ip = zlmServerConfig.getIp();
+ hookIp = ObjectUtils.isEmpty(zlmServerConfig.getHookIp())? sipIp: zlmServerConfig.getHookIp();
+ sdpIp = ObjectUtils.isEmpty(zlmServerConfig.getSdpIp())? zlmServerConfig.getIp(): zlmServerConfig.getSdpIp();
+ streamIp = ObjectUtils.isEmpty(zlmServerConfig.getStreamIp())? zlmServerConfig.getIp(): zlmServerConfig.getStreamIp();
+ httpPort = zlmServerConfig.getHttpPort();
+ flvPort = zlmServerConfig.getHttpPort();
+ wsFlvPort = zlmServerConfig.getHttpPort();
+ httpSSlPort = zlmServerConfig.getHttpSSLport();
+ flvSSLPort = zlmServerConfig.getHttpSSLport();
+ wsFlvSSLPort = zlmServerConfig.getHttpSSLport();
+ rtmpPort = zlmServerConfig.getRtmpPort();
+ rtmpSSlPort = zlmServerConfig.getRtmpSslPort();
+ rtpProxyPort = zlmServerConfig.getRtpProxyPort();
+ rtspPort = zlmServerConfig.getRtspPort();
+ rtspSSLPort = zlmServerConfig.getRtspSSlport();
+ autoConfig = true; // 榛樿鍊紅rue;
+ secret = zlmServerConfig.getApiSecret();
+ hookAliveInterval = zlmServerConfig.getHookAliveInterval();
+ rtpEnable = false; // 榛樿浣跨敤鍗曠鍙�;鐩村埌鐢ㄦ埛鑷繁璁剧疆寮�鍚绔彛
+ rtpPortRange = zlmServerConfig.getPortRange().replace("_",","); // 榛樿浣跨敤30000,30500浣滀负绾ц仈鏃跺彂閫佹祦鐨勭鍙e彿
+ recordAssistPort = 0; // 榛樿鍏抽棴
+ transcodeSuffix = zlmServerConfig.getTranscodeSuffix();
+
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getIp() {
+ return ip;
+ }
+
+ public void setIp(String ip) {
+ this.ip = ip;
+ }
+
+ public String getHookIp() {
+ return hookIp;
+ }
+
+ public void setHookIp(String hookIp) {
+ this.hookIp = hookIp;
+ }
+
+ public String getSdpIp() {
+ return sdpIp;
+ }
+
+ public void setSdpIp(String sdpIp) {
+ this.sdpIp = sdpIp;
+ }
+
+ public String getStreamIp() {
+ return streamIp;
+ }
+
+ public void setStreamIp(String streamIp) {
+ this.streamIp = streamIp;
+ }
+
+ public int getHttpPort() {
+ return httpPort;
+ }
+
+ public void setHttpPort(int httpPort) {
+ this.httpPort = httpPort;
+ }
+
+ public int getHttpSSlPort() {
+ return httpSSlPort;
+ }
+
+ public void setHttpSSlPort(int httpSSlPort) {
+ this.httpSSlPort = httpSSlPort;
+ }
+
+ public int getRtmpPort() {
+ return rtmpPort;
+ }
+
+ public void setRtmpPort(int rtmpPort) {
+ this.rtmpPort = rtmpPort;
+ }
+
+ public int getRtmpSSlPort() {
+ return rtmpSSlPort;
+ }
+
+ public void setRtmpSSlPort(int rtmpSSlPort) {
+ this.rtmpSSlPort = rtmpSSlPort;
+ }
+
+ public int getRtpProxyPort() {
+ return rtpProxyPort;
+ }
+
+ public void setRtpProxyPort(int rtpProxyPort) {
+ this.rtpProxyPort = rtpProxyPort;
+ }
+
+ public int getRtspPort() {
+ return rtspPort;
+ }
+
+ public void setRtspPort(int rtspPort) {
+ this.rtspPort = rtspPort;
+ }
+
+ public int getRtspSSLPort() {
+ return rtspSSLPort;
+ }
+
+ public void setRtspSSLPort(int rtspSSLPort) {
+ this.rtspSSLPort = rtspSSLPort;
+ }
+
+ public boolean isAutoConfig() {
+ return autoConfig;
+ }
+
+ public void setAutoConfig(boolean autoConfig) {
+ this.autoConfig = autoConfig;
+ }
+
+ public String getSecret() {
+ return secret;
+ }
+
+ public void setSecret(String secret) {
+ this.secret = secret;
+ }
+
+ public boolean isRtpEnable() {
+ return rtpEnable;
+ }
+
+ public void setRtpEnable(boolean rtpEnable) {
+ this.rtpEnable = rtpEnable;
+ }
+
+ public String getRtpPortRange() {
+ return rtpPortRange;
+ }
+
+ public void setRtpPortRange(String rtpPortRange) {
+ this.rtpPortRange = rtpPortRange;
+ }
+
+ public int getRecordAssistPort() {
+ return recordAssistPort;
+ }
+
+ public void setRecordAssistPort(int recordAssistPort) {
+ this.recordAssistPort = recordAssistPort;
+ }
+
+ public boolean isDefaultServer() {
+ return defaultServer;
+ }
+
+ public void setDefaultServer(boolean defaultServer) {
+ this.defaultServer = defaultServer;
+ }
+
+ public String getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(String createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getUpdateTime() {
+ return updateTime;
+ }
+
+ public void setUpdateTime(String updateTime) {
+ this.updateTime = updateTime;
+ }
+
+ public boolean isStatus() {
+ return status;
+ }
+
+ public void setStatus(boolean status) {
+ this.status = status;
+ }
+
+ public String getLastKeepaliveTime() {
+ return lastKeepaliveTime;
+ }
+
+ public void setLastKeepaliveTime(String lastKeepaliveTime) {
+ this.lastKeepaliveTime = lastKeepaliveTime;
+ }
+
+ public Float getHookAliveInterval() {
+ return hookAliveInterval;
+ }
+
+ public void setHookAliveInterval(Float hookAliveInterval) {
+ this.hookAliveInterval = hookAliveInterval;
+ }
+
+ public String getSendRtpPortRange() {
+ return sendRtpPortRange;
+ }
+
+ public void setSendRtpPortRange(String sendRtpPortRange) {
+ this.sendRtpPortRange = sendRtpPortRange;
+ }
+
+ public int getRecordDay() {
+ return recordDay;
+ }
+
+ public void setRecordDay(int recordDay) {
+ this.recordDay = recordDay;
+ }
+
+ public String getRecordPath() {
+ return recordPath;
+ }
+
+ public void setRecordPath(String recordPath) {
+ this.recordPath = recordPath;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public int getFlvPort() {
+ return flvPort;
+ }
+
+ public void setFlvPort(int flvPort) {
+ this.flvPort = flvPort;
+ }
+
+ public int getFlvSSLPort() {
+ return flvSSLPort;
+ }
+
+ public void setFlvSSLPort(int flvSSLPort) {
+ this.flvSSLPort = flvSSLPort;
+ }
+
+ public int getWsFlvPort() {
+ return wsFlvPort;
+ }
+
+ public void setWsFlvPort(int wsFlvPort) {
+ this.wsFlvPort = wsFlvPort;
+ }
+
+ public int getWsFlvSSLPort() {
+ return wsFlvSSLPort;
+ }
+
+ public void setWsFlvSSLPort(int wsFlvSSLPort) {
+ this.wsFlvSSLPort = wsFlvSSLPort;
+ }
+
+ public String getTranscodeSuffix() {
+ return transcodeSuffix;
+ }
+
+ public void setTranscodeSuffix(String transcodeSuffix) {
+ this.transcodeSuffix = transcodeSuffix;
+ }
+}
diff --git a/ycl-pojo/src/main/java/com/ycl/platform/wvp/OnStreamChangedHookParam.java b/ycl-pojo/src/main/java/com/ycl/platform/wvp/OnStreamChangedHookParam.java
new file mode 100644
index 0000000..77af473
--- /dev/null
+++ b/ycl-pojo/src/main/java/com/ycl/platform/wvp/OnStreamChangedHookParam.java
@@ -0,0 +1,534 @@
+package com.ycl.platform.wvp;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author lin
+ */
+public class OnStreamChangedHookParam extends HookParam {
+
+ /**
+ * 娉ㄥ唽/娉ㄩ攢
+ */
+ private boolean regist;
+
+ /**
+ * 搴旂敤鍚�
+ */
+ private String app;
+
+ /**
+ * 娴乮d
+ */
+ private String stream;
+
+ /**
+ * 鎺ㄦ祦閴存潈Id
+ */
+ private String callId;
+
+ /**
+ * 瑙傜湅鎬讳汉鏁帮紝鍖呮嫭hls/rtsp/rtmp/http-flv/ws-flv
+ */
+ private int totalReaderCount;
+
+ /**
+ * 鍗忚 鍖呮嫭hls/rtsp/rtmp/http-flv/ws-flv
+ */
+ private String schema;
+
+
+ /**
+ * 浜х敓婧愮被鍨嬶紝
+ * 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;
+
+ /**
+ * 瀹㈡埛绔拰鏈嶅姟鍣ㄧ綉缁滀俊鎭紝鍙兘涓簄ull绫诲瀷
+ */
+ private OriginSock originSock;
+
+ /**
+ * 浜х敓婧愮被鍨嬬殑瀛楃涓叉弿杩�
+ */
+ private String originTypeStr;
+
+ /**
+ * 浜х敓婧愮殑url
+ */
+ private String originUrl;
+
+ /**
+ * 鏈嶅姟鍣╥d
+ */
+ private String severId;
+
+ /**
+ * GMT unix绯荤粺鏃堕棿鎴筹紝鍗曚綅绉�
+ */
+ private Long createStamp;
+
+ /**
+ * 瀛樻椿鏃堕棿锛屽崟浣嶇
+ */
+ private Long aliveSecond;
+
+ /**
+ * 鏁版嵁浜х敓閫熷害锛屽崟浣峛yte/s
+ */
+ private Long bytesSpeed;
+
+ /**
+ * 闊宠棰戣建閬�
+ */
+ private List<MediaTrack> tracks;
+
+ /**
+ * 闊宠棰戣建閬�
+ */
+ private String vhost;
+
+ /**
+ * 棰濆鐨勫弬鏁板瓧绗︿覆
+ */
+ private String params;
+
+ /**
+ * 棰濆鐨勫弬鏁�
+ */
+ private Map<String, String> paramMap;
+
+ public boolean isRegist() {
+ return regist;
+ }
+
+ public void setRegist(boolean regist) {
+ this.regist = regist;
+ }
+
+ /**
+ * 鏄惁鏄痙ocker閮ㄧ讲锛� docker閮ㄧ讲涓嶄細鑷姩鏇存柊zlm浣跨敤鐨勭鍙o紝闇�瑕佽嚜宸辨墜鍔ㄤ慨鏀�
+ */
+ private boolean docker;
+
+ public static class MediaTrack {
+ /**
+ * 闊抽閫氶亾鏁�
+ */
+ private int channels;
+
+ /**
+ * H264 = 0, H265 = 1, AAC = 2, G711A = 3, G711U = 4
+ */
+ private int codec_id;
+
+ /**
+ * 缂栫爜绫诲瀷鍚嶇О CodecAAC CodecH264
+ */
+ private String codec_id_name;
+
+ /**
+ * Video = 0, Audio = 1
+ */
+ private int codec_type;
+
+ /**
+ * 杞ㄩ亾鏄惁鍑嗗灏辩华
+ */
+ private boolean ready;
+
+ /**
+ * 闊抽閲囨牱浣嶆暟
+ */
+ private int sample_bit;
+
+ /**
+ * 闊抽閲囨牱鐜�
+ */
+ private int sample_rate;
+
+ /**
+ * 瑙嗛fps
+ */
+ private float fps;
+
+ /**
+ * 瑙嗛楂�
+ */
+ private int height;
+
+ /**
+ * 瑙嗛瀹�
+ */
+ private int width;
+
+ /**
+ * 甯ф暟
+ */
+ private int frames;
+
+ /**
+ * 鍏抽敭甯ф暟
+ */
+ private int key_frames;
+
+ /**
+ * GOP澶у皬
+ */
+ private int gop_size;
+
+ /**
+ * GOP闂撮殧鏃堕暱(ms)
+ */
+ private int gop_interval_ms;
+
+ /**
+ * 涓㈠抚鐜�
+ */
+ private float loss;
+
+ public int getChannels() {
+ return channels;
+ }
+
+ public void setChannels(int channels) {
+ this.channels = channels;
+ }
+
+ public int getCodec_id() {
+ return codec_id;
+ }
+
+ public void setCodec_id(int codec_id) {
+ this.codec_id = codec_id;
+ }
+
+ public String getCodec_id_name() {
+ return codec_id_name;
+ }
+
+ public void setCodec_id_name(String codec_id_name) {
+ this.codec_id_name = codec_id_name;
+ }
+
+ public int getCodec_type() {
+ return codec_type;
+ }
+
+ public void setCodec_type(int codec_type) {
+ this.codec_type = codec_type;
+ }
+
+ public boolean isReady() {
+ return ready;
+ }
+
+ public void setReady(boolean ready) {
+ this.ready = ready;
+ }
+
+ public int getSample_bit() {
+ return sample_bit;
+ }
+
+ public void setSample_bit(int sample_bit) {
+ this.sample_bit = sample_bit;
+ }
+
+ public int getSample_rate() {
+ return sample_rate;
+ }
+
+ public void setSample_rate(int sample_rate) {
+ this.sample_rate = sample_rate;
+ }
+
+ public float getFps() {
+ return fps;
+ }
+
+ public void setFps(float fps) {
+ this.fps = fps;
+ }
+
+ public int getHeight() {
+ return height;
+ }
+
+ public void setHeight(int height) {
+ this.height = height;
+ }
+
+ public int getWidth() {
+ return width;
+ }
+
+ public void setWidth(int width) {
+ this.width = width;
+ }
+
+ public int getFrames() {
+ return frames;
+ }
+
+ public void setFrames(int frames) {
+ this.frames = frames;
+ }
+
+ public int getKey_frames() {
+ return key_frames;
+ }
+
+ public void setKey_frames(int key_frames) {
+ this.key_frames = key_frames;
+ }
+
+ public int getGop_size() {
+ return gop_size;
+ }
+
+ public void setGop_size(int gop_size) {
+ this.gop_size = gop_size;
+ }
+
+ public int getGop_interval_ms() {
+ return gop_interval_ms;
+ }
+
+ public void setGop_interval_ms(int gop_interval_ms) {
+ this.gop_interval_ms = gop_interval_ms;
+ }
+
+ public float getLoss() {
+ return loss;
+ }
+
+ public void setLoss(float loss) {
+ this.loss = loss;
+ }
+ }
+
+ public static class OriginSock{
+ private String identifier;
+ private String local_ip;
+ private int local_port;
+ private String peer_ip;
+ private int peer_port;
+
+ public String getIdentifier() {
+ return identifier;
+ }
+
+ public void setIdentifier(String identifier) {
+ this.identifier = identifier;
+ }
+
+ public String getLocal_ip() {
+ return local_ip;
+ }
+
+ public void setLocal_ip(String local_ip) {
+ this.local_ip = local_ip;
+ }
+
+ public int getLocal_port() {
+ return local_port;
+ }
+
+ public void setLocal_port(int local_port) {
+ this.local_port = local_port;
+ }
+
+ public String getPeer_ip() {
+ return peer_ip;
+ }
+
+ public void setPeer_ip(String peer_ip) {
+ this.peer_ip = peer_ip;
+ }
+
+ public int getPeer_port() {
+ return peer_port;
+ }
+
+ public void setPeer_port(int peer_port) {
+ this.peer_port = peer_port;
+ }
+ }
+
+ private StreamContent streamInfo;
+
+ public String getApp() {
+ return app;
+ }
+
+ public void setApp(String app) {
+ this.app = app;
+ }
+
+ public String getStream() {
+ return stream;
+ }
+
+ public void setStream(String stream) {
+ this.stream = stream;
+ }
+
+ public int getTotalReaderCount() {
+ return totalReaderCount;
+ }
+
+ public void setTotalReaderCount(int totalReaderCount) {
+ this.totalReaderCount = totalReaderCount;
+ }
+
+
+ public int getOriginType() {
+ return originType;
+ }
+
+ public void setOriginType(int originType) {
+ this.originType = originType;
+ }
+
+
+ public String getOriginTypeStr() {
+ return originTypeStr;
+ }
+
+ public void setOriginTypeStr(String originTypeStr) {
+ this.originTypeStr = originTypeStr;
+ }
+
+ public String getOriginUrl() {
+ return originUrl;
+ }
+
+ public void setOriginUrl(String originUrl) {
+ this.originUrl = originUrl;
+ }
+
+ public Long getCreateStamp() {
+ return createStamp;
+ }
+
+ public void setCreateStamp(Long createStamp) {
+ this.createStamp = createStamp;
+ }
+
+ public Long getAliveSecond() {
+ return aliveSecond;
+ }
+
+ public void setAliveSecond(Long aliveSecond) {
+ this.aliveSecond = aliveSecond;
+ }
+
+ public List<MediaTrack> getTracks() {
+ return tracks;
+ }
+
+ public void setTracks(List<MediaTrack> tracks) {
+ this.tracks = tracks;
+ }
+
+ public String getSchema() {
+ return schema;
+ }
+
+ public void setSchema(String schema) {
+ this.schema = schema;
+ }
+
+ public void setOriginSock(OriginSock originSock) {
+ this.originSock = originSock;
+ }
+
+ public Long getBytesSpeed() {
+ return bytesSpeed;
+ }
+
+ public void setBytesSpeed(Long bytesSpeed) {
+ this.bytesSpeed = bytesSpeed;
+ }
+
+ public String getVhost() {
+ return vhost;
+ }
+
+ public void setVhost(String vhost) {
+ this.vhost = vhost;
+ }
+
+ public OriginSock getOriginSock() {
+ return originSock;
+ }
+
+ public boolean isDocker() {
+ return docker;
+ }
+
+ public void setDocker(boolean docker) {
+ this.docker = docker;
+ }
+
+ public StreamContent getStreamInfo() {
+ return streamInfo;
+ }
+
+ public void setStreamInfo(StreamContent streamInfo) {
+ this.streamInfo = streamInfo;
+ }
+
+ public String getSeverId() {
+ return severId;
+ }
+
+ public void setSeverId(String severId) {
+ this.severId = severId;
+ }
+
+ public String getCallId() {
+ return callId;
+ }
+
+ public void setCallId(String callId) {
+ this.callId = callId;
+ }
+
+
+ public Map<String, String> getParamMap() {
+ return paramMap;
+ }
+
+ public void setParamMap(Map<String, String> paramMap) {
+ this.paramMap = paramMap;
+ }
+
+ public String getParams() {
+ return params;
+ }
+
+ public void setParams(String params) {
+ this.params = params;
+ }
+
+ @Override
+ public String toString() {
+ return "OnStreamChangedHookParam{" +
+ "regist=" + regist +
+ ", app='" + app + '\'' +
+ ", stream='" + stream + '\'' +
+ ", severId='" + severId + '\'' +
+ '}';
+ }
+}
diff --git a/ycl-pojo/src/main/java/com/ycl/platform/wvp/StreamContent.java b/ycl-pojo/src/main/java/com/ycl/platform/wvp/StreamContent.java
new file mode 100644
index 0000000..55f44e3
--- /dev/null
+++ b/ycl-pojo/src/main/java/com/ycl/platform/wvp/StreamContent.java
@@ -0,0 +1,442 @@
+package com.ycl.platform.wvp;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+
+@Schema(description = "娴佷俊鎭�")
+public class StreamContent {
+
+ @Schema(description = "搴旂敤鍚�")
+ private String app;
+
+ @Schema(description = "娴両D")
+ private String stream;
+
+ @Schema(description = "IP")
+ private String ip;
+
+ @Schema(description = "HTTP-FLV娴佸湴鍧�")
+ private String flv;
+
+ @Schema(description = "HTTPS-FLV娴佸湴鍧�")
+ private String https_flv;
+
+ @Schema(description = "Websocket-FLV娴佸湴鍧�")
+ private String ws_flv;
+
+ @Schema(description = "Websockets-FLV娴佸湴鍧�")
+ private String wss_flv;
+
+ @Schema(description = "HTTP-FMP4娴佸湴鍧�")
+ private String fmp4;
+
+ @Schema(description = "HTTPS-FMP4娴佸湴鍧�")
+ private String https_fmp4;
+
+ @Schema(description = "Websocket-FMP4娴佸湴鍧�")
+ private String ws_fmp4;
+
+ @Schema(description = "Websockets-FMP4娴佸湴鍧�")
+ private String wss_fmp4;
+
+ @Schema(description = "HLS娴佸湴鍧�")
+ private String hls;
+
+ @Schema(description = "HTTPS-HLS娴佸湴鍧�")
+ private String https_hls;
+
+ @Schema(description = "Websocket-HLS娴佸湴鍧�")
+ private String ws_hls;
+
+ @Schema(description = "Websockets-HLS娴佸湴鍧�")
+ private String wss_hls;
+
+ @Schema(description = "HTTP-TS娴佸湴鍧�")
+ private String ts;
+
+ @Schema(description = "HTTPS-TS娴佸湴鍧�")
+ private String https_ts;
+
+ @Schema(description = "Websocket-TS娴佸湴鍧�")
+ private String ws_ts;
+
+ @Schema(description = "Websockets-TS娴佸湴鍧�")
+ private String wss_ts;
+
+ @Schema(description = "RTMP娴佸湴鍧�")
+ private String rtmp;
+
+ @Schema(description = "RTMPS娴佸湴鍧�")
+ private String rtmps;
+
+ @Schema(description = "RTSP娴佸湴鍧�")
+ private String rtsp;
+
+ @Schema(description = "RTSPS娴佸湴鍧�")
+ private String rtsps;
+
+ @Schema(description = "RTC娴佸湴鍧�")
+ private String rtc;
+
+ @Schema(description = "RTCS娴佸湴鍧�")
+ private String rtcs;
+
+ @Schema(description = "娴佸獟浣揑D")
+ private String mediaServerId;
+
+ @Schema(description = "娴佺紪鐮佷俊鎭�")
+ private MediaInfo mediaInfo;
+
+ @Schema(description = "寮�濮嬫椂闂�")
+ private String startTime;
+
+ @Schema(description = "缁撴潫鏃堕棿")
+ private String endTime;
+
+ @Schema(description = "鏂囦欢涓嬭浇鍦板潃锛堝綍鍍忎笅杞戒娇鐢級")
+ private DownloadFileInfo downLoadFilePath;
+
+ @Schema(description = "杞爜鍚庣殑瑙嗛娴�")
+ private StreamContent transcodeStream;
+
+ private double progress;
+
+ public StreamContent(StreamInfo streamInfo) {
+ if (streamInfo == null) {
+ return;
+ }
+ this.app = streamInfo.getApp();
+ this.stream = streamInfo.getStream();
+ if (streamInfo.getFlv() != null) {
+ this.flv = streamInfo.getFlv().getUrl();
+ }
+ if (streamInfo.getHttps_flv() != null) {
+ this.https_flv = streamInfo.getHttps_flv().getUrl();
+ }
+ if (streamInfo.getWs_flv() != null) {
+ this.ws_flv = streamInfo.getWs_flv().getUrl();
+ }
+ if (streamInfo.getWss_flv() != null) {
+ this.wss_flv = streamInfo.getWss_flv().getUrl();
+ }
+ if (streamInfo.getFmp4() != null) {
+ this.fmp4 = streamInfo.getFmp4().getUrl();
+ }
+ if (streamInfo.getHttps_fmp4() != null) {
+ this.https_fmp4 = streamInfo.getHttps_fmp4().getUrl();
+ }
+ if (streamInfo.getWs_fmp4() != null) {
+ this.ws_fmp4 = streamInfo.getWs_fmp4().getUrl();
+ }
+ if (streamInfo.getWss_fmp4() != null) {
+ this.wss_fmp4 = streamInfo.getWss_fmp4().getUrl();
+ }
+ if (streamInfo.getHls() != null) {
+ this.hls = streamInfo.getHls().getUrl();
+ }
+ if (streamInfo.getHttps_hls() != null) {
+ this.https_hls = streamInfo.getHttps_hls().getUrl();
+ }
+ if (streamInfo.getWs_hls() != null) {
+ this.ws_hls = streamInfo.getWs_hls().getUrl();
+ }
+ if (streamInfo.getWss_hls() != null) {
+ this.wss_hls = streamInfo.getWss_hls().getUrl();
+ }
+ if (streamInfo.getTs() != null) {
+ this.ts = streamInfo.getTs().getUrl();
+ }
+ if (streamInfo.getHttps_ts() != null) {
+ this.https_ts = streamInfo.getHttps_ts().getUrl();
+ }
+ if (streamInfo.getWs_ts() != null) {
+ this.ws_ts = streamInfo.getWs_ts().getUrl();
+ }
+ if (streamInfo.getRtmp() != null) {
+ this.rtmp = streamInfo.getRtmp().getUrl();
+ }
+ if (streamInfo.getRtmps() != null) {
+ this.rtmps = streamInfo.getRtmps().getUrl();
+ }
+ if (streamInfo.getRtsp() != null) {
+ this.rtsp = streamInfo.getRtsp().getUrl();
+ }
+ if (streamInfo.getRtsps() != null) {
+ this.rtsps = streamInfo.getRtsps().getUrl();
+ }
+ if (streamInfo.getRtc() != null) {
+ this.rtc = streamInfo.getRtc().getUrl();
+ }
+ if (streamInfo.getRtcs() != null) {
+ this.rtcs = streamInfo.getRtcs().getUrl();
+ }
+
+ this.mediaServerId = streamInfo.getMediaServerId();
+ this.mediaInfo = streamInfo.getMediaInfo();
+ this.startTime = streamInfo.getStartTime();
+ this.endTime = streamInfo.getEndTime();
+ this.progress = streamInfo.getProgress();
+
+ if (streamInfo.getDownLoadFilePath() != null) {
+ this.downLoadFilePath = streamInfo.getDownLoadFilePath();
+ }
+ if (streamInfo.getTranscodeStream() != null) {
+ this.transcodeStream = new StreamContent(streamInfo.getTranscodeStream());
+ }
+ }
+
+ public StreamContent getTranscodeStream() {
+ return transcodeStream;
+ }
+
+ public void setTranscodeStream(StreamContent transcodeStream) {
+ this.transcodeStream = transcodeStream;
+ }
+
+ public String getApp() {
+ return app;
+ }
+
+ public void setApp(String app) {
+ this.app = app;
+ }
+
+ public String getStream() {
+ return stream;
+ }
+
+ public void setStream(String stream) {
+ this.stream = stream;
+ }
+
+ public String getIp() {
+ return ip;
+ }
+
+ public void setIp(String ip) {
+ this.ip = ip;
+ }
+
+ public String getFlv() {
+ return flv;
+ }
+
+ public void setFlv(String flv) {
+ this.flv = flv;
+ }
+
+ public String getHttps_flv() {
+ return https_flv;
+ }
+
+ public void setHttps_flv(String https_flv) {
+ this.https_flv = https_flv;
+ }
+
+ public String getWs_flv() {
+ return ws_flv;
+ }
+
+ public void setWs_flv(String ws_flv) {
+ this.ws_flv = ws_flv;
+ }
+
+ public String getWss_flv() {
+ return wss_flv;
+ }
+
+ public void setWss_flv(String wss_flv) {
+ this.wss_flv = wss_flv;
+ }
+
+ public String getFmp4() {
+ return fmp4;
+ }
+
+ public void setFmp4(String fmp4) {
+ this.fmp4 = fmp4;
+ }
+
+ public String getHttps_fmp4() {
+ return https_fmp4;
+ }
+
+ public void setHttps_fmp4(String https_fmp4) {
+ this.https_fmp4 = https_fmp4;
+ }
+
+ public String getWs_fmp4() {
+ return ws_fmp4;
+ }
+
+ public void setWs_fmp4(String ws_fmp4) {
+ this.ws_fmp4 = ws_fmp4;
+ }
+
+ public String getWss_fmp4() {
+ return wss_fmp4;
+ }
+
+ public void setWss_fmp4(String wss_fmp4) {
+ this.wss_fmp4 = wss_fmp4;
+ }
+
+ public String getHls() {
+ return hls;
+ }
+
+ public void setHls(String hls) {
+ this.hls = hls;
+ }
+
+ public String getHttps_hls() {
+ return https_hls;
+ }
+
+ public void setHttps_hls(String https_hls) {
+ this.https_hls = https_hls;
+ }
+
+ public String getWs_hls() {
+ return ws_hls;
+ }
+
+ public void setWs_hls(String ws_hls) {
+ this.ws_hls = ws_hls;
+ }
+
+ public String getWss_hls() {
+ return wss_hls;
+ }
+
+ public void setWss_hls(String wss_hls) {
+ this.wss_hls = wss_hls;
+ }
+
+ public String getTs() {
+ return ts;
+ }
+
+ public void setTs(String ts) {
+ this.ts = ts;
+ }
+
+ public String getHttps_ts() {
+ return https_ts;
+ }
+
+ public void setHttps_ts(String https_ts) {
+ this.https_ts = https_ts;
+ }
+
+ public String getWs_ts() {
+ return ws_ts;
+ }
+
+ public void setWs_ts(String ws_ts) {
+ this.ws_ts = ws_ts;
+ }
+
+ public String getWss_ts() {
+ return wss_ts;
+ }
+
+ public void setWss_ts(String wss_ts) {
+ this.wss_ts = wss_ts;
+ }
+
+ public String getRtmp() {
+ return rtmp;
+ }
+
+ public void setRtmp(String rtmp) {
+ this.rtmp = rtmp;
+ }
+
+ public String getRtmps() {
+ return rtmps;
+ }
+
+ public void setRtmps(String rtmps) {
+ this.rtmps = rtmps;
+ }
+
+ public String getRtsp() {
+ return rtsp;
+ }
+
+ public void setRtsp(String rtsp) {
+ this.rtsp = rtsp;
+ }
+
+ public String getRtsps() {
+ return rtsps;
+ }
+
+ public void setRtsps(String rtsps) {
+ this.rtsps = rtsps;
+ }
+
+ public String getRtc() {
+ return rtc;
+ }
+
+ public void setRtc(String rtc) {
+ this.rtc = rtc;
+ }
+
+ public String getRtcs() {
+ return rtcs;
+ }
+
+ public void setRtcs(String rtcs) {
+ this.rtcs = rtcs;
+ }
+
+ public String getMediaServerId() {
+ return mediaServerId;
+ }
+
+ public void setMediaServerId(String mediaServerId) {
+ this.mediaServerId = mediaServerId;
+ }
+
+ public MediaInfo getMediaInfo() {
+ return mediaInfo;
+ }
+
+ public void setMediaInfo(MediaInfo mediaInfo) {
+ this.mediaInfo = mediaInfo;
+ }
+
+ public String getStartTime() {
+ return startTime;
+ }
+
+ public void setStartTime(String startTime) {
+ this.startTime = startTime;
+ }
+
+ public String getEndTime() {
+ return endTime;
+ }
+
+ public void setEndTime(String endTime) {
+ this.endTime = endTime;
+ }
+
+ public double getProgress() {
+ return progress;
+ }
+
+ public void setProgress(double progress) {
+ this.progress = progress;
+ }
+
+ public DownloadFileInfo getDownLoadFilePath() {
+ return downLoadFilePath;
+ }
+
+ public void setDownLoadFilePath(DownloadFileInfo downLoadFilePath) {
+ this.downLoadFilePath = downLoadFilePath;
+ }
+}
diff --git a/ycl-pojo/src/main/java/com/ycl/platform/wvp/StreamInfo.java b/ycl-pojo/src/main/java/com/ycl/platform/wvp/StreamInfo.java
new file mode 100644
index 0000000..076f019
--- /dev/null
+++ b/ycl-pojo/src/main/java/com/ycl/platform/wvp/StreamInfo.java
@@ -0,0 +1,647 @@
+package com.ycl.platform.wvp;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+
+import java.io.Serializable;
+import java.util.Objects;
+
+@Schema(description = "娴佷俊鎭�")
+public class StreamInfo implements Serializable, Cloneable{
+
+ @Schema(description = "搴旂敤鍚�")
+ private String app;
+ @Schema(description = "娴両D")
+ private String stream;
+ @Schema(description = "璁惧缂栧彿")
+ private String deviceID;
+ @Schema(description = "閫氶亾缂栧彿")
+ private String 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 = "娴佸獟浣揑D")
+ private String mediaServerId;
+ @Schema(description = "娴佺紪鐮佷俊鎭�")
+ private MediaInfo mediaInfo;
+ @Schema(description = "寮�濮嬫椂闂�")
+ private String startTime;
+ @Schema(description = "缁撴潫鏃堕棿")
+ private String endTime;
+ @Schema(description = "杩涘害锛堝綍鍍忎笅杞戒娇鐢級")
+ private double progress;
+ @Schema(description = "鏂囦欢涓嬭浇鍦板潃锛堝綍鍍忎笅杞戒娇鐢級")
+ private DownloadFileInfo downLoadFilePath;
+
+ @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 = "杞爜鍚庣殑瑙嗛娴�")
+ private StreamInfo transcodeStream;
+
+ public void setFlv(StreamURL flv) {
+ this.flv = flv;
+ }
+
+ public void setHttps_flv(StreamURL https_flv) {
+ this.https_flv = https_flv;
+ }
+
+ public void setWs_flv(StreamURL ws_flv) {
+ this.ws_flv = ws_flv;
+ }
+
+ public void setWss_flv(StreamURL wss_flv) {
+ this.wss_flv = wss_flv;
+ }
+
+ public void setFmp4(StreamURL fmp4) {
+ this.fmp4 = fmp4;
+ }
+
+ public void setHttps_fmp4(StreamURL https_fmp4) {
+ this.https_fmp4 = https_fmp4;
+ }
+
+ public void setWs_fmp4(StreamURL ws_fmp4) {
+ this.ws_fmp4 = ws_fmp4;
+ }
+
+ public void setWss_fmp4(StreamURL wss_fmp4) {
+ this.wss_fmp4 = wss_fmp4;
+ }
+
+ public void setHls(StreamURL hls) {
+ this.hls = hls;
+ }
+
+ public void setHttps_hls(StreamURL https_hls) {
+ this.https_hls = https_hls;
+ }
+
+ public void setWs_hls(StreamURL ws_hls) {
+ this.ws_hls = ws_hls;
+ }
+
+ public void setWss_hls(StreamURL wss_hls) {
+ this.wss_hls = wss_hls;
+ }
+
+ public void setTs(StreamURL ts) {
+ this.ts = ts;
+ }
+
+ public void setHttps_ts(StreamURL https_ts) {
+ this.https_ts = https_ts;
+ }
+
+ public void setWs_ts(StreamURL ws_ts) {
+ this.ws_ts = ws_ts;
+ }
+
+ public void setWss_ts(StreamURL wss_ts) {
+ this.wss_ts = wss_ts;
+ }
+
+ public void setRtmp(StreamURL rtmp) {
+ this.rtmp = rtmp;
+ }
+
+ public void setRtmps(StreamURL rtmps) {
+ this.rtmps = rtmps;
+ }
+
+ public void setRtsp(StreamURL rtsp) {
+ this.rtsp = rtsp;
+ }
+
+ public void setRtsps(StreamURL rtsps) {
+ this.rtsps = rtsps;
+ }
+
+ public void setRtc(StreamURL rtc) {
+ this.rtc = rtc;
+ }
+
+ public void setRtcs(StreamURL rtcs) {
+ this.rtcs = rtcs;
+ }
+
+ public void setRtmp(String host, int port, int sslPort, String app, String stream, String callIdParam) {
+ String file = String.format("%s/%s%s", app, stream, callIdParam);
+ if (port > 0) {
+ this.rtmp = new StreamURL("rtmp", host, port, file);
+ }
+ if (sslPort > 0) {
+ this.rtmps = new StreamURL("rtmps", host, sslPort, file);
+ }
+ }
+
+ public void setRtsp(String host, int port, int sslPort, String app, String stream, String callIdParam) {
+ String file = String.format("%s/%s%s", app, stream, callIdParam);
+ if (port > 0) {
+ this.rtsp = new StreamURL("rtsp", host, port, file);
+ }
+ if (sslPort > 0) {
+ this.rtsps = new StreamURL("rtsps", host, sslPort, file);
+ }
+ }
+
+ public void setFlv(String host, int port, int sslPort, String file) {
+ if (port > 0) {
+ this.flv = new StreamURL("http", host, port, file);
+ }
+ this.ws_flv = new StreamURL("ws", host, port, file);
+ if (sslPort > 0) {
+ this.https_flv = new StreamURL("https", host, sslPort, file);
+ this.wss_flv = new StreamURL("wss", host, sslPort, file);
+ }
+ }
+
+ public void setWsFlv(String host, int port, int sslPort, String file) {
+ if (port > 0) {
+ this.ws_flv = new StreamURL("ws", host, port, file);
+ }
+ if (sslPort > 0) {
+ this.wss_flv = new StreamURL("wss", host, sslPort, file);
+ }
+ }
+
+ public void setFmp4(String host, int port, int sslPort, String app, String stream, String callIdParam) {
+ String file = String.format("%s/%s.live.mp4%s", app, stream, callIdParam);
+ if (port > 0) {
+ this.fmp4 = new StreamURL("http", host, port, file);
+ this.ws_fmp4 = new StreamURL("ws", host, port, file);
+ }
+ if (sslPort > 0) {
+ this.https_fmp4 = new StreamURL("https", host, sslPort, file);
+ this.wss_fmp4 = new StreamURL("wss", host, sslPort, file);
+ }
+ }
+
+ public void setHls(String host, int port, int sslPort, String app, String stream, String callIdParam) {
+ String file = String.format("%s/%s/hls.m3u8%s", app, stream, callIdParam);
+ if (port > 0) {
+ this.hls = new StreamURL("http", host, port, file);
+ this.ws_hls = new StreamURL("ws", host, port, file);
+ }
+ if (sslPort > 0) {
+ this.https_hls = new StreamURL("https", host, sslPort, file);
+ this.wss_hls = new StreamURL("wss", host, sslPort, file);
+ }
+ }
+
+ public void setTs(String host, int port, int sslPort, String app, String stream, String callIdParam) {
+ String file = String.format("%s/%s.live.ts%s", app, stream, callIdParam);
+
+ if (port > 0) {
+ this.ts = new StreamURL("http", host, port, file);
+ this.ws_ts = new StreamURL("ws", host, port, file);
+ }
+ if (sslPort > 0) {
+ this.https_ts = new StreamURL("https", host, sslPort, file);
+ this.wss_ts = new StreamURL("wss", host, sslPort, file);
+ }
+ }
+
+ public void setRtc(String host, int port, int sslPort, String app, String stream, String callIdParam, boolean isPlay) {
+ if (callIdParam != null) {
+ callIdParam = Objects.equals(callIdParam, "") ? callIdParam : callIdParam.replace("?", "&");
+ }
+ 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 channgeStreamIp(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;
+
+ public String getApp() {
+ return app;
+ }
+
+ public void setApp(String app) {
+ this.app = app;
+ }
+
+ public String getDeviceID() {
+ return deviceID;
+ }
+
+ public void setDeviceID(String deviceID) {
+ this.deviceID = deviceID;
+ }
+
+ public String getChannelId() {
+ return channelId;
+ }
+
+ public void setChannelId(String channelId) {
+ this.channelId = channelId;
+ }
+
+ public String getStream() {
+ return stream;
+ }
+
+ public void setStream(String stream) {
+ this.stream = stream;
+ }
+
+ public String getIp() {
+ return ip;
+ }
+
+ public void setIp(String ip) {
+ this.ip = ip;
+ }
+
+ public StreamURL getFlv() {
+ return flv;
+ }
+
+ public StreamURL getHttps_flv() {
+ return https_flv;
+ }
+
+ public StreamURL getWs_flv() {
+ return ws_flv;
+ }
+
+
+ public StreamURL getWss_flv() {
+ return wss_flv;
+ }
+
+ public StreamURL getFmp4() {
+ return fmp4;
+ }
+
+
+
+ public StreamURL getHttps_fmp4() {
+ return https_fmp4;
+ }
+
+ public StreamURL getWs_fmp4() {
+ return ws_fmp4;
+ }
+
+ public StreamURL getWss_fmp4() {
+ return wss_fmp4;
+ }
+
+ public StreamURL getHls() {
+ return hls;
+ }
+
+
+ public StreamURL getHttps_hls() {
+ return https_hls;
+ }
+
+ public StreamURL getWs_hls() {
+ return ws_hls;
+ }
+
+ public StreamURL getWss_hls() {
+ return wss_hls;
+ }
+
+ public StreamURL getTs() {
+ return ts;
+ }
+
+
+ public StreamURL getHttps_ts() {
+ return https_ts;
+ }
+
+
+ public StreamURL getWs_ts() {
+ return ws_ts;
+ }
+
+
+ public StreamURL getWss_ts() {
+ return wss_ts;
+ }
+
+
+ public StreamURL getRtmp() {
+ return rtmp;
+ }
+
+ public StreamURL getRtmps() {
+ return rtmps;
+ }
+
+ public StreamURL getRtsp() {
+ return rtsp;
+ }
+
+ public StreamURL getRtsps() {
+ return rtsps;
+ }
+
+ public StreamURL getRtc() {
+ return rtc;
+ }
+
+ public StreamURL getRtcs() {
+ return rtcs;
+ }
+
+ public String getMediaServerId() {
+ return mediaServerId;
+ }
+
+ public void setMediaServerId(String mediaServerId) {
+ this.mediaServerId = mediaServerId;
+ }
+
+ public MediaInfo getMediaInfo() {
+ return mediaInfo;
+ }
+
+ public void setMediaInfo(MediaInfo mediaInfo) {
+ this.mediaInfo = mediaInfo;
+ }
+
+ public String getStartTime() {
+ return startTime;
+ }
+
+ public void setStartTime(String startTime) {
+ this.startTime = startTime;
+ }
+
+ public String getEndTime() {
+ return endTime;
+ }
+
+ public void setEndTime(String endTime) {
+ this.endTime = endTime;
+ }
+
+ public double getProgress() {
+ return progress;
+ }
+
+ public void setProgress(double progress) {
+ this.progress = progress;
+ }
+
+ public boolean isPause() {
+ return pause;
+ }
+
+ public void setPause(boolean pause) {
+ this.pause = pause;
+ }
+
+ public TransactionInfo getTransactionInfo() {
+ return transactionInfo;
+ }
+
+ public void setTransactionInfo(TransactionInfo transactionInfo) {
+ this.transactionInfo = transactionInfo;
+ }
+
+ public StreamInfo getTranscodeStream() {
+ return transcodeStream;
+ }
+
+ public void setTranscodeStream(StreamInfo transcodeStream) {
+ this.transcodeStream = transcodeStream;
+ }
+
+ @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;
+ }
+
+
+ /*=========================璁惧涓诲瓙鐮佹祦閫昏緫START====================*/
+ @Schema(description = "鏄惁涓哄瓙鐮佹祦(true-鏄紝false-涓荤爜娴�)")
+ private boolean subStream;
+
+ public boolean isSubStream() {
+ return subStream;
+ }
+
+ public void setSubStream(boolean subStream) {
+ this.subStream = subStream;
+ }
+
+ public DownloadFileInfo getDownLoadFilePath() {
+ return downLoadFilePath;
+ }
+
+ public void setDownLoadFilePath(DownloadFileInfo downLoadFilePath) {
+ this.downLoadFilePath = downLoadFilePath;
+ }
+
+ public int getOriginType() {
+ return originType;
+ }
+
+ public void setOriginType(int originType) {
+ this.originType = originType;
+ }
+}
diff --git a/ycl-pojo/src/main/java/com/ycl/platform/wvp/StreamURL.java b/ycl-pojo/src/main/java/com/ycl/platform/wvp/StreamURL.java
new file mode 100644
index 0000000..da31bfc
--- /dev/null
+++ b/ycl-pojo/src/main/java/com/ycl/platform/wvp/StreamURL.java
@@ -0,0 +1,84 @@
+package com.ycl.platform.wvp;
+
+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/ycl-pojo/src/main/java/com/ycl/platform/wvp/WVPResult.java b/ycl-pojo/src/main/java/com/ycl/platform/wvp/WVPResult.java
new file mode 100644
index 0000000..443c2eb
--- /dev/null
+++ b/ycl-pojo/src/main/java/com/ycl/platform/wvp/WVPResult.java
@@ -0,0 +1,75 @@
+package com.ycl.platform.wvp;
+
+
+import io.swagger.v3.oas.annotations.media.Schema;
+
+@Schema(description = "缁熶竴杩斿洖缁撴灉")
+public class WVPResult<T> implements Cloneable{
+
+ public WVPResult() {
+ }
+
+ public WVPResult(int code, String msg, T data) {
+ this.code = code;
+ this.msg = msg;
+ this.data = data;
+ }
+
+
+ @Schema(description = "閿欒鐮侊紝0涓烘垚鍔�")
+ private int code;
+ @Schema(description = "鎻忚堪锛岄敊璇椂鎻忚堪閿欒鍘熷洜")
+ private String msg;
+ @Schema(description = "鏁版嵁")
+ private T data;
+
+
+ public static <T> WVPResult<T> success(T t, String msg) {
+ return new WVPResult<>(ErrorCode.SUCCESS.getCode(), msg, t);
+ }
+
+ public static WVPResult success() {
+ return new WVPResult<>(ErrorCode.SUCCESS.getCode(), ErrorCode.SUCCESS.getMsg(), null);
+ }
+
+ public static <T> WVPResult<T> success(T t) {
+ return success(t, ErrorCode.SUCCESS.getMsg());
+ }
+
+ public static <T> WVPResult<T> fail(int code, String msg) {
+ return new WVPResult<>(code, msg, null);
+ }
+
+ public static <T> WVPResult<T> fail(ErrorCode errorCode) {
+ return fail(errorCode.getCode(), errorCode.getMsg());
+ }
+
+ public int getCode() {
+ return code;
+ }
+
+ public void setCode(int code) {
+ this.code = code;
+ }
+
+ public String getMsg() {
+ return msg;
+ }
+
+ public void setMsg(String msg) {
+ this.msg = msg;
+ }
+
+ public T getData() {
+ return data;
+ }
+
+ public void setData(T data) {
+ this.data = data;
+ }
+
+ @Override
+ public Object clone() throws CloneNotSupportedException {
+ return super.clone();
+ }
+}
diff --git a/ycl-pojo/src/main/java/com/ycl/platform/wvp/ZLMServerConfig.java b/ycl-pojo/src/main/java/com/ycl/platform/wvp/ZLMServerConfig.java
new file mode 100644
index 0000000..161921d
--- /dev/null
+++ b/ycl-pojo/src/main/java/com/ycl/platform/wvp/ZLMServerConfig.java
@@ -0,0 +1,1224 @@
+package com.ycl.platform.wvp;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+
+public class ZLMServerConfig extends HookParam {
+
+ @JSONField(name = "api.apiDebug")
+ private String apiDebug;
+
+ @JSONField(name = "api.secret")
+ private String apiSecret;
+
+ @JSONField(name = "api.snapRoot")
+ private String apiSnapRoot;
+
+ @JSONField(name = "api.defaultSnap")
+ private String apiDefaultSnap;
+
+ @JSONField(name = "ffmpeg.bin")
+ private String ffmpegBin;
+
+ @JSONField(name = "ffmpeg.cmd")
+ private String ffmpegCmd;
+
+ @JSONField(name = "ffmpeg.snap")
+ private String ffmpegSnap;
+
+ @JSONField(name = "ffmpeg.log")
+ private String ffmpegLog;
+
+ @JSONField(name = "ffmpeg.restart_sec")
+ private String ffmpegRestartSec;
+
+ @JSONField(name = "protocol.modify_stamp")
+ private String protocolModifyStamp;
+
+ @JSONField(name = "protocol.enable_audio")
+ private String protocolEnableAudio;
+
+ @JSONField(name = "protocol.add_mute_audio")
+ private String protocolAddMuteAudio;
+
+ @JSONField(name = "protocol.continue_push_ms")
+ private String protocolContinuePushMs;
+
+ @JSONField(name = "protocol.enable_hls")
+ private String protocolEnableHls;
+
+ @JSONField(name = "protocol.enable_mp4")
+ private String protocolEnableMp4;
+
+ @JSONField(name = "protocol.enable_rtsp")
+ private String protocolEnableRtsp;
+
+ @JSONField(name = "protocol.enable_rtmp")
+ private String protocolEnableRtmp;
+
+ @JSONField(name = "protocol.enable_ts")
+ private String protocolEnableTs;
+
+ @JSONField(name = "protocol.enable_fmp4")
+ private String protocolEnableFmp4;
+
+ @JSONField(name = "protocol.mp4_as_player")
+ private String protocolMp4AsPlayer;
+
+ @JSONField(name = "protocol.mp4_max_second")
+ private String protocolMp4MaxSecond;
+
+ @JSONField(name = "protocol.mp4_save_path")
+ private String protocolMp4SavePath;
+
+ @JSONField(name = "protocol.hls_save_path")
+ private String protocolHlsSavePath;
+
+ @JSONField(name = "protocol.hls_demand")
+ private String protocolHlsDemand;
+
+ @JSONField(name = "protocol.rtsp_demand")
+ private String protocolRtspDemand;
+
+ @JSONField(name = "protocol.rtmp_demand")
+ private String protocolRtmpDemand;
+
+ @JSONField(name = "protocol.ts_demand")
+ private String protocolTsDemand;
+
+ @JSONField(name = "protocol.fmp4_demand")
+ private String protocolFmp4Demand;
+
+ @JSONField(name = "general.enableVhost")
+ private String generalEnableVhost;
+
+ @JSONField(name = "general.flowThreshold")
+ private String generalFlowThreshold;
+
+ @JSONField(name = "general.maxStreamWaitMS")
+ private String generalMaxStreamWaitMS;
+
+ @JSONField(name = "general.streamNoneReaderDelayMS")
+ private int generalStreamNoneReaderDelayMS;
+
+ @JSONField(name = "general.resetWhenRePlay")
+ private String generalResetWhenRePlay;
+
+ @JSONField(name = "general.mergeWriteMS")
+ private String generalMergeWriteMS;
+
+ @JSONField(name = "general.mediaServerId")
+ private String generalMediaServerId;
+
+ @JSONField(name = "general.wait_track_ready_ms")
+ private String generalWaitTrackReadyMs;
+
+ @JSONField(name = "general.wait_add_track_ms")
+ private String generalWaitAddTrackMs;
+
+ @JSONField(name = "general.unready_frame_cache")
+ private String generalUnreadyFrameCache;
+
+
+ @JSONField(name = "ip")
+ private String ip;
+
+ private String sdpIp;
+
+ private String streamIp;
+
+ private String hookIp;
+
+ private String updateTime;
+
+ private String createTime;
+
+ @JSONField(name = "hls.fileBufSize")
+ private String hlsFileBufSize;
+
+ @JSONField(name = "hls.filePath")
+ private String hlsFilePath;
+
+ @JSONField(name = "hls.segDur")
+ private String hlsSegDur;
+
+ @JSONField(name = "hls.segNum")
+ private String hlsSegNum;
+
+ @JSONField(name = "hls.segRetain")
+ private String hlsSegRetain;
+
+ @JSONField(name = "hls.broadcastRecordTs")
+ private String hlsBroadcastRecordTs;
+
+ @JSONField(name = "hls.deleteDelaySec")
+ private String hlsDeleteDelaySec;
+
+ @JSONField(name = "hls.segKeep")
+ private String hlsSegKeep;
+
+ @JSONField(name = "hook.access_file_except_hls")
+ private String hookAccessFileExceptHLS;
+
+ @JSONField(name = "hook.admin_params")
+ private String hookAdminParams;
+
+ @JSONField(name = "hook.alive_interval")
+ private Float hookAliveInterval;
+
+ @JSONField(name = "hook.enable")
+ private String hookEnable;
+
+ @JSONField(name = "hook.on_flow_report")
+ private String hookOnFlowReport;
+
+ @JSONField(name = "hook.on_http_access")
+ private String hookOnHttpAccess;
+
+ @JSONField(name = "hook.on_play")
+ private String hookOnPlay;
+
+ @JSONField(name = "hook.on_publish")
+ private String hookOnPublish;
+
+ @JSONField(name = "hook.on_record_mp4")
+ private String hookOnRecordMp4;
+
+ @JSONField(name = "hook.on_rtsp_auth")
+ private String hookOnRtspAuth;
+
+ @JSONField(name = "hook.on_rtsp_realm")
+ private String hookOnRtspRealm;
+
+ @JSONField(name = "hook.on_shell_login")
+ private String hookOnShellLogin;
+
+ @JSONField(name = "hook.on_stream_changed")
+ private String hookOnStreamChanged;
+
+ @JSONField(name = "hook.on_stream_none_reader")
+ private String hookOnStreamNoneReader;
+
+ @JSONField(name = "hook.on_stream_not_found")
+ private String hookOnStreamNotFound;
+
+ @JSONField(name = "hook.on_server_started")
+ private String hookOnServerStarted;
+
+ @JSONField(name = "hook.on_server_keepalive")
+ private String hookOnServerKeepalive;
+
+ @JSONField(name = "hook.on_send_rtp_stopped")
+ private String hookOnSendRtpStopped;
+
+ @JSONField(name = "hook.on_rtp_server_timeout")
+ private String hookOnRtpServerTimeout;
+
+ @JSONField(name = "hook.timeoutSec")
+ private String hookTimeoutSec;
+
+ @JSONField(name = "http.charSet")
+ private String httpCharSet;
+
+ @JSONField(name = "http.keepAliveSecond")
+ private String httpKeepAliveSecond;
+
+ @JSONField(name = "http.maxReqCount")
+ private String httpMaxReqCount;
+
+ @JSONField(name = "http.maxReqSize")
+ private String httpMaxReqSize;
+
+ @JSONField(name = "http.notFound")
+ private String httpNotFound;
+
+ @JSONField(name = "http.port")
+ private int httpPort;
+
+ @JSONField(name = "http.rootPath")
+ private String httpRootPath;
+
+ @JSONField(name = "http.sendBufSize")
+ private String httpSendBufSize;
+
+ @JSONField(name = "http.sslport")
+ private int httpSSLport;
+
+ @JSONField(name = "multicast.addrMax")
+ private String multicastAddrMax;
+
+ @JSONField(name = "multicast.addrMin")
+ private String multicastAddrMin;
+
+ @JSONField(name = "multicast.udpTTL")
+ private String multicastUdpTTL;
+
+ @JSONField(name = "record.appName")
+ private String recordAppName;
+
+ @JSONField(name = "record.filePath")
+ private String recordFilePath;
+
+ @JSONField(name = "record.fileSecond")
+ private String recordFileSecond;
+
+ @JSONField(name = "record.sampleMS")
+ private String recordFileSampleMS;
+
+ @JSONField(name = "rtmp.handshakeSecond")
+ private String rtmpHandshakeSecond;
+
+ @JSONField(name = "rtmp.keepAliveSecond")
+ private String rtmpKeepAliveSecond;
+
+ @JSONField(name = "rtmp.modifyStamp")
+ private String rtmpModifyStamp;
+
+ @JSONField(name = "rtmp.port")
+ private int rtmpPort;
+
+ @JSONField(name = "rtmp.sslport")
+ private int rtmpSslPort;
+
+ @JSONField(name = "rtp.audioMtuSize")
+ private String rtpAudioMtuSize;
+
+ @JSONField(name = "rtp.clearCount")
+ private String rtpClearCount;
+
+ @JSONField(name = "rtp.cycleMS")
+ private String rtpCycleMS;
+
+ @JSONField(name = "rtp.maxRtpCount")
+ private String rtpMaxRtpCount;
+
+ @JSONField(name = "rtp.videoMtuSize")
+ private String rtpVideoMtuSize;
+
+ @JSONField(name = "rtp_proxy.checkSource")
+ private String rtpProxyCheckSource;
+
+ @JSONField(name = "rtp_proxy.dumpDir")
+ private String rtpProxyDumpDir;
+
+ @JSONField(name = "rtp_proxy.port")
+ private int rtpProxyPort;
+
+ @JSONField(name = "rtp_proxy.port_range")
+ private String portRange;
+
+ @JSONField(name = "rtp_proxy.timeoutSec")
+ private String rtpProxyTimeoutSec;
+
+ @JSONField(name = "rtsp.authBasic")
+ private String rtspAuthBasic;
+
+ @JSONField(name = "rtsp.handshakeSecond")
+ private String rtspHandshakeSecond;
+
+ @JSONField(name = "rtsp.keepAliveSecond")
+ private String rtspKeepAliveSecond;
+
+ @JSONField(name = "rtsp.port")
+ private int rtspPort;
+
+ @JSONField(name = "rtsp.sslport")
+ private int rtspSSlport;
+
+ @JSONField(name = "shell.maxReqSize")
+ private String shellMaxReqSize;
+
+ @JSONField(name = "shell.shell")
+ private String shellPhell;
+
+ @JSONField(name = "transcode.suffix")
+ private String transcodeSuffix;
+
+
+ public String getHookIp() {
+ return hookIp;
+ }
+
+ public void setHookIp(String hookIp) {
+ this.hookIp = hookIp;
+ }
+
+ public String getApiDebug() {
+ return apiDebug;
+ }
+
+ public void setApiDebug(String apiDebug) {
+ this.apiDebug = apiDebug;
+ }
+
+ public String getApiSecret() {
+ return apiSecret;
+ }
+
+ public void setApiSecret(String apiSecret) {
+ this.apiSecret = apiSecret;
+ }
+
+ public String getFfmpegBin() {
+ return ffmpegBin;
+ }
+
+ public void setFfmpegBin(String ffmpegBin) {
+ this.ffmpegBin = ffmpegBin;
+ }
+
+ public String getFfmpegCmd() {
+ return ffmpegCmd;
+ }
+
+ public void setFfmpegCmd(String ffmpegCmd) {
+ this.ffmpegCmd = ffmpegCmd;
+ }
+
+ public String getFfmpegLog() {
+ return ffmpegLog;
+ }
+
+ public void setFfmpegLog(String ffmpegLog) {
+ this.ffmpegLog = ffmpegLog;
+ }
+
+ public String getGeneralEnableVhost() {
+ return generalEnableVhost;
+ }
+
+ public void setGeneralEnableVhost(String generalEnableVhost) {
+ this.generalEnableVhost = generalEnableVhost;
+ }
+
+ public String getGeneralMediaServerId() {
+ return generalMediaServerId;
+ }
+
+ public void setGeneralMediaServerId(String generalMediaServerId) {
+ this.generalMediaServerId = generalMediaServerId;
+ }
+
+ public String getGeneralFlowThreshold() {
+ return generalFlowThreshold;
+ }
+
+ public void setGeneralFlowThreshold(String generalFlowThreshold) {
+ this.generalFlowThreshold = generalFlowThreshold;
+ }
+
+ public String getGeneralMaxStreamWaitMS() {
+ return generalMaxStreamWaitMS;
+ }
+
+ public void setGeneralMaxStreamWaitMS(String generalMaxStreamWaitMS) {
+ this.generalMaxStreamWaitMS = generalMaxStreamWaitMS;
+ }
+
+ public int getGeneralStreamNoneReaderDelayMS() {
+ return generalStreamNoneReaderDelayMS;
+ }
+
+ public void setGeneralStreamNoneReaderDelayMS(int generalStreamNoneReaderDelayMS) {
+ this.generalStreamNoneReaderDelayMS = generalStreamNoneReaderDelayMS;
+ }
+
+ public String getIp() {
+ return ip;
+ }
+
+ public void setIp(String ip) {
+ this.ip = ip;
+ }
+
+ public String getSdpIp() {
+ return sdpIp;
+ }
+
+ public void setSdpIp(String sdpIp) {
+ this.sdpIp = sdpIp;
+ }
+
+ public String getStreamIp() {
+ return streamIp;
+ }
+
+ public void setStreamIp(String streamIp) {
+ this.streamIp = streamIp;
+ }
+
+ public String getUpdateTime() {
+ return updateTime;
+ }
+
+ public void setUpdateTime(String updateTime) {
+ this.updateTime = updateTime;
+ }
+
+ public String getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(String createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getHlsFileBufSize() {
+ return hlsFileBufSize;
+ }
+
+ public void setHlsFileBufSize(String hlsFileBufSize) {
+ this.hlsFileBufSize = hlsFileBufSize;
+ }
+
+ public String getHlsFilePath() {
+ return hlsFilePath;
+ }
+
+ public void setHlsFilePath(String hlsFilePath) {
+ this.hlsFilePath = hlsFilePath;
+ }
+
+ public String getHlsSegDur() {
+ return hlsSegDur;
+ }
+
+ public void setHlsSegDur(String hlsSegDur) {
+ this.hlsSegDur = hlsSegDur;
+ }
+
+ public String getHlsSegNum() {
+ return hlsSegNum;
+ }
+
+ public void setHlsSegNum(String hlsSegNum) {
+ this.hlsSegNum = hlsSegNum;
+ }
+
+ public String getHookAccessFileExceptHLS() {
+ return hookAccessFileExceptHLS;
+ }
+
+ public void setHookAccessFileExceptHLS(String hookAccessFileExceptHLS) {
+ this.hookAccessFileExceptHLS = hookAccessFileExceptHLS;
+ }
+
+ public String getHookAdminParams() {
+ return hookAdminParams;
+ }
+
+ public void setHookAdminParams(String hookAdminParams) {
+ this.hookAdminParams = hookAdminParams;
+ }
+
+ public String getHookEnable() {
+ return hookEnable;
+ }
+
+ public void setHookEnable(String hookEnable) {
+ this.hookEnable = hookEnable;
+ }
+
+ public String getHookOnFlowReport() {
+ return hookOnFlowReport;
+ }
+
+ public void setHookOnFlowReport(String hookOnFlowReport) {
+ this.hookOnFlowReport = hookOnFlowReport;
+ }
+
+ public String getHookOnHttpAccess() {
+ return hookOnHttpAccess;
+ }
+
+ public void setHookOnHttpAccess(String hookOnHttpAccess) {
+ this.hookOnHttpAccess = hookOnHttpAccess;
+ }
+
+ public String getHookOnPlay() {
+ return hookOnPlay;
+ }
+
+ public void setHookOnPlay(String hookOnPlay) {
+ this.hookOnPlay = hookOnPlay;
+ }
+
+ public String getHookOnPublish() {
+ return hookOnPublish;
+ }
+
+ public void setHookOnPublish(String hookOnPublish) {
+ this.hookOnPublish = hookOnPublish;
+ }
+
+ public String getHookOnRecordMp4() {
+ return hookOnRecordMp4;
+ }
+
+ public void setHookOnRecordMp4(String hookOnRecordMp4) {
+ this.hookOnRecordMp4 = hookOnRecordMp4;
+ }
+
+ public String getHookOnRtspAuth() {
+ return hookOnRtspAuth;
+ }
+
+ public void setHookOnRtspAuth(String hookOnRtspAuth) {
+ this.hookOnRtspAuth = hookOnRtspAuth;
+ }
+
+ public String getHookOnRtspRealm() {
+ return hookOnRtspRealm;
+ }
+
+ public void setHookOnRtspRealm(String hookOnRtspRealm) {
+ this.hookOnRtspRealm = hookOnRtspRealm;
+ }
+
+ public String getHookOnShellLogin() {
+ return hookOnShellLogin;
+ }
+
+ public void setHookOnShellLogin(String hookOnShellLogin) {
+ this.hookOnShellLogin = hookOnShellLogin;
+ }
+
+ public String getHookOnStreamChanged() {
+ return hookOnStreamChanged;
+ }
+
+ public void setHookOnStreamChanged(String hookOnStreamChanged) {
+ this.hookOnStreamChanged = hookOnStreamChanged;
+ }
+
+ public String getHookOnStreamNoneReader() {
+ return hookOnStreamNoneReader;
+ }
+
+ public void setHookOnStreamNoneReader(String hookOnStreamNoneReader) {
+ this.hookOnStreamNoneReader = hookOnStreamNoneReader;
+ }
+
+ public String getHookOnStreamNotFound() {
+ return hookOnStreamNotFound;
+ }
+
+ public void setHookOnStreamNotFound(String hookOnStreamNotFound) {
+ this.hookOnStreamNotFound = hookOnStreamNotFound;
+ }
+
+ public String getHookTimeoutSec() {
+ return hookTimeoutSec;
+ }
+
+ public void setHookTimeoutSec(String hookTimeoutSec) {
+ this.hookTimeoutSec = hookTimeoutSec;
+ }
+
+ public String getHttpCharSet() {
+ return httpCharSet;
+ }
+
+ public void setHttpCharSet(String httpCharSet) {
+ this.httpCharSet = httpCharSet;
+ }
+
+ public String getHttpKeepAliveSecond() {
+ return httpKeepAliveSecond;
+ }
+
+ public void setHttpKeepAliveSecond(String httpKeepAliveSecond) {
+ this.httpKeepAliveSecond = httpKeepAliveSecond;
+ }
+
+ public String getHttpMaxReqCount() {
+ return httpMaxReqCount;
+ }
+
+ public void setHttpMaxReqCount(String httpMaxReqCount) {
+ this.httpMaxReqCount = httpMaxReqCount;
+ }
+
+ public String getHttpMaxReqSize() {
+ return httpMaxReqSize;
+ }
+
+ public void setHttpMaxReqSize(String httpMaxReqSize) {
+ this.httpMaxReqSize = httpMaxReqSize;
+ }
+
+ public String getHttpNotFound() {
+ return httpNotFound;
+ }
+
+ public void setHttpNotFound(String httpNotFound) {
+ this.httpNotFound = httpNotFound;
+ }
+
+ public int getHttpPort() {
+ return httpPort;
+ }
+
+ public void setHttpPort(int httpPort) {
+ this.httpPort = httpPort;
+ }
+
+ public String getHttpRootPath() {
+ return httpRootPath;
+ }
+
+ public void setHttpRootPath(String httpRootPath) {
+ this.httpRootPath = httpRootPath;
+ }
+
+ public String getHttpSendBufSize() {
+ return httpSendBufSize;
+ }
+
+ public void setHttpSendBufSize(String httpSendBufSize) {
+ this.httpSendBufSize = httpSendBufSize;
+ }
+
+ public int getHttpSSLport() {
+ return httpSSLport;
+ }
+
+ public void setHttpSSLport(int httpSSLport) {
+ this.httpSSLport = httpSSLport;
+ }
+
+ public String getMulticastAddrMax() {
+ return multicastAddrMax;
+ }
+
+ public void setMulticastAddrMax(String multicastAddrMax) {
+ this.multicastAddrMax = multicastAddrMax;
+ }
+
+ public String getMulticastAddrMin() {
+ return multicastAddrMin;
+ }
+
+ public void setMulticastAddrMin(String multicastAddrMin) {
+ this.multicastAddrMin = multicastAddrMin;
+ }
+
+ public String getMulticastUdpTTL() {
+ return multicastUdpTTL;
+ }
+
+ public void setMulticastUdpTTL(String multicastUdpTTL) {
+ this.multicastUdpTTL = multicastUdpTTL;
+ }
+
+ public String getRecordAppName() {
+ return recordAppName;
+ }
+
+ public void setRecordAppName(String recordAppName) {
+ this.recordAppName = recordAppName;
+ }
+
+ public String getRecordFilePath() {
+ return recordFilePath;
+ }
+
+ public void setRecordFilePath(String recordFilePath) {
+ this.recordFilePath = recordFilePath;
+ }
+
+ public String getRecordFileSecond() {
+ return recordFileSecond;
+ }
+
+ public void setRecordFileSecond(String recordFileSecond) {
+ this.recordFileSecond = recordFileSecond;
+ }
+
+ public String getRecordFileSampleMS() {
+ return recordFileSampleMS;
+ }
+
+ public void setRecordFileSampleMS(String recordFileSampleMS) {
+ this.recordFileSampleMS = recordFileSampleMS;
+ }
+
+ public String getRtmpHandshakeSecond() {
+ return rtmpHandshakeSecond;
+ }
+
+ public void setRtmpHandshakeSecond(String rtmpHandshakeSecond) {
+ this.rtmpHandshakeSecond = rtmpHandshakeSecond;
+ }
+
+ public String getRtmpKeepAliveSecond() {
+ return rtmpKeepAliveSecond;
+ }
+
+ public void setRtmpKeepAliveSecond(String rtmpKeepAliveSecond) {
+ this.rtmpKeepAliveSecond = rtmpKeepAliveSecond;
+ }
+
+ public String getRtmpModifyStamp() {
+ return rtmpModifyStamp;
+ }
+
+ public void setRtmpModifyStamp(String rtmpModifyStamp) {
+ this.rtmpModifyStamp = rtmpModifyStamp;
+ }
+
+ public int getRtmpPort() {
+ return rtmpPort;
+ }
+
+ public void setRtmpPort(int rtmpPort) {
+ this.rtmpPort = rtmpPort;
+ }
+
+ public int getRtmpSslPort() {
+ return rtmpSslPort;
+ }
+
+ public void setRtmpSslPort(int rtmpSslPort) {
+ this.rtmpSslPort = rtmpSslPort;
+ }
+
+ public String getRtpAudioMtuSize() {
+ return rtpAudioMtuSize;
+ }
+
+ public void setRtpAudioMtuSize(String rtpAudioMtuSize) {
+ this.rtpAudioMtuSize = rtpAudioMtuSize;
+ }
+
+ public String getRtpClearCount() {
+ return rtpClearCount;
+ }
+
+ public void setRtpClearCount(String rtpClearCount) {
+ this.rtpClearCount = rtpClearCount;
+ }
+
+ public String getRtpCycleMS() {
+ return rtpCycleMS;
+ }
+
+ public void setRtpCycleMS(String rtpCycleMS) {
+ this.rtpCycleMS = rtpCycleMS;
+ }
+
+ public String getRtpMaxRtpCount() {
+ return rtpMaxRtpCount;
+ }
+
+ public void setRtpMaxRtpCount(String rtpMaxRtpCount) {
+ this.rtpMaxRtpCount = rtpMaxRtpCount;
+ }
+
+ public String getRtpVideoMtuSize() {
+ return rtpVideoMtuSize;
+ }
+
+ public void setRtpVideoMtuSize(String rtpVideoMtuSize) {
+ this.rtpVideoMtuSize = rtpVideoMtuSize;
+ }
+
+ public String getRtpProxyCheckSource() {
+ return rtpProxyCheckSource;
+ }
+
+ public void setRtpProxyCheckSource(String rtpProxyCheckSource) {
+ this.rtpProxyCheckSource = rtpProxyCheckSource;
+ }
+
+ public String getRtpProxyDumpDir() {
+ return rtpProxyDumpDir;
+ }
+
+ public void setRtpProxyDumpDir(String rtpProxyDumpDir) {
+ this.rtpProxyDumpDir = rtpProxyDumpDir;
+ }
+
+ public int getRtpProxyPort() {
+ return rtpProxyPort;
+ }
+
+ public void setRtpProxyPort(int rtpProxyPort) {
+ this.rtpProxyPort = rtpProxyPort;
+ }
+
+ public String getRtpProxyTimeoutSec() {
+ return rtpProxyTimeoutSec;
+ }
+
+ public void setRtpProxyTimeoutSec(String rtpProxyTimeoutSec) {
+ this.rtpProxyTimeoutSec = rtpProxyTimeoutSec;
+ }
+
+ public String getRtspAuthBasic() {
+ return rtspAuthBasic;
+ }
+
+ public void setRtspAuthBasic(String rtspAuthBasic) {
+ this.rtspAuthBasic = rtspAuthBasic;
+ }
+
+ public String getRtspHandshakeSecond() {
+ return rtspHandshakeSecond;
+ }
+
+ public void setRtspHandshakeSecond(String rtspHandshakeSecond) {
+ this.rtspHandshakeSecond = rtspHandshakeSecond;
+ }
+
+ public String getRtspKeepAliveSecond() {
+ return rtspKeepAliveSecond;
+ }
+
+ public void setRtspKeepAliveSecond(String rtspKeepAliveSecond) {
+ this.rtspKeepAliveSecond = rtspKeepAliveSecond;
+ }
+
+ public int getRtspPort() {
+ return rtspPort;
+ }
+
+ public void setRtspPort(int rtspPort) {
+ this.rtspPort = rtspPort;
+ }
+
+ public int getRtspSSlport() {
+ return rtspSSlport;
+ }
+
+ public void setRtspSSlport(int rtspSSlport) {
+ this.rtspSSlport = rtspSSlport;
+ }
+
+ public String getShellMaxReqSize() {
+ return shellMaxReqSize;
+ }
+
+ public void setShellMaxReqSize(String shellMaxReqSize) {
+ this.shellMaxReqSize = shellMaxReqSize;
+ }
+
+ public String getShellPhell() {
+ return shellPhell;
+ }
+
+ public void setShellPhell(String shellPhell) {
+ this.shellPhell = shellPhell;
+ }
+
+ public Float getHookAliveInterval() {
+ return hookAliveInterval;
+ }
+
+ public void setHookAliveInterval(Float hookAliveInterval) {
+ this.hookAliveInterval = hookAliveInterval;
+ }
+
+ public String getPortRange() {
+ return portRange;
+ }
+
+ public void setPortRange(String portRange) {
+ this.portRange = portRange;
+ }
+
+ public String getApiSnapRoot() {
+ return apiSnapRoot;
+ }
+
+ public void setApiSnapRoot(String apiSnapRoot) {
+ this.apiSnapRoot = apiSnapRoot;
+ }
+
+ public String getApiDefaultSnap() {
+ return apiDefaultSnap;
+ }
+
+ public void setApiDefaultSnap(String apiDefaultSnap) {
+ this.apiDefaultSnap = apiDefaultSnap;
+ }
+
+ public String getFfmpegSnap() {
+ return ffmpegSnap;
+ }
+
+ public void setFfmpegSnap(String ffmpegSnap) {
+ this.ffmpegSnap = ffmpegSnap;
+ }
+
+ public String getFfmpegRestartSec() {
+ return ffmpegRestartSec;
+ }
+
+ public void setFfmpegRestartSec(String ffmpegRestartSec) {
+ this.ffmpegRestartSec = ffmpegRestartSec;
+ }
+
+ public String getProtocolModifyStamp() {
+ return protocolModifyStamp;
+ }
+
+ public void setProtocolModifyStamp(String protocolModifyStamp) {
+ this.protocolModifyStamp = protocolModifyStamp;
+ }
+
+ public String getProtocolEnableAudio() {
+ return protocolEnableAudio;
+ }
+
+ public void setProtocolEnableAudio(String protocolEnableAudio) {
+ this.protocolEnableAudio = protocolEnableAudio;
+ }
+
+ public String getProtocolAddMuteAudio() {
+ return protocolAddMuteAudio;
+ }
+
+ public void setProtocolAddMuteAudio(String protocolAddMuteAudio) {
+ this.protocolAddMuteAudio = protocolAddMuteAudio;
+ }
+
+ public String getProtocolContinuePushMs() {
+ return protocolContinuePushMs;
+ }
+
+ public void setProtocolContinuePushMs(String protocolContinuePushMs) {
+ this.protocolContinuePushMs = protocolContinuePushMs;
+ }
+
+ public String getProtocolEnableHls() {
+ return protocolEnableHls;
+ }
+
+ public void setProtocolEnableHls(String protocolEnableHls) {
+ this.protocolEnableHls = protocolEnableHls;
+ }
+
+ public String getProtocolEnableMp4() {
+ return protocolEnableMp4;
+ }
+
+ public void setProtocolEnableMp4(String protocolEnableMp4) {
+ this.protocolEnableMp4 = protocolEnableMp4;
+ }
+
+ public String getProtocolEnableRtsp() {
+ return protocolEnableRtsp;
+ }
+
+ public void setProtocolEnableRtsp(String protocolEnableRtsp) {
+ this.protocolEnableRtsp = protocolEnableRtsp;
+ }
+
+ public String getProtocolEnableRtmp() {
+ return protocolEnableRtmp;
+ }
+
+ public void setProtocolEnableRtmp(String protocolEnableRtmp) {
+ this.protocolEnableRtmp = protocolEnableRtmp;
+ }
+
+ public String getProtocolEnableTs() {
+ return protocolEnableTs;
+ }
+
+ public void setProtocolEnableTs(String protocolEnableTs) {
+ this.protocolEnableTs = protocolEnableTs;
+ }
+
+ public String getProtocolEnableFmp4() {
+ return protocolEnableFmp4;
+ }
+
+ public void setProtocolEnableFmp4(String protocolEnableFmp4) {
+ this.protocolEnableFmp4 = protocolEnableFmp4;
+ }
+
+ public String getProtocolMp4AsPlayer() {
+ return protocolMp4AsPlayer;
+ }
+
+ public void setProtocolMp4AsPlayer(String protocolMp4AsPlayer) {
+ this.protocolMp4AsPlayer = protocolMp4AsPlayer;
+ }
+
+ public String getProtocolMp4MaxSecond() {
+ return protocolMp4MaxSecond;
+ }
+
+ public void setProtocolMp4MaxSecond(String protocolMp4MaxSecond) {
+ this.protocolMp4MaxSecond = protocolMp4MaxSecond;
+ }
+
+ public String getProtocolMp4SavePath() {
+ return protocolMp4SavePath;
+ }
+
+ public void setProtocolMp4SavePath(String protocolMp4SavePath) {
+ this.protocolMp4SavePath = protocolMp4SavePath;
+ }
+
+ public String getProtocolHlsSavePath() {
+ return protocolHlsSavePath;
+ }
+
+ public void setProtocolHlsSavePath(String protocolHlsSavePath) {
+ this.protocolHlsSavePath = protocolHlsSavePath;
+ }
+
+ public String getProtocolHlsDemand() {
+ return protocolHlsDemand;
+ }
+
+ public void setProtocolHlsDemand(String protocolHlsDemand) {
+ this.protocolHlsDemand = protocolHlsDemand;
+ }
+
+ public String getProtocolRtspDemand() {
+ return protocolRtspDemand;
+ }
+
+ public void setProtocolRtspDemand(String protocolRtspDemand) {
+ this.protocolRtspDemand = protocolRtspDemand;
+ }
+
+ public String getProtocolRtmpDemand() {
+ return protocolRtmpDemand;
+ }
+
+ public void setProtocolRtmpDemand(String protocolRtmpDemand) {
+ this.protocolRtmpDemand = protocolRtmpDemand;
+ }
+
+ public String getProtocolTsDemand() {
+ return protocolTsDemand;
+ }
+
+ public void setProtocolTsDemand(String protocolTsDemand) {
+ this.protocolTsDemand = protocolTsDemand;
+ }
+
+ public String getProtocolFmp4Demand() {
+ return protocolFmp4Demand;
+ }
+
+ public void setProtocolFmp4Demand(String protocolFmp4Demand) {
+ this.protocolFmp4Demand = protocolFmp4Demand;
+ }
+
+ public String getGeneralResetWhenRePlay() {
+ return generalResetWhenRePlay;
+ }
+
+ public void setGeneralResetWhenRePlay(String generalResetWhenRePlay) {
+ this.generalResetWhenRePlay = generalResetWhenRePlay;
+ }
+
+ public String getGeneralMergeWriteMS() {
+ return generalMergeWriteMS;
+ }
+
+ public void setGeneralMergeWriteMS(String generalMergeWriteMS) {
+ this.generalMergeWriteMS = generalMergeWriteMS;
+ }
+
+ public String getGeneralWaitTrackReadyMs() {
+ return generalWaitTrackReadyMs;
+ }
+
+ public void setGeneralWaitTrackReadyMs(String generalWaitTrackReadyMs) {
+ this.generalWaitTrackReadyMs = generalWaitTrackReadyMs;
+ }
+
+ public String getGeneralWaitAddTrackMs() {
+ return generalWaitAddTrackMs;
+ }
+
+ public void setGeneralWaitAddTrackMs(String generalWaitAddTrackMs) {
+ this.generalWaitAddTrackMs = generalWaitAddTrackMs;
+ }
+
+ public String getGeneralUnreadyFrameCache() {
+ return generalUnreadyFrameCache;
+ }
+
+ public void setGeneralUnreadyFrameCache(String generalUnreadyFrameCache) {
+ this.generalUnreadyFrameCache = generalUnreadyFrameCache;
+ }
+
+ public String getHlsSegRetain() {
+ return hlsSegRetain;
+ }
+
+ public void setHlsSegRetain(String hlsSegRetain) {
+ this.hlsSegRetain = hlsSegRetain;
+ }
+
+ public String getHlsBroadcastRecordTs() {
+ return hlsBroadcastRecordTs;
+ }
+
+ public void setHlsBroadcastRecordTs(String hlsBroadcastRecordTs) {
+ this.hlsBroadcastRecordTs = hlsBroadcastRecordTs;
+ }
+
+ public String getHlsDeleteDelaySec() {
+ return hlsDeleteDelaySec;
+ }
+
+ public void setHlsDeleteDelaySec(String hlsDeleteDelaySec) {
+ this.hlsDeleteDelaySec = hlsDeleteDelaySec;
+ }
+
+ public String getHlsSegKeep() {
+ return hlsSegKeep;
+ }
+
+ public void setHlsSegKeep(String hlsSegKeep) {
+ this.hlsSegKeep = hlsSegKeep;
+ }
+
+ public String getHookOnServerStarted() {
+ return hookOnServerStarted;
+ }
+
+ public void setHookOnServerStarted(String hookOnServerStarted) {
+ this.hookOnServerStarted = hookOnServerStarted;
+ }
+
+ public String getHookOnServerKeepalive() {
+ return hookOnServerKeepalive;
+ }
+
+ public void setHookOnServerKeepalive(String hookOnServerKeepalive) {
+ this.hookOnServerKeepalive = hookOnServerKeepalive;
+ }
+
+ public String getHookOnSendRtpStopped() {
+ return hookOnSendRtpStopped;
+ }
+
+ public void setHookOnSendRtpStopped(String hookOnSendRtpStopped) {
+ this.hookOnSendRtpStopped = hookOnSendRtpStopped;
+ }
+
+ public String getHookOnRtpServerTimeout() {
+ return hookOnRtpServerTimeout;
+ }
+
+ public void setHookOnRtpServerTimeout(String hookOnRtpServerTimeout) {
+ this.hookOnRtpServerTimeout = hookOnRtpServerTimeout;
+ }
+
+ public String getTranscodeSuffix() {
+ return transcodeSuffix;
+ }
+
+ public void setTranscodeSuffix(String transcodeSuffix) {
+ this.transcodeSuffix = transcodeSuffix;
+ }
+}
diff --git a/ycl-server/pom.xml b/ycl-server/pom.xml
index 3a4c1b9..3bcf049 100644
--- a/ycl-server/pom.xml
+++ b/ycl-server/pom.xml
@@ -18,6 +18,13 @@
<dependencies>
+ <!--瑙嗛澶勭悊-->
+ <dependency>
+ <groupId>org.bytedeco</groupId>
+ <artifactId>javacv-platform</artifactId>
+ <version>1.5.7</version>
+ </dependency>
+
<!--netty-->
<dependency>
<groupId>io.netty</groupId>
diff --git a/ycl-server/src/main/java/com/ycl/platform/mapper/DeviceInfoMapper.java b/ycl-server/src/main/java/com/ycl/platform/mapper/DeviceInfoMapper.java
new file mode 100644
index 0000000..d3ba46f
--- /dev/null
+++ b/ycl-server/src/main/java/com/ycl/platform/mapper/DeviceInfoMapper.java
@@ -0,0 +1,22 @@
+package com.ycl.platform.mapper;
+
+import com.ycl.platform.domain.entity.DeviceInfo;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ycl.platform.domain.vo.DeviceInfoVO;
+import com.ycl.platform.domain.form.DeviceInfoForm;
+import java.util.List;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 鍥芥爣绾ц仈鍚屾鏁版嵁 Mapper 鎺ュ彛
+ *
+ * @author xp
+ * @since 2024-08-21
+ */
+@Mapper
+public interface DeviceInfoMapper extends BaseMapper<DeviceInfo> {
+
+
+}
diff --git a/ycl-server/src/main/java/com/ycl/platform/mapper/WorkOrderMapper.java b/ycl-server/src/main/java/com/ycl/platform/mapper/WorkOrderMapper.java
index cf2f65c..fdbf66b 100644
--- a/ycl-server/src/main/java/com/ycl/platform/mapper/WorkOrderMapper.java
+++ b/ycl-server/src/main/java/com/ycl/platform/mapper/WorkOrderMapper.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ycl.platform.domain.entity.WorkOrder;
import com.ycl.platform.domain.query.*;
+import com.ycl.platform.domain.vo.DeviceInfoVO;
import com.ycl.platform.domain.vo.WorkOrderVO;
import com.ycl.platform.domain.vo.YwPointJobVO;
import com.ycl.platform.domain.vo.screen.ScreenWorkOrderVO;
@@ -63,4 +64,10 @@
* @return 鏁版嵁
*/
List<WorkOrderRegionVO> workOrderRegion(DashboardQuery dashboardQuery);
+
+ /**
+ * 鏌ヨ宸ュ崟璁惧淇℃伅
+ * @return
+ */
+ List<DeviceInfoVO> hasErrorWorkOrderList();
}
diff --git a/ycl-server/src/main/java/com/ycl/platform/service/DeviceInfoService.java b/ycl-server/src/main/java/com/ycl/platform/service/DeviceInfoService.java
new file mode 100644
index 0000000..bb26722
--- /dev/null
+++ b/ycl-server/src/main/java/com/ycl/platform/service/DeviceInfoService.java
@@ -0,0 +1,15 @@
+package com.ycl.platform.service;
+
+import com.ycl.platform.domain.entity.DeviceInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * 鍥芥爣绾ц仈鍚屾鏁版嵁 鏈嶅姟绫�
+ *
+ * @author xp
+ * @since 2024-08-21
+ */
+public interface DeviceInfoService extends IService<DeviceInfo> {
+
+
+}
diff --git a/ycl-server/src/main/java/com/ycl/platform/service/WorkOrderService.java b/ycl-server/src/main/java/com/ycl/platform/service/WorkOrderService.java
index 8ad3749..fcaee48 100644
--- a/ycl-server/src/main/java/com/ycl/platform/service/WorkOrderService.java
+++ b/ycl-server/src/main/java/com/ycl/platform/service/WorkOrderService.java
@@ -4,6 +4,7 @@
import com.ycl.platform.domain.entity.WorkOrder;
import com.ycl.platform.domain.form.*;
import com.ycl.platform.domain.query.*;
+import com.ycl.platform.domain.vo.DeviceInfoVO;
import com.ycl.platform.domain.vo.DistributeWorkOrderVO;
import com.ycl.platform.domain.vo.screen.WorkOrderRegionVO;
import com.ycl.platform.domain.vo.screen.WorkOrderTotalVO;
@@ -175,4 +176,29 @@
*/
List<WorkOrderRegionVO> workOrderRegion(DashboardQuery dashboardQuery);
+
+ /**
+ * 宸ュ崟璁惧鐐规挱鑾峰彇涓�甯у浘鐗�
+ *
+ * @param deviceId 璁惧鍥芥爣鐮�
+ * @param channelId 璁惧閫氶亾缂栧彿
+ * @return 鏁版嵁
+ */
+ String getFrameImgByDevice(String deviceId, String channelId);
+
+ /**
+ * 鏌ヨ宸ュ崟锛氬凡涓嬪彂銆佸凡澶勭悊銆佸凡瀹屾垚鐨勫伐鍗�
+ *
+ * @return 鏁版嵁
+ */
+ List<DeviceInfoVO> hasErrorWorkOrderList();
+
+ /**
+ * 鏌ヨ宸ュ崟锛氬凡涓嬪彂銆佸凡澶勭悊銆佸凡瀹屾垚鐨勫伐鍗�
+ *
+ * @param workOrderId 宸ュ崟ID
+ * @param imgPath 鍥惧儚鍦板潃
+ * @return 鏁版嵁
+ */
+ void updateImgById(Integer workOrderId, String imgPath);
}
diff --git a/ycl-server/src/main/java/com/ycl/platform/service/impl/DeviceInfoServiceImpl.java b/ycl-server/src/main/java/com/ycl/platform/service/impl/DeviceInfoServiceImpl.java
new file mode 100644
index 0000000..553b78d
--- /dev/null
+++ b/ycl-server/src/main/java/com/ycl/platform/service/impl/DeviceInfoServiceImpl.java
@@ -0,0 +1,23 @@
+package com.ycl.platform.service.impl;
+
+import com.ycl.platform.domain.entity.DeviceInfo;
+import com.ycl.platform.mapper.DeviceInfoMapper;
+import com.ycl.platform.service.DeviceInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import lombok.RequiredArgsConstructor;
+
+/**
+ * 鍥芥爣绾ц仈鍚屾鏁版嵁 鏈嶅姟瀹炵幇绫�
+ *
+ * @author xp
+ * @since 2024-08-21
+ */
+@Service
+@RequiredArgsConstructor
+public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceInfo> implements DeviceInfoService {
+
+ private final DeviceInfoMapper deviceInfoMapper;
+
+
+}
diff --git a/ycl-server/src/main/java/com/ycl/platform/service/impl/WorkOrderServiceImpl.java b/ycl-server/src/main/java/com/ycl/platform/service/impl/WorkOrderServiceImpl.java
index 66e3094..ddf6987 100644
--- a/ycl-server/src/main/java/com/ycl/platform/service/impl/WorkOrderServiceImpl.java
+++ b/ycl-server/src/main/java/com/ycl/platform/service/impl/WorkOrderServiceImpl.java
@@ -1,14 +1,18 @@
package com.ycl.platform.service.impl;
+import com.alibaba.fastjson2.JSON;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ycl.config.PlatformConfig;
+import com.ycl.config.ServerConfig;
import com.ycl.exception.ServiceException;
import com.ycl.platform.domain.entity.*;
import com.ycl.platform.domain.form.*;
import com.ycl.platform.domain.query.*;
+import com.ycl.platform.domain.vo.DeviceInfoVO;
import com.ycl.platform.domain.vo.DistributeWorkOrderVO;
import com.ycl.platform.domain.vo.WorkOrderVO;
import com.ycl.platform.domain.vo.WorkOrderYwConditionRecordVO;
@@ -20,6 +24,8 @@
import com.ycl.platform.service.WorkOrderAuditingRecordService;
import com.ycl.platform.service.WorkOrderService;
import com.ycl.platform.service.YwPointService;
+import com.ycl.platform.wvp.StreamContent;
+import com.ycl.platform.wvp.WVPResult;
import com.ycl.system.Result;
import com.ycl.system.domain.SysConfig;
import com.ycl.system.mapper.SysConfigMapper;
@@ -27,20 +33,29 @@
import com.ycl.system.page.PageUtil;
import com.ycl.utils.DateUtils;
import com.ycl.utils.SecurityUtils;
+import com.ycl.utils.http.HttpUtils;
import com.ycl.utils.redis.RedisCache;
import com.ycl.utils.uuid.IdUtils;
import enumeration.general.*;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
+import org.bytedeco.javacv.FFmpegFrameGrabber;
+import org.bytedeco.javacv.Frame;
+import org.bytedeco.javacv.Java2DFrameConverter;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
+import javax.imageio.ImageIO;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.*;
@@ -66,6 +81,10 @@
private final WorkOrderDistributeRecordMapper workOrderDistributeRecordMapper;
private final TMonitorMapper monitorMapper;
private final SysConfigMapper configMapper;
+ private final ServerConfig serverConfig;
+
+ @Value("${rtsp.server:http://127.0.0.1:7788}")
+ private String rtspServer;
private final String DISTRIBUTE_LOCK_KEY = "distributeLock";
private final static String IMPORTANT = "important";
@@ -557,4 +576,53 @@
public List<WorkOrderRegionVO> workOrderRegion(DashboardQuery dashboardQuery) {
return baseMapper.workOrderRegion(dashboardQuery);
}
+
+
+ @Override
+ public String getFrameImgByDevice(String deviceId, String channelId) {
+ String url = String.format(this.rtspServer + "/start/%s/%s", deviceId, channelId);
+ String result = HttpUtils.sendGet(url);
+ WVPResult wvpResult = JSON.parseObject(result, WVPResult.class);
+ if (0 == wvpResult.getCode()) {
+ StreamContent data = (StreamContent) wvpResult.getData();
+ String rtspUrl = data.getRtsp();
+ if (StringUtils.hasText(rtspUrl)) {
+ try {
+ // 鍒涘缓FFmpegFrameGrabber瀵硅薄
+ FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(rtspUrl);
+ grabber.start(); // 寮�濮嬫崟鑾�
+
+ Frame frame;
+ if ((frame = grabber.grabFrame()) != null) {
+ // 灏嗗抚杞崲涓哄浘鐗�
+ Java2DFrameConverter converter = new Java2DFrameConverter();
+ BufferedImage image = converter.convert(frame);
+ File outputfile = new File(serverConfig.getUrl() + PlatformConfig.getUploadPath() + deviceId + IdUtils.fastSimpleUUID() + ".png");
+ ImageIO.write(image, "png", outputfile);
+ String imgPath = outputfile.getAbsolutePath();
+ System.out.println("Saved " + imgPath);
+ return imgPath;
+ }
+ grabber.stop(); // 鍋滄鎹曡幏
+ grabber.release(); // 閲婃斁璧勬簮
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public List<DeviceInfoVO> hasErrorWorkOrderList() {
+ List<DeviceInfoVO> list = baseMapper.hasErrorWorkOrderList();
+ return list;
+ }
+
+ @Override
+ public void updateImgById(Integer workOrderId, String imgPath) {
+ new LambdaUpdateChainWrapper<>(baseMapper)
+ .eq(WorkOrder::getId, workOrderId)
+ .set(WorkOrder::getYwCheckCondition, imgPath);
+ }
}
diff --git a/ycl-server/src/main/java/com/ycl/task/WorkOrderImgTask.java b/ycl-server/src/main/java/com/ycl/task/WorkOrderImgTask.java
new file mode 100644
index 0000000..8603ba8
--- /dev/null
+++ b/ycl-server/src/main/java/com/ycl/task/WorkOrderImgTask.java
@@ -0,0 +1,48 @@
+package com.ycl.task;
+
+import com.ycl.platform.domain.vo.DeviceInfoVO;
+import com.ycl.platform.service.WorkOrderService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.stereotype.Component;
+import org.springframework.util.StringUtils;
+
+import java.util.List;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * 宸ュ崟鎭㈠鍥剧墖鑾峰彇
+ *
+ * @author锛歺p
+ * @date锛�2024/8/21 11:56
+ */
+@RequiredArgsConstructor
+@Component("workOrderImgTask")
+public class WorkOrderImgTask {
+
+ private final WorkOrderService workOrderService;
+
+ private static final ExecutorService executorService = new ThreadPoolExecutor(8,
+ 24,
+ 5000,
+ TimeUnit.SECONDS,
+ new ArrayBlockingQueue<>(10),
+ new ThreadPoolExecutor.CallerRunsPolicy()
+ );
+
+ public void run() {
+ // 鏌ュ嚭鏁呴殰鐨勮澶�
+ List<DeviceInfoVO> deviceList = workOrderService.hasErrorWorkOrderList();
+ for (DeviceInfoVO deviceInfo : deviceList) {
+ executorService.submit(() -> {
+ String frameImg = workOrderService.getFrameImgByDevice(deviceInfo.getDeviceId(), deviceInfo.getChannelId());
+ if (StringUtils.hasText(frameImg)) {
+ workOrderService.updateImgById(deviceInfo.getWorkOrderId(), frameImg);
+ }
+ });
+ }
+ }
+
+}
diff --git a/ycl-server/src/main/resources/application-dev.yml b/ycl-server/src/main/resources/application-dev.yml
index ab4cea3..a2a11c7 100644
--- a/ycl-server/src/main/resources/application-dev.yml
+++ b/ycl-server/src/main/resources/application-dev.yml
@@ -138,3 +138,7 @@
passwd: Yesc@123
apikey: 72fcfd6825304f7fa0453134de620f3a
accesskey: fc9503a521544e76a8e69b912a2f177bc6362b19
+
+# gb281瑙嗛缃戝叧鍦板潃锛岀敤浜庤幏鍙杛tsp鏍煎紡鐨勬祦鍦板潃
+rtsp:
+ server: http://192.168.3.88:7788
diff --git a/ycl-server/src/main/resources/application-prod.yml b/ycl-server/src/main/resources/application-prod.yml
index 4b089b1..e154de5 100644
--- a/ycl-server/src/main/resources/application-prod.yml
+++ b/ycl-server/src/main/resources/application-prod.yml
@@ -138,3 +138,7 @@
passwd: Yesc@123
apikey: 72fcfd6825304f7fa0453134de620f3a
accesskey: fc9503a521544e76a8e69b912a2f177bc6362b19
+
+# gb281瑙嗛缃戝叧鍦板潃锛岀敤浜庤幏鍙杛tsp鏍煎紡鐨勬祦鍦板潃
+rtsp:
+ server: http://192.168.3.88:7788
diff --git a/ycl-server/src/main/resources/mapper/zgyw/WorkOrderMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/WorkOrderMapper.xml
index 667eded..5445a93 100644
--- a/ycl-server/src/main/resources/mapper/zgyw/WorkOrderMapper.xml
+++ b/ycl-server/src/main/resources/mapper/zgyw/WorkOrderMapper.xml
@@ -171,4 +171,14 @@
ORDER BY d.dept_id
</select>
+ <select id="hasErrorWorkOrderList" resultType="com.ycl.platform.domain.vo.DeviceInfoVO">
+ SELECT
+ wo.id as workOrderId,
+ di.device_id,
+ di.channel_id
+ FROM
+ t_work_order wo
+ INNER JOIN t_device_info di ON wo.serial_number = di.device_id
+ </select>
+
</mapper>
--
Gitblit v1.8.0