648540858
2024-05-17 49101a37e0f71f22fee25b811a54895f2f6f3e82
兼容zlm-pro转码
7个文件已修改
2个文件已添加
44 ■■■■ 已修改文件
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestForMobilePositionProcessor.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerConfig.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/genersoft/iot/vmp/media/zlm/dto/MediaServerItem.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/genersoft/iot/vmp/service/impl/MediaServiceImpl.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/genersoft/iot/vmp/storager/dao/MediaServerMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/genersoft/iot/vmp/storager/impl/RedisCatchStorageImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
数据库/2.7.1/更新-mysql-2.7.1.sql 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
数据库/2.7.1/更新-postgresql-kingbase-2.7.1.sql 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestForMobilePositionProcessor.java
@@ -143,8 +143,8 @@
                    }
                }
//            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);
src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMServerConfig.java
@@ -331,6 +331,9 @@
    @JSONField(name = "shell.shell")
    private String shellPhell;
    @JSONField(name = "transcode.suffix")
    private String transcodeSuffix;
    public String getHookIp() {
        return hookIp;
@@ -1211,4 +1214,12 @@
    public void setHookOnRtpServerTimeout(String hookOnRtpServerTimeout) {
        this.hookOnRtpServerTimeout = hookOnRtpServerTimeout;
    }
    public String getTranscodeSuffix() {
        return transcodeSuffix;
    }
    public void setTranscodeSuffix(String transcodeSuffix) {
        this.transcodeSuffix = transcodeSuffix;
    }
}
src/main/java/com/genersoft/iot/vmp/media/zlm/dto/MediaServerItem.java
@@ -86,6 +86,9 @@
    @Schema(description = "录像存储路径")
    private String recordPath;
    @Schema(description = "转码的前缀")
    private String transcodeSuffix;
    public MediaServerItem() {
    }
@@ -108,6 +111,7 @@
        rtpEnable = false; // é»˜è®¤ä½¿ç”¨å•端口;直到用户自己设置开启多端口
        rtpPortRange = zlmServerConfig.getPortRange().replace("_",","); // é»˜è®¤ä½¿ç”¨30000,30500作为级联时发送流的端口号
        recordAssistPort = 0; // é»˜è®¤å…³é—­
        transcodeSuffix = zlmServerConfig.getTranscodeSuffix();
    }
@@ -318,4 +322,12 @@
    public void setRecordPath(String recordPath) {
        this.recordPath = recordPath;
    }
    public String getTranscodeSuffix() {
        return transcodeSuffix;
    }
    public void setTranscodeSuffix(String transcodeSuffix) {
        this.transcodeSuffix = transcodeSuffix;
    }
}
src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java
@@ -410,6 +410,7 @@
        if (serverItem.getRtpProxyPort() == 0) {
            serverItem.setRtpProxyPort(zlmServerConfig.getRtpProxyPort());
        }
        serverItem.setTranscodeSuffix(zlmServerConfig.getTranscodeSuffix());
        serverItem.setStatus(true);
        if (ObjectUtils.isEmpty(serverItem.getId())) {
@@ -423,7 +424,6 @@
        }
        redisTemplate.opsForValue().set(key, serverItem);
        resetOnlineServerItem(serverItem);
        if (serverItem.isAutoConfig()) {
            setZLMConfig(serverItem, "0".equals(zlmServerConfig.getHookEnable()));
src/main/java/com/genersoft/iot/vmp/service/impl/MediaServiceImpl.java
@@ -1,6 +1,5 @@
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;
@@ -91,6 +90,10 @@
        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());
src/main/java/com/genersoft/iot/vmp/storager/dao/MediaServerMapper.java
@@ -36,6 +36,7 @@
            "default_server,"+
            "create_time,"+
            "update_time,"+
            "transcode_suffix,"+
            "hook_alive_interval"+
            ") VALUES " +
            "(" +
@@ -62,6 +63,7 @@
            "#{defaultServer}, " +
            "#{createTime}, " +
            "#{updateTime}, " +
            "#{transcodeSuffix}, " +
            "#{hookAliveInterval})")
    int add(MediaServerItem mediaServerItem);
@@ -88,6 +90,7 @@
            "<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);
@@ -113,6 +116,7 @@
            "<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>"})
src/main/java/com/genersoft/iot/vmp/storager/impl/RedisCatchStorageImpl.java
@@ -570,7 +570,7 @@
    @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);
    }
Êý¾Ý¿â/2.7.1/¸üÐÂ-mysql-2.7.1.sql
New file
@@ -0,0 +1,2 @@
alter table wvp_media_server
    add transcode_suffix character varying(255);
Êý¾Ý¿â/2.7.1/¸üÐÂ-postgresql-kingbase-2.7.1.sql
New file
@@ -0,0 +1,2 @@
alter table wvp_media_server
    add transcode_suffix character varying(255);