From be7082f5e21aaab0ef541d9a78ced7eaebcfb1f7 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期四, 25 十一月 2021 15:33:25 +0800 Subject: [PATCH] 优化多线程参数 --- src/main/java/com/genersoft/iot/vmp/storager/IRedisCatchStorage.java | 70 ++++++++++++++++++++++++----------- 1 files changed, 48 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/storager/IRedisCatchStorage.java b/src/main/java/com/genersoft/iot/vmp/storager/IRedisCatchStorage.java index ca4ebae..25743e1 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/IRedisCatchStorage.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/IRedisCatchStorage.java @@ -1,12 +1,11 @@ package com.genersoft.iot.vmp.storager; import com.alibaba.fastjson.JSONObject; -import com.genersoft.iot.vmp.common.RealVideo; import com.genersoft.iot.vmp.common.StreamInfo; -import com.genersoft.iot.vmp.conf.MediaServerConfig; import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; import com.genersoft.iot.vmp.gb28181.bean.ParentPlatformCatch; import com.genersoft.iot.vmp.gb28181.bean.SendRtpItem; +import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; import java.util.List; import java.util.Map; @@ -39,20 +38,7 @@ StreamInfo queryPlaybackByStreamId(String steamId); - StreamInfo queryPlayByDevice(String deviceId, String code); - - /** - * 鏇存柊娴佸獟浣撲俊鎭� - * @param mediaServerConfig - * @return - */ - boolean updateMediaInfo(MediaServerConfig mediaServerConfig); - - /** - * 鑾峰彇娴佸獟浣撲俊鎭� - * @return - */ - MediaServerConfig getMediaInfo(); + StreamInfo queryPlayByDevice(String deviceId, String channelId); Map<String, StreamInfo> queryPlayByDeviceId(String deviceId); @@ -94,6 +80,8 @@ */ SendRtpItem querySendRTPServer(String platformGbId, String channelId); + List<SendRtpItem> querySendRTPServer(String platformGbId); + /** * 鍒犻櫎RTP鎺ㄩ�佷俊鎭紦瀛� * @param platformGbId @@ -108,14 +96,52 @@ boolean isChannelSendingRTP(String channelId); /** - * 鏇存柊濯掍綋娴佸垪琛� - * @param mediaList + * 娓呯┖鏌愪釜璁惧鐨勬墍鏈夌紦瀛� + * @param deviceId 璁惧ID */ - void updateMediaList(List<RealVideo> mediaList); + void clearCatchByDeviceId(String deviceId); /** - * 鑾峰彇褰撳墠濯掍綋娴佸垪琛� - * @return List<RealVideo> + * 鑾峰彇mediaServer鑺傜偣 + * @param mediaServerId + * @return */ - JSONObject getMediaList(int start, int end); +// MediaServerItem getMediaInfo(String mediaServerId); + + /** + * 璁剧疆鎵�鏈夎澶囩绾� + */ + void outlineForAll(); + + /** + * 鑾峰彇鎵�鏈夊湪绾跨殑 + */ + List<String> getOnlineForAll(); + + /** + * 鍦╮edis娣诲姞wvp鐨勪俊鎭� + */ + void updateWVPInfo(String id, JSONObject jsonObject, int time); + + /** + * 鍙戦�佹帹娴佺敓鎴愪笌鎺ㄦ祦娑堝け娑堟伅 + * @param jsonObject 娑堟伅鍐呭 + */ + void sendStreamChangeMsg(JSONObject jsonObject); + + /** + * 娣诲姞娴佷俊鎭埌redis + * @param mediaServerItem + * @param app + * @param streamId + */ + void addPushStream(MediaServerItem mediaServerItem, String app, String streamId, StreamInfo streamInfo); + + /** + * 绉婚櫎娴佷俊鎭粠redis + * @param mediaServerItem + * @param app + * @param streamId + */ + void removePushStream(MediaServerItem mediaServerItem, String app, String streamId); } -- Gitblit v1.8.0