old mode 100644
new mode 100755
| | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.genersoft.iot.vmp.conf.UserSetting; |
| | | |
| | | import com.genersoft.iot.vmp.media.zlm.ZLMMediaListManager; |
| | | import com.genersoft.iot.vmp.media.zlm.dto.ChannelOnlineEvent; |
| | | import com.genersoft.iot.vmp.media.zlm.dto.hook.OnStreamChangedHookParam; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.text.ParseException; |
| | | import java.util.concurrent.ConcurrentLinkedQueue; |
| | | |
| | | |
| | |
| | | onStreamChangedHookParam.setOriginType(0); |
| | | onStreamChangedHookParam.setOriginTypeStr("0"); |
| | | onStreamChangedHookParam.setOriginTypeStr("unknown"); |
| | | if (register) { |
| | | zlmMediaListManager.addPush(onStreamChangedHookParam); |
| | | }else { |
| | | zlmMediaListManager.removeMedia(app, stream); |
| | | ChannelOnlineEvent channelOnlineEventLister = zlmMediaListManager.getChannelOnlineEventLister(app, stream); |
| | | if ( channelOnlineEventLister != null) { |
| | | try { |
| | | channelOnlineEventLister.run(app, stream, serverId);; |
| | | } catch (ParseException e) { |
| | | logger.error("addPush: ", e); |
| | | } |
| | | zlmMediaListManager.removedChannelOnlineEventLister(app, stream); |
| | | } |
| | | }catch (Exception e) { |
| | | logger.warn("[REDIS的ALARM通知] 发现未处理的异常, {}",e.getMessage()); |
| | | logger.warn("[REDIS消息-流变化] 发现未处理的异常, \r\n{}", JSON.toJSONString(message)); |
| | | logger.error("[REDIS消息-流变化] 异常内容: ", e); |
| | | } |
| | | } |
| | | }); |