| | |
| | | } |
| | | } |
| | | |
| | | // logger.info("[æ¶å°ç§»å¨ä½ç½®è®¢é
éç¥]ï¼{}/{}->{}.{}, æ¶é´ï¼ {}", mobilePosition.getDeviceId(), mobilePosition.getChannelId(), |
| | | // mobilePosition.getLongitude(), mobilePosition.getLatitude(), System.currentTimeMillis() - startTime); |
| | | logger.debug("[æ¶å°ç§»å¨ä½ç½®è®¢é
éç¥]ï¼{}/{}->{}.{}, æ¶é´ï¼ {}", mobilePosition.getDeviceId(), mobilePosition.getChannelId(), |
| | | mobilePosition.getLongitude(), mobilePosition.getLatitude(), System.currentTimeMillis() - startTime); |
| | | mobilePosition.setReportSource("Mobile Position"); |
| | | |
| | | mobilePositionService.add(mobilePosition); |
| | |
| | | @JSONField(name = "shell.shell") |
| | | private String shellPhell; |
| | | |
| | | @JSONField(name = "transcode.suffix") |
| | | private String transcodeSuffix; |
| | | |
| | | |
| | | public String getHookIp() { |
| | | return hookIp; |
| | |
| | | public void setHookOnRtpServerTimeout(String hookOnRtpServerTimeout) { |
| | | this.hookOnRtpServerTimeout = hookOnRtpServerTimeout; |
| | | } |
| | | |
| | | public String getTranscodeSuffix() { |
| | | return transcodeSuffix; |
| | | } |
| | | |
| | | public void setTranscodeSuffix(String transcodeSuffix) { |
| | | this.transcodeSuffix = transcodeSuffix; |
| | | } |
| | | } |
| | |
| | | @Schema(description = "å½ååå¨è·¯å¾") |
| | | private String recordPath; |
| | | |
| | | @Schema(description = "转ç çåç¼") |
| | | private String transcodeSuffix; |
| | | |
| | | public MediaServerItem() { |
| | | } |
| | | |
| | |
| | | rtpEnable = false; // é»è®¤ä½¿ç¨å端å£;ç´å°ç¨æ·èªå·±è®¾ç½®å¼å¯å¤ç«¯å£ |
| | | rtpPortRange = zlmServerConfig.getPortRange().replace("_",","); // é»è®¤ä½¿ç¨30000,30500ä½ä¸ºçº§èæ¶åéæµç端å£å· |
| | | recordAssistPort = 0; // é»è®¤å
³é |
| | | transcodeSuffix = zlmServerConfig.getTranscodeSuffix(); |
| | | |
| | | } |
| | | |
| | |
| | | public void setRecordPath(String recordPath) { |
| | | this.recordPath = recordPath; |
| | | } |
| | | |
| | | public String getTranscodeSuffix() { |
| | | return transcodeSuffix; |
| | | } |
| | | |
| | | public void setTranscodeSuffix(String transcodeSuffix) { |
| | | this.transcodeSuffix = transcodeSuffix; |
| | | } |
| | | } |
| | |
| | | if (serverItem.getRtpProxyPort() == 0) { |
| | | serverItem.setRtpProxyPort(zlmServerConfig.getRtpProxyPort()); |
| | | } |
| | | serverItem.setTranscodeSuffix(zlmServerConfig.getTranscodeSuffix()); |
| | | serverItem.setStatus(true); |
| | | |
| | | if (ObjectUtils.isEmpty(serverItem.getId())) { |
| | |
| | | } |
| | | redisTemplate.opsForValue().set(key, serverItem); |
| | | resetOnlineServerItem(serverItem); |
| | | |
| | | |
| | | if (serverItem.isAutoConfig()) { |
| | | setZLMConfig(serverItem, "0".equals(zlmServerConfig.getHookEnable())); |
| | |
| | | package com.genersoft.iot.vmp.service.impl; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.genersoft.iot.vmp.common.StreamInfo; |
| | |
| | | if (addr == null) { |
| | | addr = mediaInfo.getStreamIp(); |
| | | } |
| | | if (!"broadcast".equalsIgnoreCase(app) && !ObjectUtils.isEmpty(mediaInfo.getTranscodeSuffix()) && !"null".equalsIgnoreCase(mediaInfo.getTranscodeSuffix())) { |
| | | stream = stream + "_" + mediaInfo.getTranscodeSuffix(); |
| | | streamInfoResult.setStream(stream); |
| | | } |
| | | |
| | | streamInfoResult.setIp(addr); |
| | | streamInfoResult.setMediaServerId(mediaInfo.getId()); |
| | |
| | | "default_server,"+ |
| | | "create_time,"+ |
| | | "update_time,"+ |
| | | "transcode_suffix,"+ |
| | | "hook_alive_interval"+ |
| | | ") VALUES " + |
| | | "(" + |
| | |
| | | "#{defaultServer}, " + |
| | | "#{createTime}, " + |
| | | "#{updateTime}, " + |
| | | "#{transcodeSuffix}, " + |
| | | "#{hookAliveInterval})") |
| | | int add(MediaServerItem mediaServerItem); |
| | | |
| | |
| | | "<if test=\"hookAliveInterval != null\">, hook_alive_interval=#{hookAliveInterval}</if>" + |
| | | "<if test=\"recordDay != null\">, record_day=#{recordDay}</if>" + |
| | | "<if test=\"recordPath != null\">, record_path=#{recordPath}</if>" + |
| | | "<if test=\"transcodeSuffix != null\">, transcode_suffix=#{transcodeSuffix}</if>" + |
| | | "WHERE id=#{id}"+ |
| | | " </script>"}) |
| | | int update(MediaServerItem mediaServerItem); |
| | |
| | | "<if test=\"recordAssistPort != null\">, record_assist_port=#{recordAssistPort}</if>" + |
| | | "<if test=\"recordDay != null\">, record_day=#{recordDay}</if>" + |
| | | "<if test=\"recordPath != null\">, record_path=#{recordPath}</if>" + |
| | | "<if test=\"transcodeSuffix != null\">, transcode_suffix=#{transcodeSuffix}</if>" + |
| | | "<if test=\"hookAliveInterval != null\">, hook_alive_interval=#{hookAliveInterval}</if>" + |
| | | "WHERE ip=#{ip} and http_port=#{httpPort}"+ |
| | | " </script>"}) |
| | |
| | | @Override |
| | | public void sendMobilePositionMsg(JSONObject jsonObject) { |
| | | String key = VideoManagerConstants.VM_MSG_SUBSCRIBE_MOBILE_POSITION; |
| | | logger.info("[redisåééç¥] åé ç§»å¨ä½ç½® {}: {}", key, jsonObject.toString()); |
| | | logger.debug("[redisåééç¥] åé ç§»å¨ä½ç½® {}: {}", key, jsonObject.toString()); |
| | | redisTemplate.convertAndSend(key, jsonObject); |
| | | } |
| | | |
New file |
| | |
| | | alter table wvp_media_server |
| | | add transcode_suffix character varying(255); |
New file |
| | |
| | | alter table wvp_media_server |
| | | add transcode_suffix character varying(255); |