From 746cd2543d3d737a337ecb5bce5d936064bbaeff Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Mon, 25 Dec 2023 17:50:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AE=BE=E5=A4=87=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=9F=A5=E8=AF=A2=EF=BC=8C=E6=94=AF=E6=8C=81=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E3=80=82=E6=94=AF=E6=8C=81=E8=8E=B7=E5=8F=96=E6=B5=81?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vmp/media/zlm/ZLMHttpHookListener.java | 7 +- .../vmp/media/zlm/dto/StreamMediaInfo.java | 61 ++++++ .../vmp/media/zlm/dto/StreamMediaTrack.java | 200 ++++++++++++++++++ .../dto/hook/OnStreamChangedHookParam.java | 7 +- .../iot/vmp/service/IDeviceService.java | 6 + .../iot/vmp/service/IMediaServerService.java | 6 + .../impl/DeviceChannelServiceImpl.java | 12 +- .../vmp/service/impl/DeviceServiceImpl.java | 10 +- .../service/impl/MediaServerServiceImpl.java | 46 ++++ .../vmp/storager/dao/DeviceChannelMapper.java | 2 +- .../iot/vmp/storager/dao/DeviceMapper.java | 40 ++++ .../vmanager/gb28181/device/DeviceQuery.java | 18 +- .../vmp/vmanager/server/ServerController.java | 12 ++ web_src/src/components/dialog/rtcPlayer.vue | 1 - 14 files changed, 410 insertions(+), 18 deletions(-) create mode 100644 src/main/java/com/genersoft/iot/vmp/media/zlm/dto/StreamMediaInfo.java create mode 100644 src/main/java/com/genersoft/iot/vmp/media/zlm/dto/StreamMediaTrack.java diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java index 3d8bc58e..3ca25398 100755 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java @@ -17,10 +17,7 @@ import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder; import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander; import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommanderFroPlatform; -import com.genersoft.iot.vmp.media.zlm.dto.HookType; -import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; -import com.genersoft.iot.vmp.media.zlm.dto.StreamAuthorityInfo; -import com.genersoft.iot.vmp.media.zlm.dto.StreamProxy; +import com.genersoft.iot.vmp.media.zlm.dto.*; import com.genersoft.iot.vmp.media.zlm.dto.hook.*; import com.genersoft.iot.vmp.service.*; import com.genersoft.iot.vmp.service.bean.MessageForPushChannel; @@ -355,7 +352,7 @@ public class ZLMHttpHookListener { subscribe.response(mediaInfo, param); } - List tracks = param.getTracks(); + List tracks = param.getTracks(); // TODO 重构此处逻辑 boolean isPush = false; if (param.isRegist()) { diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/StreamMediaInfo.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/StreamMediaInfo.java new file mode 100644 index 00000000..6e289579 --- /dev/null +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/StreamMediaInfo.java @@ -0,0 +1,61 @@ +package com.genersoft.iot.vmp.media.zlm.dto; + +import java.util.List; + +public class StreamMediaInfo { + + private Boolean online; + private Integer readerCount; + private Integer totalReaderCount; + private Integer bytesSpeed; + private Integer aliveSecond; + private List tracks; + + public Boolean getOnline() { + return online; + } + + public void setOnline(Boolean online) { + this.online = online; + } + + public Integer getReaderCount() { + return readerCount; + } + + public void setReaderCount(Integer readerCount) { + this.readerCount = readerCount; + } + + public Integer getTotalReaderCount() { + return totalReaderCount; + } + + public void setTotalReaderCount(Integer totalReaderCount) { + this.totalReaderCount = totalReaderCount; + } + + public Integer getBytesSpeed() { + return bytesSpeed; + } + + public void setBytesSpeed(Integer bytesSpeed) { + this.bytesSpeed = bytesSpeed; + } + + public Integer getAliveSecond() { + return aliveSecond; + } + + public void setAliveSecond(Integer aliveSecond) { + this.aliveSecond = aliveSecond; + } + + public List getTracks() { + return tracks; + } + + public void setTracks(List tracks) { + this.tracks = tracks; + } +} diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/StreamMediaTrack.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/StreamMediaTrack.java new file mode 100644 index 00000000..8ff977c3 --- /dev/null +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/StreamMediaTrack.java @@ -0,0 +1,200 @@ +package com.genersoft.iot.vmp.media.zlm.dto; + +public class StreamMediaTrack { + + /** + * 音频通道数 + */ + private Integer channels; + + /** + * H264 = 0, H265 = 1, AAC = 2, G711A = 3, G711U = 4 + */ + private Integer codec_id; + + /** + * 编码类型名称 CodecAAC CodecH264 + */ + private String codec_id_name; + + /** + * Video = 0, Audio = 1 + */ + private Integer codec_type; + + /** + * 轨道是否准备就绪 + */ + private Boolean ready; + + /** + * 音频采样位数 + */ + private Integer sample_bit; + + /** + * 音频采样率 + */ + private Integer sample_rate; + + /** + * 视频fps + */ + private Float fps; + + /** + * 视频高 + */ + private Integer height; + + /** + * 视频宽 + */ + private Integer width; + + /** + * 帧数 + */ + private Integer frames; + + /** + * 关键帧数 + */ + private Integer key_frames; + + /** + * GOP大小 + */ + private Integer gop_size; + + /** + * GOP间隔时长(ms) + */ + private Integer gop_interval_ms; + + /** + * 丢帧率 + */ + private Float loss; + + + public Integer getChannels() { + return channels; + } + + public void setChannels(Integer channels) { + this.channels = channels; + } + + public Integer getCodec_id() { + return codec_id; + } + + public void setCodec_id(Integer 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 Integer getCodec_type() { + return codec_type; + } + + public void setCodec_type(Integer codec_type) { + this.codec_type = codec_type; + } + + public Boolean getReady() { + return ready; + } + + public void setReady(Boolean ready) { + this.ready = ready; + } + + public Integer getSample_bit() { + return sample_bit; + } + + public void setSample_bit(Integer sample_bit) { + this.sample_bit = sample_bit; + } + + public Integer getSample_rate() { + return sample_rate; + } + + public void setSample_rate(Integer sample_rate) { + this.sample_rate = sample_rate; + } + + public Float getFps() { + return fps; + } + + public void setFps(Float fps) { + this.fps = fps; + } + + public Integer getHeight() { + return height; + } + + public void setHeight(Integer height) { + this.height = height; + } + + public Integer getWidth() { + return width; + } + + public void setWidth(Integer width) { + this.width = width; + } + + public Integer getFrames() { + return frames; + } + + public void setFrames(Integer frames) { + this.frames = frames; + } + + public Integer getKey_frames() { + return key_frames; + } + + public void setKey_frames(Integer key_frames) { + this.key_frames = key_frames; + } + + public Integer getGop_size() { + return gop_size; + } + + public void setGop_size(Integer gop_size) { + this.gop_size = gop_size; + } + + public Integer getGop_interval_ms() { + return gop_interval_ms; + } + + public void setGop_interval_ms(Integer gop_interval_ms) { + this.gop_interval_ms = gop_interval_ms; + } + + public Float getLoss() { + return loss; + } + + public void setLoss(Float loss) { + this.loss = loss; + } +} diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/hook/OnStreamChangedHookParam.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/hook/OnStreamChangedHookParam.java index ffca0d5a..cd932a05 100755 --- a/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/hook/OnStreamChangedHookParam.java +++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/dto/hook/OnStreamChangedHookParam.java @@ -1,5 +1,6 @@ package com.genersoft.iot.vmp.media.zlm.dto.hook; +import com.genersoft.iot.vmp.media.zlm.dto.StreamMediaTrack; import com.genersoft.iot.vmp.vmanager.bean.StreamContent; import java.util.List; @@ -91,7 +92,7 @@ public class OnStreamChangedHookParam extends HookParam{ /** * 音视频轨道 */ - private List tracks; + private List tracks; /** * 音视频轨道 @@ -424,11 +425,11 @@ public class OnStreamChangedHookParam extends HookParam{ this.aliveSecond = aliveSecond; } - public List getTracks() { + public List getTracks() { return tracks; } - public void setTracks(List tracks) { + public void setTracks(List tracks) { this.tracks = tracks; } diff --git a/src/main/java/com/genersoft/iot/vmp/service/IDeviceService.java b/src/main/java/com/genersoft/iot/vmp/service/IDeviceService.java index e20c3bf2..f3bc2525 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/IDeviceService.java +++ b/src/main/java/com/genersoft/iot/vmp/service/IDeviceService.java @@ -6,6 +6,7 @@ import com.genersoft.iot.vmp.gb28181.bean.SipTransactionInfo; import com.genersoft.iot.vmp.gb28181.bean.SyncStatus; import com.genersoft.iot.vmp.vmanager.bean.BaseTree; import com.genersoft.iot.vmp.vmanager.bean.ResourceBaseInfo; +import com.github.pagehelper.PageInfo; import java.util.List; @@ -168,4 +169,9 @@ public interface IDeviceService { * 获取所有设备 */ List getAll(); + + /** + * 分页查询国标设备/下级平台列表 + */ + PageInfo getDeviceList(int page, int count, String searchStr, Boolean online); } diff --git a/src/main/java/com/genersoft/iot/vmp/service/IMediaServerService.java b/src/main/java/com/genersoft/iot/vmp/service/IMediaServerService.java index 8cfdd88f..dae115e8 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/IMediaServerService.java +++ b/src/main/java/com/genersoft/iot/vmp/service/IMediaServerService.java @@ -4,6 +4,7 @@ import com.genersoft.iot.vmp.common.CommonCallback; import com.genersoft.iot.vmp.media.zlm.ZLMServerConfig; import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; import com.genersoft.iot.vmp.media.zlm.dto.ServerKeepaliveData; +import com.genersoft.iot.vmp.media.zlm.dto.StreamMediaInfo; import com.genersoft.iot.vmp.service.bean.MediaServerLoad; import com.genersoft.iot.vmp.service.bean.SSRCInfo; import com.genersoft.iot.vmp.vmanager.bean.RecordFile; @@ -104,4 +105,9 @@ public interface IMediaServerService { * 查找存在录像文件的时间 */ List getRecordDates(String app, String stream, int year, int month, List mediaServerItems); + + /** + * 获取媒体流的信息 + */ + StreamMediaInfo getMediaInfo(String mediaServerId, String app, String stream); } diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceChannelServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceChannelServiceImpl.java index 5e8d2880..35e52f97 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceChannelServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceChannelServiceImpl.java @@ -509,7 +509,7 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService { } // 对于只发送了行政区划编号,没有发送行政区划的情况进行兼容,自动为通道创建一个行政区划。 for (String civilCode : civilCodeSet) { - if (!regionMap.containsKey(civilCode)) { + if (civilCode != null && !regionMap.containsKey(civilCode)) { logger.warn("[通道信息中缺少地区信息]补充地区信息 civilCode: {}", civilCode ); if (civilCode.length() == 8) { Region parentRegion = civilCodeFileConf.createRegion(civilCode.substring(0, 6)); @@ -586,10 +586,12 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService { addCommonChannelList.stream().forEach(commonGbChannel ->{ commonChannelDeviceAndIdMap.put(commonGbChannel.getCommonGbDeviceID(), commonGbChannel.getCommonGbId()); }); - addChannelList.stream().forEach(channel ->{ - channel.setCommonGbChannelId(commonChannelDeviceAndIdMap.get(channel.getChannelId())); - }); - addChannelHandler(addChannelList); + if (!addChannelList.isEmpty()) { + addChannelList.stream().forEach(channel ->{ + channel.setCommonGbChannelId(commonChannelDeviceAndIdMap.get(channel.getChannelId())); + }); + addChannelHandler(addChannelList); + } } if (!updateChannelList.isEmpty()) { commonGbChannelService.batchUpdate(updateCommonChannelList); diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java index 0a831dfa..71913406 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/DeviceServiceImpl.java @@ -13,12 +13,15 @@ import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommander; import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander; import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.response.cmd.CatalogResponseMessageHandler; import com.genersoft.iot.vmp.service.*; +import com.genersoft.iot.vmp.service.bean.Group; import com.genersoft.iot.vmp.storager.IRedisCatchStorage; import com.genersoft.iot.vmp.storager.dao.DeviceChannelMapper; import com.genersoft.iot.vmp.storager.dao.DeviceMapper; import com.genersoft.iot.vmp.utils.DateUtil; import com.genersoft.iot.vmp.vmanager.bean.BaseTree; import com.genersoft.iot.vmp.vmanager.bean.ResourceBaseInfo; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -594,5 +597,10 @@ public class DeviceServiceImpl implements IDeviceService { return deviceMapper.getAll(); } - + @Override + public PageInfo getDeviceList(int page, int count, String searchStr, Boolean online) { + PageHelper.startPage(page, count); + List deviceList = deviceMapper.getDeviceList(searchStr, online); + return new PageInfo<>(deviceList); + } } diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java index c9c9d8c0..d7202b3e 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java @@ -14,6 +14,8 @@ import com.genersoft.iot.vmp.gb28181.session.SSRCFactory; import com.genersoft.iot.vmp.media.zlm.*; import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; import com.genersoft.iot.vmp.media.zlm.dto.ServerKeepaliveData; +import com.genersoft.iot.vmp.media.zlm.dto.StreamMediaInfo; +import com.genersoft.iot.vmp.media.zlm.dto.StreamMediaTrack; import com.genersoft.iot.vmp.service.IInviteStreamService; import com.genersoft.iot.vmp.service.IMediaServerService; import com.genersoft.iot.vmp.service.bean.MediaServerLoad; @@ -848,4 +850,48 @@ public class MediaServerServiceImpl implements IMediaServerService { } return CompletableFuture.completedFuture(new ArrayList<>()); } + + @Override + public StreamMediaInfo getMediaInfo(String mediaServerId, String app, String stream) { + MediaServerItem mediaServerItem = getOne(mediaServerId); + if (mediaServerItem == null) { + throw new ControllerException(ErrorCode.ERROR100.getCode(), "未找到流媒体节点"); + } + JSONObject mediaInfoJson = zlmresTfulUtils.getMediaInfo(mediaServerItem, app, "rtsp", stream); + if (mediaInfoJson == null || mediaInfoJson.getInteger("code") != 0) { + throw new ControllerException(ErrorCode.ERROR100.getCode(), mediaInfoJson == null?"获取信息失败":mediaInfoJson.getString("msg")); + } + StreamMediaInfo streamMediaInfo = new StreamMediaInfo(); + streamMediaInfo.setOnline(mediaInfoJson.getBoolean("online")); + streamMediaInfo.setTotalReaderCount(mediaInfoJson.getInteger("totalReaderCount")); + streamMediaInfo.setAliveSecond(mediaInfoJson.getInteger("aliveSecond")); + streamMediaInfo.setBytesSpeed(mediaInfoJson.getInteger("bytesSpeed")); + + JSONArray tracks = mediaInfoJson.getJSONArray("tracks"); + if (!tracks.isEmpty()) { + for (int i = 0; i < tracks.size(); i++) { + JSONObject tracksJson = tracks.getJSONObject(i); + StreamMediaTrack streamMediaTrack = new StreamMediaTrack(); + streamMediaTrack.setChannels(tracksJson.getInteger("channels")); + streamMediaTrack.setCodec_id(tracksJson.getInteger("codec_id")); + streamMediaTrack.setCodec_id_name(tracksJson.getString("codec_id_name")); + streamMediaTrack.setCodec_type(tracksJson.getInteger("codec_type")); + streamMediaTrack.setReady(tracksJson.getBoolean("ready")); + streamMediaTrack.setSample_bit(tracksJson.getInteger("sample_bit")); + streamMediaTrack.setSample_rate(tracksJson.getInteger("sample_rate")); + streamMediaTrack.setFps(tracksJson.getFloat("fps")); + streamMediaTrack.setHeight(tracksJson.getInteger("height")); + streamMediaTrack.setWidth(tracksJson.getInteger("width")); + streamMediaTrack.setLoss(tracksJson.getFloat("loss")); + streamMediaTrack.setKey_frames(tracksJson.getInteger("key_frames")); + streamMediaTrack.setGop_size(tracksJson.getInteger("gop_size")); + streamMediaTrack.setGop_interval_ms(tracksJson.getInteger("gop_interval_ms")); + if (streamMediaInfo.getTracks() == null) { + streamMediaInfo.setTracks(new ArrayList<>()); + } + streamMediaInfo.getTracks().add(streamMediaTrack); + } + } + return streamMediaInfo; + } } diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java index 78004776..c4ac0e11 100755 --- a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java @@ -164,7 +164,7 @@ public interface DeviceChannelMapper { " ip_address,port,password,ptz_type,status,stream_id,longitude,latitude,longitude_gcj02,latitude_gcj02,"+ " longitude_wgs84,latitude_wgs84,has_audio,create_time,update_time,business_group_id,gps_time," + " common_gb_channel_id)"+ - "values " + + " values " + " " + "(#{item.channelId}, #{item.deviceId}, #{item.name}, #{item.manufacture}, #{item.model}, " + "#{item.owner}, #{item.civilCode}, #{item.block},#{item.subCount}," + diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java index 30ffd2bb..6f38e697 100755 --- a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMapper.java @@ -291,4 +291,44 @@ public interface DeviceMapper { @Select("select * FROM wvp_device where as_message_channel = true") List queryDeviceWithAsMessageChannel(); + + @Select(" ") + List getDeviceList(@Param("query") String query, @Param("online") Boolean online); } diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java index 0757585e..565e7742 100755 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java @@ -105,11 +105,25 @@ public class DeviceQuery { @GetMapping("/devices") @Options() public PageInfo devices(int page, int count){ -// if (page == null) page = 0; -// if (count == null) count = 20; return storager.queryVideoDeviceList(page, count,null); } + + /** + * 分页查询国标设备 + * @param page 当前页 + * @param count 每页查询数量 + * @return 分页国标列表 + */ + @Operation(summary = "分页查询国标设备") + @Parameter(name = "page", description = "当前页", required = true) + @Parameter(name = "count", description = "每页查询数量", required = true) + @GetMapping("/device/list") + @Options() + public PageInfo getDeviceList(int page, int count, String query, Boolean online){ + return deviceService.getDeviceList(page, count, query, online); + } + /** * 分页查询通道数 * diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/server/ServerController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/server/ServerController.java index 72641be4..dba459ce 100755 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/server/ServerController.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/server/ServerController.java @@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.vmanager.server; import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSONObject; +import com.genersoft.iot.vmp.common.StreamInfo; import com.genersoft.iot.vmp.common.SystemAllInfo; import com.genersoft.iot.vmp.common.VersionPo; import com.genersoft.iot.vmp.conf.SipConfig; @@ -12,6 +13,7 @@ import com.genersoft.iot.vmp.media.zlm.SendRtpPortManager; import com.genersoft.iot.vmp.media.zlm.ZlmHttpHookSubscribe; import com.genersoft.iot.vmp.media.zlm.dto.IHookSubscribe; import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; +import com.genersoft.iot.vmp.media.zlm.dto.StreamMediaInfo; import com.genersoft.iot.vmp.service.*; import com.genersoft.iot.vmp.service.bean.MediaServerLoad; import com.genersoft.iot.vmp.storager.IRedisCatchStorage; @@ -266,4 +268,14 @@ public class ServerController { return result; } + + @GetMapping(value = "/media_server/getMediaInfo") + @ResponseBody + @Operation(summary = "获取流信息") + public StreamMediaInfo getMediaInfo(@RequestParam(required = false) String mediaServerId, String app, String stream) { + if (ObjectUtils.isEmpty(mediaServerId)) { + mediaServerId = mediaServerService.getDefaultMediaServer().getId(); + } + return mediaServerService.getMediaInfo(mediaServerId, app, stream); + } } diff --git a/web_src/src/components/dialog/rtcPlayer.vue b/web_src/src/components/dialog/rtcPlayer.vue index f957df71..83e57b9e 100755 --- a/web_src/src/components/dialog/rtcPlayer.vue +++ b/web_src/src/components/dialog/rtcPlayer.vue @@ -80,7 +80,6 @@ export default { webrtcPlayer.close(); webrtcPlayer = null; } - }, eventcallbacK: function(type, message) { console.log("player 事件回调")