提交 c311e27f 作者: Administrator

feat:工区表设计

上级 1b39115a
/* (C) 2022 YiRing, Inc. */
package com.yiring.app.domain.workArea;
import com.yiring.app.domain.video.Video;
import com.yiring.common.domain.BasicEntity;
import java.io.Serial;
import java.io.Serializable;
import javax.persistence.*;
import lombok.*;
import lombok.experimental.FieldDefaults;
import lombok.experimental.FieldNameConstants;
import org.hibernate.annotations.Comment;
/**
* @author tzl
* @version 1.0
* @description:
* @date 2022/5/20 16:08
*/
@Getter
@Setter
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
@FieldNameConstants
@FieldDefaults(level = AccessLevel.PRIVATE)
@Entity
@Table(name = "BS_WORK_AREA")
@Comment("工区")
public class WorkArea extends BasicEntity implements Serializable {
@Serial
private static final long serialVersionUID = -6738299404223231827L;
@Comment("工区名称")
String workAreaName;
@Comment("消抖阈值(秒)")
Integer threshold;
@Comment("超时时间(秒)")
Integer timeout;
@Comment("负责人")
String personInCharge;
@Comment("联系电话")
String mobile;
@Comment("监控设备")
@OneToOne
Video video;
}
......@@ -34,9 +34,9 @@ public class BroadcastQueryParam implements Serializable {
@ApiModelProperty(value = "状态", example = "1")
String status;
@ApiModelProperty(value = "分页条数", example = "10", required = true)
@ApiModelProperty(value = "分页条数", example = "10")
Integer pageSize;
@ApiModelProperty(value = "当前页数", example = "1", required = true)
@ApiModelProperty(value = "当前页数", example = "1")
Integer pageNo;
}
......@@ -27,12 +27,17 @@ public class StreamProxyItem implements Serializable {
String stream;
//拉流地址
String url;
//ffmpeg地址
String src_url;
String rtp_type;
String ffmpeg_cmd_key;
//类型,根据地址是否有关键字判断
String type;
//节点选择
String mediaServerId;
//是否启用
boolean enable;
boolean status;
//是否转HLS
boolean enable_hls;
......
......@@ -91,12 +91,16 @@ public class VideoServiceImpl implements VideoService {
.name(video.getVideoName())
.app("stream")
.stream(video.getUuid())
.url(video.getM3u8())
.url(video.getM3u8().contains("/h264") ? video.getM3u8() : "")
.src_url(video.getM3u8().contains("/h265") ? video.getM3u8() : "")
.ffmpeg_cmd_key(video.getM3u8().contains("/h265") ? "ffmpeg.cmd" : "")
.rtp_type(video.getM3u8().contains("/h265") ? "" : "0")
.mediaServerId("ZbnQN5csqxrPix7a")
.enable(true)
.enable_hls(true)
// .status(true)
.type(video.getM3u8().contains("/h265") ? "ffmpeg" : "default")
.timeout_ms(video.getM3u8().contains("/h265") ? 60 : null)
.timeout_ms(video.getM3u8().contains("/h265") ? 30000 : null)
.build();
JSONObject jsonObject = gbClient.proxySave(streamProxyItem, gbCookie());
if (!jsonObject.get("code").equals(0)) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论