forked from ard/ruoyi-api

aijinhui
2023-10-24 8a87e4226aa802d6a0e3566c66824fedf68e77da
Merge remote-tracking branch 'origin/master'
2 files added
41 files modified
8 files deleted
1 files copied
158 files renamed
729 ■■■■■ changed files
ard-work/pom.xml 17 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/alarm/config/AsyncConfiguration.java 22 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/cmd/startup.java 16 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/camera/controller/ArdCamerasController.java 3 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/camera/controller/CameraSdkController.java 12 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/camera/service/ICameraSdkService.java 4 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/camera/service/impl/ArdCamerasServiceImpl.java 21 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/camera/service/impl/AsyncLogin.java 39 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/camera/service/impl/CameraSdkServiceImpl.java 68 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/LibraryLoad.java 15 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/NetSDKLib.java 7 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/Utils.java 4 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/structure/CFG_MOTION_INFO.java 2 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/structure/NET_ALARM_DEVICE_MODIFIED_INFO.java 4 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/structure/NET_CFG_ACCESSCTL_SPECIALDAY_GROUP_INFO.java 2 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/structure/NET_IN_PERSON_INFO_INPUT_RESULT.java 2 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/structure/NET_IN_START_REDIRECT_SERVICE.java 2 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/structure/UNPACKING_CHECK_INFO.java 2 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/structure/customize/CANDIDATE_INFO_CEX.java 2 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/structure/customize/DEV_EVENT_CROSSLINE_INFO.java 2 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/structure/customize/DEV_EVENT_CROSSREGION_INFO.java 2 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/structure/customize/EVENT_INTELLI_COMM_INFO.java 2 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/structure/customize/MEDIAFILE_FACERECOGNITION_INFO.java 2 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/dhsdk/module/CapturePictureModule.java 10 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/dhsdk/module/ConfigModule.java 19 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/dhsdk/module/LoginModule.java 16 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/dhsdk/module/RealPlayModule.java 16 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/dhsdk/service/IDhClientService.java 6 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/dhsdk/service/impl/DhClientServiceImpl.java 85 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/hiksdk/common/GlobalVariable.java 3 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/hiksdk/sdk/ExceptionCallBack.java 44 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/hiksdk/sdk/HCNetSDK.java 4 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/hiksdk/service/IHikClientService.java 7 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/device/hiksdk/service/impl/HikClientServiceImpl.java 117 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/inspect/service/impl/ArdVideoInspectTaskServiceImpl.java 1 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/media/service/impl/MediaServiceImpl.java 26 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/media/service/impl/VtduServiceImpl.java 4 ●●●●● patch | view | raw | blame | history
ard-work/src/main/java/com/ruoyi/utils/forest/MediaClient.java 2 ●●●●● patch | view | raw | blame | history
ard-work/src/main/resources/dynamic-lib-load.xml 35 ●●●●● patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/AudioRender.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/GdiPlus.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/HCCore.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/HCNetSDK.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/HCNetSDKCom/AnalyzeData.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/HCNetSDKCom/AudioIntercom.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/HCNetSDKCom/AudioRender.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/HCNetSDKCom/HCAlarm.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/HCNetSDKCom/HCAlarm.lib patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/HCNetSDKCom/HCCoreDevCfg.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/HCNetSDKCom/HCDisplay.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/HCNetSDKCom/HCGeneralCfgMgr.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/HCNetSDKCom/HCGeneralCfgMgr.lib patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/HCNetSDKCom/HCIndustry.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/HCNetSDKCom/HCPlayBack.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/HCNetSDKCom/HCPreview.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/HCNetSDKCom/HCPreview.lib patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/HCNetSDKCom/HCVoiceTalk.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/HCNetSDKCom/OpenAL32.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/HCNetSDKCom/StreamTransClient.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/HCNetSDKCom/SystemTransform.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/HCNetSDKCom/libiconv2.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/HXVA.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/HmMerge.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/ImageAlg.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/Infra.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/IvsDrawer.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/MP_Render.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/NPQos.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/OpenAL32.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/PlayCtrl.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/RenderEngine.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/StreamConvertor.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/SuperRender.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/YUVProcess.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/avnetsdk.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/dhconfigsdk.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/dhnetsdk.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/dhplay.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/hlog.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/hpr.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/libcrypto-1_1-x64.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/libmmd.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/libssl-1_1-x64.dll patch | view | raw | blame | history
ard-work/src/main/resources/lib/win64/zlib1.dll patch | view | raw | blame | history
lib/hikDll/ClientDemoDll/ReadMe.txt 1 ●●●●● patch | view | raw | blame | history
lib/hikDll/ClientDemoDll/calib.dll patch | view | raw | blame | history
lib/hikDll/ClientDemoDll/iconv.dll patch | view | raw | blame | history
lib/hikDll/ClientDemoDll/libcrypto-1_1-x64.dll patch | view | raw | blame | history
lib/hikDll/ClientDemoDll/libssl-1_1-x64.dll patch | view | raw | blame | history
lib/hikDll/ClientDemoDll/libxml2.dll patch | view | raw | blame | history
lib/hikDll/ClientDemoDll/zlib1.dll patch | view | raw | blame | history
lib/hikDll/OpenAL32.dll patch | view | raw | blame | history
pom.xml patch | view | raw | blame | history
ruoyi-admin/pom.xml 48 ●●●●● patch | view | raw | blame | history
ruoyi-admin/src/main/resources/application-dev.yml 2 ●●●●● patch | view | raw | blame | history
ruoyi-admin/src/main/resources/logback.xml 19 ●●●●● patch | view | raw | blame | history
server/mediamtx/LICENSE patch | view | raw | blame | history
server/mediamtx/ffmpeg.exe patch | view | raw | blame | history
server/mediamtx/mediamtx.exe patch | view | raw | blame | history
server/mediamtx/mediamtx.yml 12 ●●●●● patch | view | raw | blame | history
server/minio/minio.exe patch | view | raw | blame | history
server/redis/EventLog.dll patch | view | raw | blame | history
server/redis/Redis on Windows Release Notes.docx patch | view | raw | blame | history
server/redis/Redis on Windows.docx patch | view | raw | blame | history
server/redis/Windows Service Documentation.docx patch | view | raw | blame | history
server/redis/dump.rdb patch | view | raw | blame | history
server/redis/redis-benchmark.exe patch | view | raw | blame | history
server/redis/redis-benchmark.pdb patch | view | raw | blame | history
server/redis/redis-check-aof.exe patch | view | raw | blame | history
server/redis/redis-check-aof.pdb patch | view | raw | blame | history
server/redis/redis-cli.exe patch | view | raw | blame | history
server/redis/redis-cli.pdb patch | view | raw | blame | history
server/redis/redis-desktop-manager-0.9.3.817.exe patch | view | raw | blame | history
server/redis/redis-server.exe patch | view | raw | blame | history
server/redis/redis-server.pdb patch | view | raw | blame | history
server/redis/redis.windows-service.conf patch | view | raw | blame | history
server/redis/redis.windows.conf patch | view | raw | blame | history
server/webrtc/Procfile patch | view | raw | blame | history
server/webrtc/config.json patch | view | raw | blame | history
server/webrtc/html/Bunny.html patch | view | raw | blame | history
server/webrtc/html/LICENSE patch | view | raw | blame | history
server/webrtc/html/README.md patch | view | raw | blame | history
server/webrtc/html/admin.html patch | view | raw | blame | history
server/webrtc/html/apprtc.html patch | view | raw | blame | history
server/webrtc/html/apprtc.json patch | view | raw | blame | history
server/webrtc/html/help.html patch | view | raw | blame | history
server/webrtc/html/htmlmapmarker.js patch | view | raw | blame | history
server/webrtc/html/index.html patch | view | raw | blame | history
server/webrtc/html/info.png patch | view | raw | blame | history
server/webrtc/html/janusconfig.js patch | view | raw | blame | history
server/webrtc/html/janustest.html patch | view | raw | blame | history
server/webrtc/html/janusvideoroom-element.js patch | view | raw | blame | history
server/webrtc/html/janusvideoroom.html patch | view | raw | blame | history
server/webrtc/html/janusvideoroom.js patch | view | raw | blame | history
server/webrtc/html/jitsi.ico patch | view | raw | blame | history
server/webrtc/html/jitsiroom.html patch | view | raw | blame | history
server/webrtc/html/jitsitest.html patch | view | raw | blame | history
server/webrtc/html/jsdoc/JanusVideoRoom.html patch | view | raw | blame | history
server/webrtc/html/jsdoc/WebRtcStreamer.html patch | view | raw | blame | history
server/webrtc/html/jsdoc/XMPPVideoRoom.html patch | view | raw | blame | history
server/webrtc/html/jsdoc/fonts/OpenSans-Bold-webfont.eot patch | view | raw | blame | history
server/webrtc/html/jsdoc/fonts/OpenSans-Bold-webfont.svg patch | view | raw | blame | history
server/webrtc/html/jsdoc/fonts/OpenSans-Bold-webfont.woff patch | view | raw | blame | history
server/webrtc/html/jsdoc/fonts/OpenSans-BoldItalic-webfont.eot patch | view | raw | blame | history
server/webrtc/html/jsdoc/fonts/OpenSans-BoldItalic-webfont.svg patch | view | raw | blame | history
server/webrtc/html/jsdoc/fonts/OpenSans-BoldItalic-webfont.woff patch | view | raw | blame | history
server/webrtc/html/jsdoc/fonts/OpenSans-Italic-webfont.eot patch | view | raw | blame | history
server/webrtc/html/jsdoc/fonts/OpenSans-Italic-webfont.svg patch | view | raw | blame | history
server/webrtc/html/jsdoc/fonts/OpenSans-Italic-webfont.woff patch | view | raw | blame | history
server/webrtc/html/jsdoc/fonts/OpenSans-Light-webfont.eot patch | view | raw | blame | history
server/webrtc/html/jsdoc/fonts/OpenSans-Light-webfont.svg patch | view | raw | blame | history
server/webrtc/html/jsdoc/fonts/OpenSans-Light-webfont.woff patch | view | raw | blame | history
server/webrtc/html/jsdoc/fonts/OpenSans-LightItalic-webfont.eot patch | view | raw | blame | history
server/webrtc/html/jsdoc/fonts/OpenSans-LightItalic-webfont.svg patch | view | raw | blame | history
server/webrtc/html/jsdoc/fonts/OpenSans-LightItalic-webfont.woff patch | view | raw | blame | history
server/webrtc/html/jsdoc/fonts/OpenSans-Regular-webfont.eot patch | view | raw | blame | history
server/webrtc/html/jsdoc/fonts/OpenSans-Regular-webfont.svg patch | view | raw | blame | history
server/webrtc/html/jsdoc/fonts/OpenSans-Regular-webfont.woff patch | view | raw | blame | history
server/webrtc/html/jsdoc/index.html patch | view | raw | blame | history
server/webrtc/html/jsdoc/janusvideoroom.js.html patch | view | raw | blame | history
server/webrtc/html/jsdoc/scripts/linenumber.js patch | view | raw | blame | history
server/webrtc/html/jsdoc/scripts/prettify/Apache-License-2.0.txt patch | view | raw | blame | history
server/webrtc/html/jsdoc/scripts/prettify/lang-css.js patch | view | raw | blame | history
server/webrtc/html/jsdoc/scripts/prettify/prettify.js patch | view | raw | blame | history
server/webrtc/html/jsdoc/styles/jsdoc-default.css patch | view | raw | blame | history
server/webrtc/html/jsdoc/styles/prettify-jsdoc.css patch | view | raw | blame | history
server/webrtc/html/jsdoc/styles/prettify-tomorrow.css patch | view | raw | blame | history
server/webrtc/html/jsdoc/webrtcstreamer.js.html patch | view | raw | blame | history
server/webrtc/html/jsdoc/xmppvideoroom.js.html patch | view | raw | blame | history
server/webrtc/html/libs/EventEmitter.min.js patch | view | raw | blame | history
server/webrtc/html/libs/adapter.min.js patch | view | raw | blame | history
server/webrtc/html/libs/ag-grid.min.js patch | view | raw | blame | history
server/webrtc/html/libs/blazeface patch | view | raw | blame | history
server/webrtc/html/libs/body-pix patch | view | raw | blame | history
server/webrtc/html/libs/coco-ssd patch | view | raw | blame | history
server/webrtc/html/libs/deeplab patch | view | raw | blame | history
server/webrtc/html/libs/jquery-3.5.1.min.js patch | view | raw | blame | history
server/webrtc/html/libs/lib-jitsi-meet.min.js patch | view | raw | blame | history
server/webrtc/html/libs/posenet patch | view | raw | blame | history
server/webrtc/html/libs/strophe.disco.min.js patch | view | raw | blame | history
server/webrtc/html/libs/strophe.jingle.sdp.js patch | view | raw | blame | history
server/webrtc/html/libs/strophe.min.js patch | view | raw | blame | history
server/webrtc/html/libs/strophe.muc.min.js patch | view | raw | blame | history
server/webrtc/html/libs/tf-backend-wasm.js patch | view | raw | blame | history
server/webrtc/html/libs/tfjs patch | view | raw | blame | history
server/webrtc/html/libs/tfjs-backend-wasm-simd.wasm patch | view | raw | blame | history
server/webrtc/html/libs/tfjs-backend-wasm.wasm patch | view | raw | blame | history
server/webrtc/html/libs/whep-video.component.js patch | view | raw | blame | history
server/webrtc/html/map.html patch | view | raw | blame | history
server/webrtc/html/nav.css patch | view | raw | blame | history
server/webrtc/html/sendstream.html patch | view | raw | blame | history
server/webrtc/html/styles.css patch | view | raw | blame | history
server/webrtc/html/tensorflow.js patch | view | raw | blame | history
server/webrtc/html/webrtc-streamer-algo-element.js patch | view | raw | blame | history
server/webrtc/html/webrtc-streamer-element.html patch | view | raw | blame | history
server/webrtc/html/webrtc-streamer-element.js patch | view | raw | blame | history
server/webrtc/html/webrtc-streamer-footer-element.js patch | view | raw | blame | history
server/webrtc/html/webrtc-streamer-menu-element.js patch | view | raw | blame | history
server/webrtc/html/webrtc-streamer-options-element.js patch | view | raw | blame | history
server/webrtc/html/webrtc-streamer-selector-element.js patch | view | raw | blame | history
server/webrtc/html/webrtc-streamer.html patch | view | raw | blame | history
server/webrtc/html/webrtc.png patch | view | raw | blame | history
server/webrtc/html/webrtcconfig.js patch | view | raw | blame | history
server/webrtc/html/webrtcstreamer.html patch | view | raw | blame | history
server/webrtc/html/webrtcstreamer.js patch | view | raw | blame | history
server/webrtc/html/whep.html patch | view | raw | blame | history
server/webrtc/html/xmppconfig.js patch | view | raw | blame | history
server/webrtc/html/xmppvideoroom.html patch | view | raw | blame | history
server/webrtc/html/xmppvideoroom.js patch | view | raw | blame | history
server/webrtc/webrtc-streamer.exe patch | view | raw | blame | history
ard-work/pom.xml
@@ -20,13 +20,6 @@
            <version>5.0.1</version>
        </dependency>
        <!-- 通用工具-->
        <!--        <dependency>-->
        <!--            <groupId>commons-codec</groupId>-->
        <!--            <artifactId>commons-codec</artifactId>-->
        <!--            <version>1.10</version>-->
        <!--        </dependency>-->
        <dependency>
            <groupId>com.ruoyi</groupId>
            <artifactId>ruoyi-common</artifactId>
@@ -89,11 +82,11 @@
            <artifactId>geodesy</artifactId>
            <version>1.1.3</version>
        </dependency>
        <dependency>
            <groupId>org.bytedeco</groupId>
            <artifactId>javacv-platform</artifactId>
            <version>1.5.7</version>
        </dependency>
<!--        <dependency>-->
<!--            <groupId>org.bytedeco</groupId>-->
<!--            <artifactId>javacv-platform</artifactId>-->
<!--            <version>1.5.7</version>-->
<!--        </dependency>-->
        <!-- Forest -->
        <dependency>
            <groupId>com.dtflys.forest</groupId>
ard-work/src/main/java/com/ruoyi/alarm/config/AsyncConfiguration.java
@@ -28,6 +28,7 @@
    Integer keepAliveSeconds;
    @Value("${ThreadPoolTask.queueCapacity}")
    Integer queueCapacity;
    @Bean("alarmExecutor")
    public Executor alarmExecutor(){
        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
@@ -49,4 +50,25 @@
        executor.initialize();
        return executor;
    }
    @Bean("loginExecutor")
    public Executor loginExecutor(){
        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
        //配置核心线程数
        executor.setCorePoolSize(corePoolSize);
        //配置最大线程数
        executor.setMaxPoolSize(maxPoolSize);
        //配置队列大小
        executor.setQueueCapacity(queueCapacity);
        //线程的名称前缀
        executor.setThreadNamePrefix("loginExecutor-");
        //线程活跃时间(秒)
        executor.setKeepAliveSeconds(keepAliveSeconds);
        //等待所有任务结束后再关闭线程池
        executor.setWaitForTasksToCompleteOnShutdown(true);
        //设置拒绝策略
        executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
        //执行初始化
        executor.initialize();
        return executor;
    }
}
ard-work/src/main/java/com/ruoyi/cmd/startup.java
@@ -6,10 +6,15 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -47,6 +52,7 @@
    Boolean webrtcEnabled;
    //redis
    String redisName = "redis-server.exe";
    /**
     * 程序初始化启动redis
     * 刘苏义
@@ -55,7 +61,7 @@
    @Override
    public void initialize(ConfigurableApplicationContext applicationContext) {
        if (Platform.isWindows()) {
            String exePath = System.getProperty("user.dir") + File.separator + "lib" + File.separator + "redis" + File.separator + redisName;
            String exePath = System.getProperty("user.dir") + File.separator + "server" + File.separator + "redis" + File.separator + redisName;
            List<String> cmd = new ArrayList<>();
            cmd.add(exePath);
            if (CmdUtils.isProcessRunning(redisName)) {
@@ -75,7 +81,7 @@
        if (minioEnabled) {
            log.info("初始化启动minio");
            if (Platform.isWindows()) {
                String exePath = System.getProperty("user.dir") + File.separator + "lib" + File.separator + "minio" + File.separator + minioName;
                String exePath = System.getProperty("user.dir") + File.separator + "server" + File.separator + "minio" + File.separator + minioName;
                Map<String, String> env = new HashMap<>();
                env.put("MINIO_ROOT_USER", accessKey);
                env.put("MINIO_ROOT_PASSWORD", secretKey);
@@ -99,8 +105,8 @@
        if (mediamtxEnabled) {
            log.info("初始化启动mediaMTX");
            if (Platform.isWindows()) {
                String exePath = System.getProperty("user.dir") + File.separator + "lib" + File.separator + "mediamtx" + File.separator + mediamtxName;
                String ymlPath = System.getProperty("user.dir") + File.separator + "lib" + File.separator + "mediamtx" + File.separator + "mediamtx.yml";
                String exePath = System.getProperty("user.dir") + File.separator + "server" + File.separator + "mediamtx" + File.separator + mediamtxName;
                String ymlPath = System.getProperty("user.dir") + File.separator + "server" + File.separator + "mediamtx" + File.separator + "mediamtx.yml";
                List<String> cmd = new ArrayList<>();
                cmd.add(exePath);
@@ -119,7 +125,7 @@
        if (webrtcEnabled) {
            log.info("初始化启动webrtc-streamer");
            if (Platform.isWindows()) {
                String exePath = System.getProperty("user.dir") + File.separator + "lib" + File.separator + "webrtc" + File.separator + webrtcName;
                String exePath = System.getProperty("user.dir") + File.separator + "server" + File.separator + "webrtc" + File.separator + webrtcName;
                List<String> cmd = new ArrayList<>();
                cmd.add(exePath);
                cmd.add("-H" + webrtcHost);
ard-work/src/main/java/com/ruoyi/device/camera/controller/ArdCamerasController.java
@@ -143,12 +143,13 @@
    @ApiOperation("选择相机数据")
    public List options(ArdCameras ardCameras) {
        List<ArdCameras> list = ardCamerasService.findOptions(ardCameras);
        System.out.println("list:"+list.size());
        List options = new ArrayList();
        for (ArdCameras item : list) {
            Map option = new HashMap();
            option.put("value", item.getId());
            option.put("label", item.getName());
            option.put("channel", item.getChanNo());
            option.put("channelList", item.getChannelList());
            List timeList = ardVideoInspectTaskService.getCameraIdleTimeList(item.getId());
            option.put("idleTimeList", timeList);//空闲时间段
            options.add(option);
ard-work/src/main/java/com/ruoyi/device/camera/controller/CameraSdkController.java
@@ -63,17 +63,6 @@
    @Resource
    private IArdCamerasService ardCamerasService;
    /**
     * @描述 初始加载SDK库文件
     * @返回值 void
     * @创建人 刘苏义
     * @创建时间 2023/1/17 16:13
     * @修改人和其它信息 if (Platform.isLinux())
     */
    @PostConstruct
    public void initSDK() {
        cameraSdkService.initSDK();
    }
    @RequestMapping("/preview")
    private String preview() {
@@ -174,7 +163,6 @@
        Map<String, Object> ptzMap = cameraSdkService.getPtz(cmd);
        return AjaxResult.success("获取ptz", ptzMap);
    }
    @ApiOperation("获取PTZ范围")
    @PostMapping("/getPTZScope")
    @Log(title = "获取PTZ范围", businessType = BusinessType.CONTROL)
ard-work/src/main/java/com/ruoyi/device/camera/service/ICameraSdkService.java
@@ -6,8 +6,8 @@
import java.util.Map;
public interface ICameraSdkService {
    //sdk初始化
    void initSDK();
    //初始化登录
    void loginAll();
    //登录
    Boolean login(ArdCameras ardCamera);
ard-work/src/main/java/com/ruoyi/device/camera/service/impl/ArdCamerasServiceImpl.java
@@ -82,7 +82,16 @@
     */
    @Override
    public ArdCameras selectArdCamerasById(String id) {
        return ardCamerasMapper.selectArdCamerasById(id);
        ArdCameras ardCameras = ardCamerasMapper.selectArdCamerasById(id);
        if (ardCameras != null) {
            ArdChannel ardChannel = new ArdChannel();
            ardChannel.setDeviceId(ardCameras.getId());
            List<ArdChannel> ardChannels = ardChannelMapper.selectArdChannelList(ardChannel);
            if (ardChannels != null) {
                ardCameras.setChannelList(ardChannels);
            }
        }
        return ardCameras;
    }
    /**
@@ -190,7 +199,15 @@
    }
    public List findOptions(ArdCameras ardCameras) {
        return ardCamerasMapper.findOptions(ardCameras);
        List<ArdCameras> options = ardCamerasMapper.findOptions(ardCameras);
        for (ArdCameras camera :
                options) {
            ArdChannel ardChannel = new ArdChannel();
            ardChannel.setDeviceId(camera.getId());
            List<ArdChannel> ardChannels = ardChannelMapper.selectArdChannelList(ardChannel);
            camera.setChannelList(ardChannels);
        }
        return options;
    }
    /**
ard-work/src/main/java/com/ruoyi/device/camera/service/impl/AsyncLogin.java
New file
@@ -0,0 +1,39 @@
package com.ruoyi.device.camera.service.impl;
import com.ruoyi.common.utils.Threads;
import com.ruoyi.device.camera.domain.ArdCameras;
import com.ruoyi.device.dhsdk.service.IDhClientService;
import com.ruoyi.device.hiksdk.service.IHikClientService;
import org.hibernate.validator.internal.util.stereotypes.Lazy;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
 * @ClassName 异步登录
 * @Description:
 * @Author 刘苏义
 * @Date 2023/10/23 21:39
 * @Version 1.0
 */
@Service
public class AsyncLogin {
    @Resource
    IHikClientService hikClientService;
    @Resource
    IDhClientService dhClientService;
    @Async("loginExecutor")
    public void hikLogin(ArdCameras ardCameras) {
        hikClientService.login(ardCameras);
    }
    @Async("loginExecutor")
    public void dhLogin(ArdCameras ardCameras) {
        dhClientService.login(ardCameras);
    }
}
ard-work/src/main/java/com/ruoyi/device/camera/service/impl/CameraSdkServiceImpl.java
@@ -3,29 +3,23 @@
import com.ruoyi.common.annotation.SdkOperate;
import com.ruoyi.common.constant.CacheConstants;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.file.FileUtils;
import com.ruoyi.common.utils.Threads;
import com.ruoyi.device.camera.domain.ArdCameras;
import com.ruoyi.device.camera.domain.CameraCmd;
import com.ruoyi.device.camera.service.IArdCamerasService;
import com.ruoyi.device.camera.service.ICameraSdkService;
import com.ruoyi.device.channel.domain.ArdChannel;
import com.ruoyi.device.dhsdk.lib.NetSDKLib;
import com.ruoyi.device.dhsdk.module.RealPlayModule;
import com.ruoyi.device.dhsdk.service.IDhClientService;
import com.ruoyi.device.hiksdk.common.GlobalVariable;
import com.ruoyi.device.hiksdk.service.IHikClientService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.SmartInitializingSingleton;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.ruoyi.device.dhsdk.lib.ToolKits.getErrorCodePrint;
import static com.ruoyi.device.dhsdk.module.LoginModule.netsdk;
import static com.ruoyi.device.hiksdk.sdk.HCNetSDK.NET_DVR_CHECK_USER_STATUS;
/**
@@ -45,19 +39,29 @@
    IDhClientService dhClientService;
    @Resource
    RedisCache redisCache;
    @Resource
    AsyncLogin asyncLogin;
    //初始化SDK
    @PostConstruct
    @Override
    public void initSDK() {
        //初始化加载sdk库文件
        boolean initHIK = hikClientService.init();
        if (initHIK) {
            hikClientService.loginAll();//登录全部海康相机
        }
        Boolean initDH = dhClientService.init();
        if (initDH) {
            dhClientService.loginAll();//登录全部大华相机
    public void loginAll() {
        try {
            List<ArdCameras> ardCameras = ardCamerasService.selectArdCamerasListNoDataScope(new ArdCameras());
            for (ArdCameras camera : ardCameras) {
                if ("1".equals(camera.getFactory())) {
                    asyncLogin.hikLogin(camera);
                } else if ("2".equals(camera.getFactory())) {
                    asyncLogin.dhLogin(camera);
        }
    }
        } catch (Exception ex) {
            log.error("初始化登录相机异常:" + ex.getMessage());
        }
    }
    //登录
    @Override
    public Boolean login(ArdCameras ardCamera) {
@@ -66,10 +70,11 @@
            if (ardCamera != null) {
                String factory = ardCamera.getFactory();
                if (factory.equals("1")) {
                    hikClientService.syncLogin(ardCamera);
                    asyncLogin.hikLogin(ardCamera);
                    result=true;
                } else if (factory.equals("2")) {
                    result = dhClientService.login(ardCamera);
                    asyncLogin.dhLogin(ardCamera);
                    result = true;
                }
            }
        } catch (Exception ex) {
@@ -78,6 +83,7 @@
        }
        return result;
    }
    //注销
    @Override
    public boolean logout(String cameraId) {
@@ -120,6 +126,7 @@
            return false;
        }
    }
    //云台控制
    @SdkOperate
    @Override
@@ -142,6 +149,7 @@
            return false;
        }
    }
    //设置聚焦值
    @Override
    public boolean setFocusPos(CameraCmd cmd) {
@@ -163,6 +171,7 @@
        }
        return result;
    }
    //获取聚焦值
    @Override
    public int getFocusPos(CameraCmd cmd) {
@@ -183,6 +192,7 @@
        }
        return result;
    }
    //设置预置位
    @Override
    public boolean setPreset(CameraCmd cmd) {
@@ -203,6 +213,7 @@
        }
        return result;
    }
    //调用预置位
    @Override
    public boolean gotoPreset(CameraCmd cmd) {
@@ -223,6 +234,7 @@
        }
        return result;
    }
    //获取码流压缩参数
    @Override
    public Map<String, Object> getVideoCompressionCfg(CameraCmd cmd) {
@@ -243,6 +255,7 @@
        }
        return map;
    }
    //透雾开关
    @Override
    public boolean controlDefogcfg(CameraCmd cmd) {
@@ -263,6 +276,7 @@
        }
        return result;
    }
    //红外开关
    @Override
    public boolean controlInfrarecfg(CameraCmd cmd) {
@@ -283,6 +297,7 @@
        }
        return result;
    }
    //手动/自动聚焦
    @Override
    public boolean controlFocusMode(CameraCmd cmd) {
@@ -303,6 +318,7 @@
        }
        return result;
    }
    //获取聚焦模式
    @Override
    public String getFocusMode(CameraCmd cmd) {
@@ -323,6 +339,7 @@
        }
        return result;
    }
    //云台加热
    @Override
    public boolean controlPTHeateRpwron(CameraCmd cmd) {
@@ -343,6 +360,7 @@
        }
        return result;
    }
    //镜头加热
    @Override
    public boolean controlCameraDeicing(CameraCmd cmd) {
@@ -389,6 +407,7 @@
    public String captureJPEGPicture(CameraCmd cmd) {
        return null;
    }
    //抓图
    @SdkOperate
    @Override
@@ -415,6 +434,7 @@
        }
        return url;
    }
    //获取ptz
    @Override
    public Map<String, Object> getPtz(CameraCmd cmd) {
@@ -435,6 +455,7 @@
        }
        return map;
    }
    //获取ptz范围
    @Override
    public Map<String, Object> getPtzScope(CameraCmd cmd) {
@@ -455,6 +476,7 @@
        }
        return map;
    }
    //设置ptz
    @SdkOperate
    @Override
@@ -476,6 +498,7 @@
        }
        return result;
    }
    //设置零方位角
    @SdkOperate
    @Override
@@ -497,6 +520,7 @@
        }
        return result;
    }
    //引导指向目标
    @SdkOperate
    @Override
@@ -606,6 +630,7 @@
        }
        return result;
    }
    //停止录像并存入minio
    @Override
    public String recordStopToMinio(CameraCmd cmd) {
@@ -626,6 +651,7 @@
        }
        return url;
    }
    //停止录像并不存入minio
    @Override
    public boolean recordStopNotToMinio(CameraCmd cmd) {
@@ -667,4 +693,6 @@
        }
        return map;
    }
}
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/LibraryLoad.java
@@ -1,6 +1,7 @@
package com.ruoyi.device.dhsdk.lib;
import com.ruoyi.device.dhsdk.lib.DynamicParseUtil;
import lombok.extern.slf4j.Slf4j;
import org.xml.sax.SAXException;
import javax.xml.parsers.ParserConfigurationException;
@@ -12,6 +13,7 @@
 * @description 动态库加载
 * @date 2020/11/14
 */
@Slf4j(topic = "dhSdk")
public class LibraryLoad {
  private static final String ARCH_WINDOWS = "win";
  private static final String ARCH_LINUX = "linux";
@@ -74,7 +76,7 @@
    if (!(EXTRACT_PATH.endsWith("/") || EXTRACT_PATH.endsWith("\\"))) {
      path = EXTRACT_PATH + "/";
    }
    System.out.println("load library: " + path + fullName);
    log.debug("load library: " + path + fullName);
    return path + fullName;
  }
@@ -85,7 +87,7 @@
   * @return
   */
  private static String extractLibrary(String libName) {
    return extractLibrary("", libName);
    return extractLibrary("/lib", libName);
  }
  /**
@@ -119,6 +121,13 @@
      }
      extractedLibFile = new File(nativeTempDir + libFullName);
      reader = new BufferedInputStream(in);
            // 检查文件夹是否存在,如果不存在则创建
            File parentDir = extractedLibFile.getParentFile();
            if (!parentDir.exists()) {
                parentDir.mkdirs();
            }
      writer = new FileOutputStream(extractedLibFile);
      byte[] buffer = new byte[1024];
      while (true) {
@@ -130,7 +139,7 @@
      writer.close();
      in.close();
    } catch (Exception e) {
      //System.out.println("dynamic file[ "+ fileName+ " ] not found in project.please ensure you need this library.");
           log.error("dynamic file[ " + fileName + " ] not found in project.please ensure you need this library.");
    }
    return extractedLibFile != null ? extractedLibFile.getAbsolutePath() : "";
  }
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/NetSDKLib.java
@@ -17,10 +17,11 @@
 */
public interface NetSDKLib extends Library {
    NetSDKLib NETSDK_INSTANCE = Native.load("lib/dhDll/dhnetsdk", NetSDKLib.class);
    //NetSDKLib NETSDK_INSTANCE = Native.load("lib/dhDll/dhnetsdk", NetSDKLib.class);
    //NetSDKLib CONFIG_INSTANCE = Native.load("lib/dhDll/dhconfigsdk", NetSDKLib.class);
    NetSDKLib CONFIG_INSTANCE = Native.load("lib/dhDll/dhconfigsdk", NetSDKLib.class);
    NetSDKLib NETSDK_INSTANCE = Native.load(LibraryLoad.getLoadLibrary("dhnetsdk"), NetSDKLib.class);
    NetSDKLib CONFIG_INSTANCE = Native.load(LibraryLoad.getLoadLibrary("dhconfigsdk"), NetSDKLib.class);
    //NetSDKLib CONFIG_JNI = (NetSDKLib)Native.loadLibrary(util.getLoadLibrary("JNI1.dll"), INetSDK.class);
    class LLong extends IntegerType {
        private static final long serialVersionUID = 1L;
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/Utils.java
@@ -110,9 +110,9 @@
        String loadLibrary = "";
        String osPrefix = getOsPrefix();
        if (osPrefix.toLowerCase().startsWith("win32-x86")) {
            loadLibrary = "./libs/win32/";
            loadLibrary = "./lib/win32/";
        } else if (osPrefix.toLowerCase().startsWith("win32-amd64")) {
            loadLibrary = "./libs/win64/";
            loadLibrary = "./lib/win64/";
        } else if (osPrefix.toLowerCase().startsWith("linux-i386")) {
            loadLibrary = "";
        } else if (osPrefix.toLowerCase().startsWith("linux-amd64")) {
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/structure/CFG_MOTION_INFO.java
@@ -16,7 +16,7 @@
/**
 * @author 47081
 * @description 动态监测报警配置,对应接口 {@link
 *     com.netsdk.lib.NetSDKLib#CLIENT_GetNewDevConfig(NetSDKLib.LLong, String, int, byte[], int,
 *     com.ruoyi.device.dhsdk.lib.NetSDKLib#CLIENT_GetNewDevConfig(NetSDKLib.LLong, String, int, byte[], int,
 *     IntByReference, int)}和{@link NetSDKLib#CLIENT_SetNewDevConfig(NetSDKLib.LLong, String, int,
 *     byte[], int, IntByReference, IntByReference, int)}
 * @date 2021/4/9
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/structure/NET_ALARM_DEVICE_MODIFIED_INFO.java
@@ -14,11 +14,11 @@
    public    NET_TIME_EX                            stuUTC=new NET_TIME_EX();          // 事件发生的时间,标准的(不带时区偏差的)UTC时间
    public    byte[]                                szUser=new byte[32];     // 用户名称
    /**
     * {@link  com.netsdk.lib.enumeration.NET_EVENT_OPERATE_TYPE}
     * {@link  com.ruoyi.device.dhsdk.lib.enumeration.NET_EVENT_OPERATE_TYPE}
     */
    public  int emOpType;        // 操作类型
    /**
     * {@link  com.netsdk.lib.enumeration.NET_EVENT_DEVICE_TYPE}
     * {@link  com.ruoyi.device.dhsdk.lib.enumeration.NET_EVENT_DEVICE_TYPE}
     */
    public  int emDeviceType;    // 设备类型
    public byte[]                    szReserved=new byte[1024];// 保留字节
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/structure/NET_CFG_ACCESSCTL_SPECIALDAY_GROUP_INFO.java
@@ -8,7 +8,7 @@
 * @author 47081
 * @version 1.0
 * @description 门禁假日组配置,对应枚举 {@link
 *     com.netsdk.lib.enumeration.NET_EM_CFG_OPERATE_TYPE#NET_EM_CFG_ACCESSCTL_SPECIALDAY_GROUP}
 *     com.ruoyi.device.dhsdk.lib.enumeration.NET_EM_CFG_OPERATE_TYPE#NET_EM_CFG_ACCESSCTL_SPECIALDAY_GROUP}
 * @date 2020/10/19
 */
public class NET_CFG_ACCESSCTL_SPECIALDAY_GROUP_INFO extends NetSDKLib.SdkStructure {
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/structure/NET_IN_PERSON_INFO_INPUT_RESULT.java
@@ -27,7 +27,7 @@
     */
    public byte[] szCitizenID = new byte[64];
    /**
     * 设备展示颜色 com.netsdk.lib.enumeration.EM_SHOW_COLOR
     * 设备展示颜色 com.ruoyi.device.dhsdk.lib.enumeration.EM_SHOW_COLOR
     */
    public int emColor;
    /**
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/structure/NET_IN_START_REDIRECT_SERVICE.java
@@ -9,7 +9,7 @@
 * @author 47081
 * @version 1.0
 * @description CLIENT_StartRedirectServiceEx接口输入参数, {@link
 *     com.netsdk.lib.NetSDKLib#CLIENT_StartRedirectServiceEx(Pointer, Pointer)}
 *     com.ruoyi.device.dhsdk.lib.NetSDKLib#CLIENT_StartRedirectServiceEx(Pointer, Pointer)}
 * @date 2021/3/13
 */
public class NET_IN_START_REDIRECT_SERVICE extends NetSDKLib.SdkStructure {
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/structure/UNPACKING_CHECK_INFO.java
@@ -60,7 +60,7 @@
     */
    public byte[] szAlarmLocation = new byte[256];
    /**
     * com.netsdk.lib.NetSDKLib.EM_INSIDE_OBJECT_TYPE
     * com.ruoyi.device.dhsdk.lib.NetSDKLib.EM_INSIDE_OBJECT_TYPE
     */
    public int[] emContrabandClass = new int[64];           // 违禁物品分类
    /**
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/structure/customize/CANDIDATE_INFO_CEX.java
@@ -1,4 +1,4 @@
package com.netsdk.lib.structure.customize;
package com.ruoyi.device.dhsdk.lib.structure.customize;
import com.ruoyi.device.dhsdk.lib.NetSDKLib;
import com.ruoyi.device.dhsdk.lib.Utils;
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/structure/customize/DEV_EVENT_CROSSLINE_INFO.java
@@ -1,4 +1,4 @@
package com.netsdk.lib.structure.customize;
package com.ruoyi.device.dhsdk.lib.structure.customize;
import com.ruoyi.device.dhsdk.lib.NetSDKLib;
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/structure/customize/DEV_EVENT_CROSSREGION_INFO.java
@@ -1,4 +1,4 @@
package com.netsdk.lib.structure.customize;
package com.ruoyi.device.dhsdk.lib.structure.customize;
import com.ruoyi.device.dhsdk.lib.NetSDKLib;
import com.ruoyi.device.dhsdk.lib.enumeration.EM_CAPTURE_PROCESS_END_TYPE;
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/structure/customize/EVENT_INTELLI_COMM_INFO.java
@@ -1,4 +1,4 @@
package com.netsdk.lib.structure.customize;
package com.ruoyi.device.dhsdk.lib.structure.customize;
import com.ruoyi.device.dhsdk.lib.NetSDKLib;
import com.ruoyi.device.dhsdk.lib.structure.POSTION;
ard-work/src/main/java/com/ruoyi/device/dhsdk/lib/structure/customize/MEDIAFILE_FACERECOGNITION_INFO.java
@@ -1,4 +1,4 @@
package com.netsdk.lib.structure.customize;
package com.ruoyi.device.dhsdk.lib.structure.customize;
import com.ruoyi.device.dhsdk.lib.NetSDKLib;
import com.ruoyi.device.dhsdk.lib.Utils;
ard-work/src/main/java/com/ruoyi/device/dhsdk/module/CapturePictureModule.java
@@ -2,6 +2,7 @@
import com.ruoyi.device.dhsdk.lib.NetSDKLib;
import com.ruoyi.device.dhsdk.lib.ToolKits;
import com.sun.jna.ptr.IntByReference;
import lombok.extern.slf4j.Slf4j;
/**
 * \if ENGLISH_LANG
@@ -12,6 +13,7 @@
 * 包含: 本地、远程、定时和停止抓图
 * \endif
 */
@Slf4j(topic = "dhSdk")
public class CapturePictureModule {
    public static NetSDKLib netsdk = NetSDKLib.NETSDK_INSTANCE;
@@ -26,10 +28,10 @@
    public static boolean localCapturePicture(NetSDKLib.LLong hPlayHandle, String picFileName) {
                
        if (!netsdk.CLIENT_CapturePictureEx(hPlayHandle, picFileName, NetSDKLib.NET_CAPTURE_FORMATS.NET_CAPTURE_JPEG)) {
            System.err.printf("CLIENT_CapturePicture Failed!" + ToolKits.getErrorCodePrint());
            log.error("CLIENT_CapturePicture Failed!" + ToolKits.getErrorCodePrint());
            return false;
        } else { 
            System.out.println("CLIENT_CapturePicture success");
            log.debug("CLIENT_CapturePicture success");
        }
        return true;
    }
@@ -85,10 +87,10 @@
        
        IntByReference reserved = new IntByReference(0);
        if (!LoginModule.netsdk.CLIENT_SnapPictureEx(m_hLoginHandle, stuSnapParams, reserved)) {
            System.err.printf("CLIENT_SnapPictureEx Failed!" + ToolKits.getErrorCodePrint());
            log.error("CLIENT_SnapPictureEx Failed!" + ToolKits.getErrorCodePrint());
            return false;
        } else { 
            System.out.println("CLIENT_SnapPictureEx success");
            log.debug("CLIENT_SnapPictureEx success");
        }
        return true;
    }
ard-work/src/main/java/com/ruoyi/device/dhsdk/module/ConfigModule.java
@@ -4,6 +4,7 @@
import com.ruoyi.device.dhsdk.lib.ToolKits;
import com.sun.jna.Structure;
import com.sun.jna.ptr.IntByReference;
import lombok.extern.slf4j.Slf4j;
import static com.ruoyi.device.dhsdk.lib.ToolKits.getErrorCodePrint;
@@ -13,6 +14,7 @@
 * @Author: 刘苏义
 * @Date: 2023年10月14日14:57:01
 **/
@Slf4j(topic = "dhSdk")
public class ConfigModule {
    public static NetSDKLib netsdk = NetSDKLib.NETSDK_INSTANCE;
    public static NetSDKLib configsdk = NetSDKLib.CONFIG_INSTANCE;
@@ -39,7 +41,7 @@
        IntByReference intRetLen = new IntByReference();
        stuInfo.write();
        if (!netsdk.CLIENT_QueryRemotDevState(hLoginHandle, nType, nChn, stuInfo.getPointer(), stuInfo.size(), intRetLen, 3000)) {
            System.err.println("Config Failed!" + ToolKits.getErrorCodePrint());
            log.error("Config Failed!" + ToolKits.getErrorCodePrint());
            return false;
        }
        stuInfo.read();
@@ -67,11 +69,11 @@
                cmdObject.read();
                result = true;
            } else {
                System.err.println("Parse " + strCmd + " Config Failed!" + ToolKits.getErrorCodePrint());
                log.error("Parse [" + strCmd + "] Config Failed!" + ToolKits.getErrorCodePrint());
                result = false;
            }
        } else {
            System.err.printf("Get %s Config Failed!Last Error = %s\n", strCmd, getErrorCodePrint());
            log.error("Get [" + strCmd + "] Config Failed!Last Error = " + getErrorCodePrint());
            result = false;
        }
@@ -88,11 +90,12 @@
        if (bRet) {
            cmdObject.read();
        } else {
            System.err.printf("Get %s Config Failed!Last Error = %s\n", strCmd, getErrorCodePrint());
            log.error("Get ["+strCmd+"] Config Failed!Last Error = " + getErrorCodePrint());
            result = false;
        }
        return result;
    }
    // 获取配置
    public static boolean GetConfig(NetSDKLib.LLong hLoginHandle, int nChn,int type,Structure cmdObject) {
        boolean result = false;
@@ -102,11 +105,12 @@
            cmdObject.read();
            result=true;
        } else {
            System.err.println("GetConfig Failed!" + getErrorCodePrint());
            log.error("GetConfig Failed!" + getErrorCodePrint());
            result=false;
        }
        return result;
    }
    /**
     * 设置单个配置
     *
@@ -129,11 +133,12 @@
            if (netsdk.CLIENT_SetNewDevConfig(hLoginHandle, strCmd, nChn, szBuffer, nBufferLen, error, restart, 3000)) {
                result = true;
            } else {
                System.err.printf("Set %s Config Failed! Last Error = %s\n", strCmd, getErrorCodePrint());
                log.error("Set [" + strCmd + "] Config Failed! Last Error = " + getErrorCodePrint());
                result = false;
            }
        } else {
            System.err.println("Packet " + strCmd + " Config Failed!" + getErrorCodePrint());
            log.error("Parse [" + strCmd + "] Config Failed!" + ToolKits.getErrorCodePrint());
            result = false;
        }
ard-work/src/main/java/com/ruoyi/device/dhsdk/module/LoginModule.java
@@ -6,6 +6,7 @@
import com.ruoyi.device.dhsdk.lib.NetSDKLib.NET_OUT_LOGIN_WITH_HIGHLEVEL_SECURITY;
import com.sun.jna.ptr.IntByReference;
import lombok.extern.slf4j.Slf4j;
import static com.ruoyi.device.dhsdk.lib.ToolKits.getErrorCodePrint;
/**
@@ -18,7 +19,7 @@
    public static NetSDKLib netsdk = NetSDKLib.NETSDK_INSTANCE;
    // 设备信息
    public static NetSDKLib.NET_DEVICEINFO_Ex m_stDeviceInfo = new NetSDKLib.NET_DEVICEINFO_Ex();
    //  public static NetSDKLib.NET_DEVICEINFO_Ex m_stDeviceInfo = new NetSDKLib.NET_DEVICEINFO_Ex();
    // 登陆句柄
    public static LLong m_hLoginHandle = new LLong(0);//
@@ -66,7 +67,6 @@
        int tryTimes = 1;    //登录时尝试建立链接1次
        netsdk.CLIENT_SetConnectTime(waitTime, tryTimes);
        // 设置更多网络参数,NET_PARAM的nWaittime,nConnectTryNum成员与CLIENT_SetConnectTime
        // 接口设置的登录设备超时时间和尝试次数意义相同,可选
        NetSDKLib.NET_PARAM netParam = new NetSDKLib.NET_PARAM();
@@ -102,7 +102,7 @@
     * 登录设备
     * \endif
     */
    public static LLong login(String m_strIp, int m_nPort, String m_strUser, String m_strPassword) {
    public static LLong login(String m_strIp, int m_nPort, String m_strUser, String m_strPassword, NetSDKLib.NET_DEVICEINFO_Ex lpDeviceInfo) {
        IntByReference nError = new IntByReference(0);
        //入参
        NET_IN_LOGIN_WITH_HIGHLEVEL_SECURITY pstInParam = new NET_IN_LOGIN_WITH_HIGHLEVEL_SECURITY();
@@ -111,17 +111,15 @@
        pstInParam.szPassword = m_strPassword.getBytes();
        pstInParam.szUserName = m_strUser.getBytes();
        //出参
        NET_OUT_LOGIN_WITH_HIGHLEVEL_SECURITY pstOutParam = new NET_OUT_LOGIN_WITH_HIGHLEVEL_SECURITY();
        pstOutParam.stuDeviceInfo = m_stDeviceInfo;
        LLong m_hLoginHandle = netsdk.CLIENT_LoginEx2(m_strIp, m_nPort, m_strUser, m_strPassword, 0, null, m_stDeviceInfo, nError);
        //NET_OUT_LOGIN_WITH_HIGHLEVEL_SECURITY pstOutParam = new NET_OUT_LOGIN_WITH_HIGHLEVEL_SECURITY();
        LLong m_hLoginHandle = netsdk.CLIENT_LoginEx2(m_strIp, m_nPort, m_strUser, m_strPassword, 0, null, lpDeviceInfo, nError);
        //m_hLoginHandle=netsdk.CLIENT_LoginWithHighLevelSecurity(pstInParam, pstOutParam);
        if (m_hLoginHandle.longValue() == 0) {
            log.debug("Login Device[%s] Port[%d]Failed. %s\n", m_strIp, m_nPort, getErrorCodePrint());
            log.debug("Login Failed [" + m_strIp + ":" + m_nPort + "],错误码:" + getErrorCodePrint());
        } else {
            log.debug("Login Success [ " + m_strIp + " ]");
            log.debug("Login Success [ " + m_strIp + ":" + m_nPort + " ]");
        }
        return m_hLoginHandle;
        //return m_hLoginHandle.longValue() == 0? false:true;
    }
    /**
ard-work/src/main/java/com/ruoyi/device/dhsdk/module/RealPlayModule.java
@@ -3,6 +3,7 @@
import com.ruoyi.device.dhsdk.lib.NetSDKLib;
import com.ruoyi.device.dhsdk.lib.ToolKits;
import com.sun.jna.Pointer;
import lombok.extern.slf4j.Slf4j;
import static com.ruoyi.device.dhsdk.module.LoginModule.netsdk;
@@ -10,6 +11,7 @@
 * 实时预览接口实现
 * 主要有 :开始拉流、停止拉流功能
 */
@Slf4j(topic = "dhSdk")
public class RealPlayModule {
    /**
     * \if ENGLISH_LANG
@@ -29,9 +31,9 @@
        NetSDKLib.NET_OUT_REALPLAY_BY_DATA_TYPE net_out_realplay_by_data_type = new NetSDKLib.NET_OUT_REALPLAY_BY_DATA_TYPE();
        NetSDKLib.LLong m_hPlayHandle = netsdk.CLIENT_RealPlayByDataType(m_hLoginHandle, net_in_realplay_by_data_type, net_out_realplay_by_data_type, 5000);
        if (m_hPlayHandle.longValue() == 0) {
            System.err.println("开始实时预览失败,错误码" + ToolKits.getErrorCodePrint());
            log.error("开始实时预览失败,错误码" + ToolKits.getErrorCodePrint());
        } else {
            System.out.println("Success to start realplay");
            log.debug("Success to start realplay");
        }
        return m_hPlayHandle;
    }
@@ -75,23 +77,23 @@
            if (0 != lRealHandle.longValue()) {
                switch (dwDataType) {
                    case 0:
                        System.out.println("码流大小为" + dwBufSize + "\n" + "码流类型为原始音视频混合数据");
                        log.debug("码流大小为" + dwBufSize + "\n" + "码流类型为原始音视频混合数据");
                        break;
                    case 1:
                        //标准视频数据
                        System.out.println("码流大小为" + dwBufSize + "\n" + "码流类型为标准视频数据");
                        log.debug("码流大小为" + dwBufSize + "\n" + "码流类型为标准视频数据");
                        break;
                    case 2:
                        //yuv 数据
                        System.out.println("码流大小为" + dwBufSize + "\n" + "码流类型为yuv数据");
                        log.debug("码流大小为" + dwBufSize + "\n" + "码流类型为yuv数据");
                        break;
                    case 3:
                        //pcm 音频数据
                        System.out.println("码流大小为" + dwBufSize + "\n" + "码流类型为音频数据");
                        log.debug("码流大小为" + dwBufSize + "\n" + "码流类型为音频数据");
                        break;
                    case 4:
                        //原始音频数据
                        System.out.println("码流大小为" + dwBufSize + "\n" + "码流类型为原始音频数据");
                        log.debug("码流大小为" + dwBufSize + "\n" + "码流类型为原始音频数据");
                        break;
                    default:
                        break;
ard-work/src/main/java/com/ruoyi/device/dhsdk/service/IDhClientService.java
@@ -13,14 +13,8 @@
 */
public interface IDhClientService {
    //sdk初始化
    Boolean init();
    //登录
    Boolean login(ArdCameras ardCamera);
    //登录所有相机
    void loginAll();
    //注销
    Boolean logout(String cameraId);
ard-work/src/main/java/com/ruoyi/device/dhsdk/service/impl/DhClientServiceImpl.java
@@ -1,6 +1,7 @@
package com.ruoyi.device.dhsdk.service.impl;
import com.ruoyi.common.annotation.SdkOperate;
import com.ruoyi.common.utils.Threads;
import com.ruoyi.common.utils.file.FileUtils;
import com.ruoyi.common.utils.file.MimeTypeUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
@@ -18,6 +19,7 @@
import com.ruoyi.device.dhsdk.module.*;
import com.ruoyi.device.dhsdk.service.IDhClientService;
import com.ruoyi.device.hiksdk.common.GlobalVariable;
import com.ruoyi.device.camera.service.impl.AsyncLogin;
import com.ruoyi.media.domain.Vtdu;
import com.ruoyi.media.service.IVtduService;
import com.ruoyi.utils.gis.GisUtil;
@@ -25,7 +27,6 @@
import com.sun.jna.Pointer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -58,42 +59,13 @@
    private IVtduService vtduService;
    @Value("${minio.endpoint}")
    private String minioEndPoint;
    private final Object lock = new Object();
    // 设备断线通知回调
    private static DisConnect disConnect = new DisConnect();
    // 网络连接恢复
    private static HaveReConnect haveReConnect = new HaveReConnect();
    /**
     * 登录所有相机
     * 刘苏义
     * 2023/10/17 8:28:13
     */
    @Override
    public void loginAll() {
        try {
            ArdCameras ardCamera = new ArdCameras();
            ardCamera.setFactory("2");//获取大华相机
            List<ArdCameras> ardCameras = ardCamerasService.selectArdCamerasListNoDataScope(ardCamera);
            for (ArdCameras camera : ardCameras) {
                Thread.sleep(500);
                //异步登录
                login(camera);
            }
        } catch (Exception ex) {
            log.error("初始化登录相机异常:" + ex.getMessage());
        }
    }
    /**
     * sdk初始化
     * 刘苏义
     * 2023/10/17 8:28:13
     */
    @Override
    public Boolean init() {
        return LoginModule.init(disConnect, haveReConnect);   // 打开工程,初始化
    }
    /**
     * 登录
@@ -101,24 +73,32 @@
     * 2023/10/17 8:28:13
     */
    @Override
    @Async
    public Boolean login(ArdCameras camera) {
        LLong loginId = LoginModule.login(camera.getIp(), camera.getPort(), camera.getUsername(), camera.getPassword());
        if (loginId.longValue() > 0) {
            //log.debug(camera.getIp() + ":" + camera.getPort() + "登录成功");
        LoginModule.init(disConnect, haveReConnect);
        NetSDKLib.NET_DEVICEINFO_Ex m_stDeviceInfo = new NetSDKLib.NET_DEVICEINFO_Ex();
        LLong loginId = LoginModule.login(camera.getIp(), camera.getPort(), camera.getUsername(), camera.getPassword(), m_stDeviceInfo);
        if (loginId.longValue() <= 0) {
            camera.setChanNum(0);
            camera.setLoginId(-1);
            camera.setState("0");
            ardCamerasService.updateArdCameras(camera);
            return false;
        }
        synchronized (lock) {
            if (GlobalVariable.loginMap.containsKey(camera.getId())) {
                GlobalVariable.loginMap.remove(camera.getId());
            }
            //删除管理通道
            ardChannelService.deleteArdChannelByDeviceId(camera.getId());
            camera.setState("1");
            camera.setChanNum(LoginModule.m_stDeviceInfo.byChanNum);
            camera.setChanNum(m_stDeviceInfo.byChanNum);
            camera.setStartDChan(1);
            camera.setLoginId((int) loginId.longValue());
            ardCamerasService.updateArdCameras(camera);
            GlobalVariable.loginMap.put(camera.getId(), loginId);
            //获取最新通道
            for (int i = 1; i < LoginModule.m_stDeviceInfo.byChanNum + 1; i++) {
            for (int i = 1; i < m_stDeviceInfo.byChanNum + 1; i++) {
                ArdChannel channel = new ArdChannel();
                AV_CFG_ChannelName av_cfg_channelName = new AV_CFG_ChannelName();
                boolean b = ConfigModule.GetNewDevConfig(loginId, i - 1, CFG_CMD_CHANNELTITLE, av_cfg_channelName);
@@ -136,17 +116,17 @@
                channel.setDeviceId(camera.getId());
                channel.setChanNo(i);
                ardChannelService.insertArdChannel(channel);
            }
                //配置到流媒体
                String name = camera.getId() + "_" + channel.getChanNo();
                String rtspSource = "rtsp://" + camera.getUsername() + ":" + camera.getPassword() + "@" + camera.getIp() + ":" + camera.getRtspPort() + "/cam/realmonitor?channel=" + channel.getChanNo() + "&subtype=0";
            for (int i = 1; i < m_stDeviceInfo.byChanNum + 1; i++) {
                String name = camera.getId() + "_" + i;
                String rtspSource = "rtsp://" + camera.getUsername() + ":" + camera.getPassword() + "@" + camera.getIp() + ":" + camera.getRtspPort() + "/cam/realmonitor?channel=" + i + "&subtype=0";
                Vtdu vtdu = vtduService.selectVtduByName(name);
                if (vtdu != null) {
                    vtduService.deleteVtduByName(name);
                }
                //添加到流媒体
                CameraCmd cmd = new CameraCmd(camera.getId(), channel.getChanNo());
                CameraCmd cmd = new CameraCmd(camera.getId(), i);
                Map<String, Object> videoCompressionCfg = getVideoCompressionCfg(cmd);
                vtdu = new Vtdu();
                if (videoCompressionCfg.get("videoEncType").equals("标准h264")) {
@@ -155,20 +135,12 @@
                    vtdu.setIsCode("1");//默认转码
                }
                vtdu.setRtspSource(rtspSource);
                vtdu.setName(camera.getId() + "_" + channel.getChanNo());
                vtdu.setName(camera.getId() + "_" + i);
                vtdu.setMode("1");//默认CPU软解码
                vtdu.setCameraId(camera.getId());
                vtduService.insertVtdu(vtdu);
            }
        } else {
            //log.debug(camera.getIp() + ":" + camera.getPort() + "登录失败");
            camera.setChanNum(0);
            camera.setLoginId(-1);
            camera.setState("0");
            ardCamerasService.updateArdCameras(camera);
            return false;
        }
        return true;
    }
@@ -217,6 +189,7 @@
     * 2023/10/17 8:28:13
     */
    @Override
    @SdkOperate
    public boolean pTZControl(CameraCmd cmd) {
        String cameraId = cmd.getCameraId();
        boolean enable = cmd.isEnable();
@@ -368,7 +341,6 @@
     * @修改人和其它信息 注意俯仰角度负值需要加上360得到的正值进行设置
     */
    @Override
    @SdkOperate
    public boolean setZeroPtz(CameraCmd cmd) {
        String cameraId = cmd.getCameraId();
        Integer chanNo = cmd.getChanNo();
@@ -392,7 +364,6 @@
     * @修改人和其它信息
     */
    @Override
    @SdkOperate
    public String picCutCate(CameraCmd cmd) {
        String cameraId = cmd.getCameraId();
        Integer chanNo = cmd.getChanNo();
@@ -823,6 +794,7 @@
    @Override
    public Map<String, Object> getVideoCompressionCfg(CameraCmd cmd) {
        Map<String, Object> map = new HashMap<>();
        try {
        String cameraId = cmd.getCameraId();
        Integer chanNo = cmd.getChanNo();
        if (!GlobalVariable.loginMap.containsKey(cameraId)) {
@@ -880,6 +852,9 @@
            map.put("videoEncType", videoEncType);//编码
            map.put("nFrameRate", String.valueOf(nFrameRate));//帧率
        }
        } catch (Exception ex) {
            log.error("取码流压缩参数异常:" + ex.getMessage());
        }
        return map;
    }
@@ -912,7 +887,7 @@
    // 设备断线回调: 当设备出现断线时,SDK会调用该函数
    private static class DisConnect implements NetSDKLib.fDisConnect {
        public void invoke(LLong m_hLoginHandle, String pchDVRIP, int nDVRPort, Pointer dwUser) {
            System.out.printf("Device[%s] Port[%d] DisConnect!\n", pchDVRIP, nDVRPort);
            log.warn("Device[" + pchDVRIP + "] Port[" + nDVRPort + "] DisConnect!");
        }
    }
@@ -920,7 +895,7 @@
    private static class HaveReConnect implements NetSDKLib.fHaveReConnect {
        @Override
        public void invoke(LLong lLoginID, String pchDVRIP, int nDVRPort, Pointer dwUser) {
            System.out.printf("ReConnect Device[%s] Port[%d]\n", pchDVRIP, nDVRPort);
            log.warn("ReConnect Device[" + pchDVRIP + "] Port[" + nDVRPort + "]");
        }
    }
ard-work/src/main/java/com/ruoyi/device/hiksdk/common/GlobalVariable.java
@@ -19,4 +19,7 @@
    public static Map<String, Integer> previewMap = new HashMap<>();
    //线程字典
    public static Map<String,String>threadMap=new HashMap<>();
    //保存相机登录信息(loginId:Camera)
    public static Map<Integer, Object> loginCameraMap = new HashMap<>();
}
ard-work/src/main/java/com/ruoyi/device/hiksdk/sdk/ExceptionCallBack.java
New file
@@ -0,0 +1,44 @@
package com.ruoyi.device.hiksdk.sdk;
import com.ruoyi.device.camera.domain.ArdCameras;
import com.ruoyi.device.hiksdk.common.GlobalVariable;
import com.sun.jna.Pointer;
import javafx.scene.Camera;
import lombok.extern.slf4j.Slf4j;
import static com.ruoyi.device.hiksdk.sdk.HCNetSDK.*;
/**
 * @Description: 注册接收异常、重连等消息的窗口句柄或回调函数
 * @ClassName: ExceptionCallBack
 * @Author: 刘苏义
 * @Date: 2023年10月23日15:37:40
 **/
@Slf4j(topic = "hikSdk")
public class ExceptionCallBack implements HCNetSDK.FExceptionCallBack {
    @Override
    public void invoke(int dwType, int lUserID, int lHandle, Pointer pUser) {
        ArdCameras camera = (ArdCameras) GlobalVariable.loginCameraMap.get(lUserID);
        if(camera!=null) {
            String ip = camera.getIp();
            Integer port = camera.getPort();
            switch (dwType) {
                case EXCEPTION_EXCHANGE:
                    log.warn("Device[" + ip + "] Port[" + port + "]用户交互时异常");
                    break;
                case EXCEPTION_PREVIEW:
                    log.warn("Device[" + ip + "] Port[" + port + "]网络预览异常");
                    break;
                case EXCEPTION_RECONNECT:
                    log.warn("Device[" + ip + "] Port[" + port + "]预览时重连");
                    break;
                case RELOGIN_SUCCESS:
                    log.warn("Device[" + ip + "] Port[" + port + "]用户重登陆成功");
                    break;
                case EXCEPTION_RELOGIN:
                    log.warn("Device[" + ip + "] Port[" + port + "]用户重登陆");
                    break;
            }
        }
    }
}
ard-work/src/main/java/com/ruoyi/device/hiksdk/sdk/HCNetSDK.java
@@ -1,5 +1,6 @@
package com.ruoyi.device.hiksdk.sdk;
import com.ruoyi.device.dhsdk.lib.LibraryLoad;
import com.sun.jna.*;
import com.sun.jna.examples.win32.W32API;
import com.sun.jna.examples.win32.W32API.HWND;
@@ -14,6 +15,7 @@
//SDK接口说明,HCNetSDK.dll
public interface HCNetSDK extends Library {
    HCNetSDK hCNetSDK = Native.load(LibraryLoad.getLoadLibrary("HCNetSDK"), HCNetSDK.class);
    /*** 宏定义 ***/
    //常量
@@ -951,6 +953,8 @@
    public static final int EXCEPTION_SERIALRECONNECT = 0x8007;//透明通道重连
    public static final int EXCEPTION_PLAYBACK = 0x8010;//回放异常
    public static final int EXCEPTION_DISKFMT = 0x8011;//硬盘格式化
    public static final int EXCEPTION_RELOGIN=0x8040;//用户重登陆
    public static final int RELOGIN_SUCCESS=0x8041;//用户重登陆成功
    /********************
     * 预览回调函数
     *********************/
ard-work/src/main/java/com/ruoyi/device/hiksdk/service/IHikClientService.java
@@ -15,17 +15,12 @@
 * @Version: 1.0
 **/
public interface IHikClientService {
    //sdk初始化
    boolean init();
    //同步登录
    void syncLogin(ArdCameras cameras);
    void login(ArdCameras cameras);
    //异步登录
    void asyncLogin(ArdCameras cameras);
    //登录所有相机
    void loginAll();
    //注销
    boolean logout(String cameraId);
ard-work/src/main/java/com/ruoyi/device/hiksdk/service/impl/HikClientServiceImpl.java
@@ -3,6 +3,7 @@
import com.ruoyi.alarm.global.domain.GuidePriorityQueue;
import com.ruoyi.alarm.global.domain.GuideTask;
import com.ruoyi.common.annotation.SdkOperate;
import com.ruoyi.common.utils.Threads;
import com.ruoyi.common.utils.file.FileUtils;
import com.ruoyi.common.utils.file.MimeTypeUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
@@ -12,6 +13,8 @@
import com.ruoyi.device.channel.service.IArdChannelService;
import com.ruoyi.device.hiksdk.common.GlobalVariable;
import com.ruoyi.device.camera.domain.ArdCameras;
import com.ruoyi.device.hiksdk.sdk.ExceptionCallBack;
import com.ruoyi.device.camera.service.impl.AsyncLogin;
import com.ruoyi.media.domain.Vtdu;
import com.ruoyi.media.service.IVtduService;
import com.ruoyi.utils.gis.GisUtil;
@@ -19,13 +22,11 @@
import com.ruoyi.device.hiksdk.service.IHikClientService;
import com.ruoyi.device.hiksdk.sdk.LoginResultCallBack;
import com.ruoyi.utils.minio.MinioUtil;
import com.sun.jna.Native;
import com.sun.jna.NativeLong;
import com.sun.jna.Platform;
import com.sun.jna.Pointer;
import com.sun.jna.ptr.IntByReference;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import java.util.Base64;
@@ -56,53 +57,11 @@
    private IArdChannelService ardChannelService;
    @Resource
    private IVtduService vtduService;
    private final Object lock = new Object();
    public static HCNetSDK hCNetSDK = HCNetSDK.hCNetSDK;
    private static FExceptionCallBack fExceptionCallBack;//异常回调
    private static HCNetSDK hCNetSDK;
    @Override
    public boolean init() {
        try {
            log.debug("开始加载sdk库文件路径");
            if (Platform.isWindows()) {
                String WIN_PATH = System.getProperty("user.dir") + File.separator + "lib\\hikDll\\HCNetSDK.dll";
                log.debug("当前Windows平台的sdk库路径:" + WIN_PATH);
                hCNetSDK = (HCNetSDK) Native.loadLibrary(WIN_PATH, HCNetSDK.class);
            } else {
                log.debug("Linux平台");
                String LINUX_PATH = System.getProperty("user.dir") + File.separator + "hiklib" + File.separator + "libhcnetsdk.so";
                log.debug("当前Linux平台的sdk库路径:" + LINUX_PATH);
                hCNetSDK = (HCNetSDK) Native.loadLibrary(LINUX_PATH, HCNetSDK.class);
                //设置HCNetSDKCom组件库所在路径
                //libhcnetsdk.so
                String strPathCom = "/home/hiklib";
                NET_DVR_LOCAL_SDK_PATH struComPath = new NET_DVR_LOCAL_SDK_PATH();
                System.arraycopy(strPathCom.getBytes(), 0, struComPath.sPath, 0, strPathCom.length());
                struComPath.write();
                hCNetSDK.NET_DVR_SetSDKInitCfg(2, struComPath.getPointer());
                //设置libcrypto.so所在路径
                BYTE_ARRAY ptrByteArrayCrypto = new BYTE_ARRAY(256);
                String strPathCrypto = "/home/hiklib/libcrypto.so.1.1";
                System.arraycopy(strPathCrypto.getBytes(), 0, ptrByteArrayCrypto.byValue, 0, strPathCrypto.length());
                ptrByteArrayCrypto.write();
                hCNetSDK.NET_DVR_SetSDKInitCfg(3, ptrByteArrayCrypto.getPointer());
                //设置libssl.so所在路径
                BYTE_ARRAY ptrByteArraySsl = new BYTE_ARRAY(256);
                String strPathSsl = "/home/hiklib/libssl.so.1.1";
                System.arraycopy(strPathSsl.getBytes(), 0, ptrByteArraySsl.byValue, 0, strPathSsl.length());
                ptrByteArraySsl.write();
                hCNetSDK.NET_DVR_SetSDKInitCfg(4, ptrByteArraySsl.getPointer());
            }
            return true;
        } catch (Exception ex) {
            log.error("加载库文件异常:" + ex.getMessage());
            return false;
        }
    }
    @Override
    /**
     * @描述 注册登录 只支持同步登陆,且官方不建议直接在此接口下写耗时操作
     * @参数 [dvrLogin]
@@ -111,8 +70,9 @@
     * @创建时间 2023/1/17 16:12
     * @修改人和其它信息
     */
    @Async
    public void syncLogin(ArdCameras camera) {
    @Override
    public void login(ArdCameras camera) {
        try {
        // 初始化
        if (!hCNetSDK.NET_DVR_Init()) {
            log.error("SDK初始化失败");
@@ -130,7 +90,7 @@
        short m_sPort = camera.getPort().shortValue();
        //设置连接时间与重连时间
        hCNetSDK.NET_DVR_SetConnectTime(2000, 1);
        hCNetSDK.NET_DVR_SetReconnect(100000, true);
            hCNetSDK.NET_DVR_SetReconnect(5000, true);
        //设备信息, 输出参数
        HCNetSDK.NET_DVR_DEVICEINFO_V40 m_strDeviceInfo = new HCNetSDK.NET_DVR_DEVICEINFO_V40();
        HCNetSDK.NET_DVR_USER_LOGIN_INFO m_strLoginInfo = new HCNetSDK.NET_DVR_USER_LOGIN_INFO();
@@ -151,14 +111,24 @@
        //同步登录
        int lUserID = hCNetSDK.NET_DVR_Login_V40(m_strLoginInfo, m_strDeviceInfo);
        if (lUserID < 0) {
            int errorCode = hCNetSDK.NET_DVR_GetLastError();
            log.error("登录异常:" + errorCode);
            log.debug(camera.getIp() + ":" + camera.getPort() + "登录失败");
                log.debug("Login Failed [ " + camera.getIp() + ":" + camera.getPort() + " ],错误码:" + hCNetSDK.NET_DVR_GetLastError());
            camera.setChanNum(0);
            camera.setLoginId(-1);
            camera.setState("0");
                return;
            }
            synchronized (lock) {
                log.debug("Login Success [ " + camera.getIp() + ":" + camera.getPort() + " ]");
                if (fExceptionCallBack == null) {
                    fExceptionCallBack = new ExceptionCallBack();//异常回调
                    //设置异常回调函数(可在回调函数中获取设备上下线状态等)
                    if (!hCNetSDK.NET_DVR_SetExceptionCallBack_V30(0, 0, fExceptionCallBack, null)) {
                        log.debug("Set fExceptionCallBack function fail");
                        return;
        } else {
                        log.debug("Set fExceptionCallBack function successfully!");
                    }
                }
            if (GlobalVariable.loginMap.containsKey(camera.getId())) {
                GlobalVariable.loginMap.remove(camera.getId());
@@ -166,7 +136,8 @@
            //删除管理通道
            ardChannelService.deleteArdChannelByDeviceId(camera.getId());
            GlobalVariable.loginMap.put(camera.getId(), lUserID);
            log.debug(camera.getIp() + ":" + camera.getPort() + "登录成功");
                GlobalVariable.loginCameraMap.put(lUserID, camera);
            camera.setLoginId(lUserID);
            camera.setState("1");
@@ -210,6 +181,10 @@
                GuidePriorityQueue.cameraQueueMap.put(camera.getId(), priorityQueue);
            }
            ardCamerasService.updateArdCameras(camera);
            }
        } catch (Exception ex) {
            log.error("注册设备异常", ex);
        }
    }
@@ -268,30 +243,6 @@
    }
    /**
     * @描述 登录所有相机
     * @参数 []
     * @返回值 void
     * @创建人 刘苏义
     * @创建时间 2023/2/3 10:10
     * @修改人和其它信息
     */
    @Override
    public void loginAll() {
        try {
            log.debug("加载lib完成!");
            ArdCameras ardCamera = new ArdCameras();
            ardCamera.setFactory("1");
            List<ArdCameras> ardCameras = ardCamerasService.selectArdCamerasListNoDataScope(ardCamera);
            for (ArdCameras camera : ardCameras) {
                Thread.sleep(500);
                //异步登录
                syncLogin(camera);
            }
        } catch (Exception ex) {
            log.error("初始化登录相机异常:" + ex.getMessage());
        }
    }
    /**
     * @描述 注销登录
@@ -345,6 +296,7 @@
     * @修改人和其它信息
     */
    @Override
    @SdkOperate
    public boolean pTZControlWithSpeed(CameraCmd cmd) {
        String cameraId = cmd.getCameraId();
        boolean enable = cmd.isEnable();
@@ -897,7 +849,6 @@
            log.error("控制失败,请稍后重试" + code);
            return new HashMap<>();
        }
    }
    /**
@@ -1096,7 +1047,6 @@
     * @修改人和其它信息
     */
    @Override
    @SdkOperate
    public boolean controlDefogcfg(CameraCmd cmd) {
        String cameraId = cmd.getCameraId();
        boolean enable = cmd.isEnable();
@@ -1142,7 +1092,6 @@
     * @修改人和其它信息
     */
    @Override
    @SdkOperate
    public boolean controlInfrarecfg(CameraCmd cmd) {
        String cameraId = cmd.getCameraId();
        boolean enable = cmd.isEnable();
@@ -1190,7 +1139,6 @@
     * @修改人和其它信息
     */
    @Override
    @SdkOperate
    public boolean controlFocusMode(CameraCmd cmd) {
        String cameraId = cmd.getCameraId();
        boolean enable = cmd.isEnable();
@@ -1263,7 +1211,6 @@
     * @修改人和其它信息
     */
    @Override
    @SdkOperate
    public boolean controlPTHeateRpwron(CameraCmd cmd) {
        String cameraId = cmd.getCameraId();
        boolean enable = cmd.isEnable();
@@ -1296,7 +1243,6 @@
     * @修改人和其它信息
     */
    @Override
    @SdkOperate
    public boolean controlCameraDeicing(CameraCmd cmd) {
        String cameraId = cmd.getCameraId();
        boolean enable = cmd.isEnable();
@@ -1377,7 +1323,6 @@
     * @修改人和其它信息
     */
    @Override
    @SdkOperate
    public String picCutCate(CameraCmd cmd) {
        String cameraId = cmd.getCameraId();
        Integer channelNum = cmd.getChanNo();
ard-work/src/main/java/com/ruoyi/inspect/service/impl/ArdVideoInspectTaskServiceImpl.java
@@ -184,6 +184,7 @@
            for (ArdVideoInspectTaskStep ardVideoInspectTaskStep : ardVideoInspectTaskStepList) {
                if (ardVideoInspectTaskStep.getId() == null) {
                    //新的步骤,添加
                    ardVideoInspectTaskStep.setId(IdUtils.simpleUUID());
                    ardVideoInspectTaskStepMapper.insertArdVideoInspectTaskStep(ardVideoInspectTaskStep);
                } else {
                    //已有步骤,更新
ard-work/src/main/java/com/ruoyi/media/service/impl/MediaServiceImpl.java
@@ -2,6 +2,7 @@
import com.alibaba.fastjson2.JSONObject;
import com.dtflys.forest.exceptions.ForestNetworkException;
import com.dtflys.forest.exceptions.ForestRuntimeException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.media.domain.*;
import com.ruoyi.media.service.IMediaService;
@@ -25,7 +26,7 @@
 * @Version: 1.0
 **/
@Service
@Slf4j(topic = "cmd")
@Slf4j(topic = "vtdu")
@Order(2)
public class MediaServiceImpl implements IMediaService {
@@ -47,7 +48,8 @@
     */
    @Override
    public Map<String, String> addPath(String name, String sourceUrl, String mode, String isCode) {
        Map<String, String> map = new HashMap<>();
        try {
        String rtspUrl = "rtsp://" + mediamtxHost + ":8554/" + name;
        String rtmpUrl = "rtmp://" + mediamtxHost + ":1935/" + name;
        String webrtcUrl = "http://" + mediamtxHost + ":8889/" + name;
@@ -74,10 +76,13 @@
        if (!checkNameExist(name)) {
            mediaClient.addPath(name, conf);
        }
        Map<String, String> map = new HashMap<>();
        map.put("rtspUrl", rtspUrl);
        map.put("rtmpUrl", rtmpUrl);
        map.put("webrtcUrl", webrtcUrl);
        } catch (ForestRuntimeException ex) {
           log.error("添加流媒体异常:"+ex.getMessage());
        }
        return map;
    }
@@ -118,8 +123,8 @@
            map.put("rtspUrl", rtspUrl);
            map.put("rtmpUrl", rtmpUrl);
            map.put("webrtcUrl", webrtcUrl);
        } catch (ForestNetworkException ex) {
            log.error(ex.getMessage());
        } catch (ForestRuntimeException ex) {
            log.error("修改流媒体异常:"+ex.getMessage());
        }
        return map;
    }
@@ -158,8 +163,12 @@
    @Override
    public void removePath(String name) {
        try {
        if (checkNameExist(name)) {
            mediaClient.removePath(name);
            }
        } catch (ForestRuntimeException ex) {
            log.error("移除流媒体异常:"+ex.getMessage());
        }
    }
@@ -447,12 +456,19 @@
    @Override
    public List<String> getNameList() {
        List<String> nameList = new ArrayList<>();
        try {
        String paths = mediaClient.paths();
        JsonsRoot jsonsRoot = JSONObject.parseObject(paths, JsonsRoot.class);
        List<Items> items = jsonsRoot.getItems();
        for (Items item : items) {
            nameList.add(item.getName());
        }
        }catch (ForestNetworkException ex) {
            log.error("获取流媒体name列表异常:"+ex.getMessage());
        }
        catch (ForestRuntimeException ex) {
            log.error("获取流媒体name列表异常:"+ex.getMessage());
        }
        return nameList;
    }
ard-work/src/main/java/com/ruoyi/media/service/impl/VtduServiceImpl.java
@@ -20,7 +20,7 @@
 * @date 2023-08-29
 */
@Service
@Slf4j(topic = "sdk")
@Slf4j(topic = "vtdu")
public class VtduServiceImpl implements IVtduService {
    @Resource
    private VtduMapper vtduMapper;
@@ -117,8 +117,8 @@
     */
    @Override
    public int deleteVtduByName(String name) {
        log.debug("流媒体【" + name + "】通道删除");
        mediaService.removePath(name);
        log.debug("流媒体【" + name + "】通道删除");
        return vtduMapper.deleteVtduByName(name);
    }
ard-work/src/main/java/com/ruoyi/utils/forest/MediaClient.java
@@ -17,7 +17,7 @@
    /**
     * 增加路径
     */
    @Post(url = "/config/paths/add/{name}")
    @Post(url = "/config/paths/add/{name}",async = true)
    public String addPath(@Var("name") String name, @JSONBody Conf body);
    /**
ard-work/src/main/resources/dynamic-lib-load.xml
@@ -10,6 +10,41 @@
        <lib>Infra</lib>
        <lib>IvsDrawer</lib>
        <lib>StreamConvertor</lib>
        <lib>HCNetSDK</lib>
        <lib>HCCore</lib>
        <lib>GdiPlus</lib>
        <lib>hlog</lib>
        <lib>HmMerge</lib>
        <lib>hpr</lib>
        <lib>HXVA</lib>
        <lib>libcrypto-1_1-x64</lib>
        <lib>libmmd</lib>
        <lib>libssl-1_1-x64</lib>
        <lib>MP_Render</lib>
        <lib>NPQos</lib>
        <lib>OpenAL32</lib>
        <lib>PlayCtrl</lib>
        <lib>SuperRender</lib>
        <lib>YUVProcess</lib>
        <lib>zlib1</lib>
        <lib>HCNetSDKCom/AnalyzeData</lib>
        <lib>HCNetSDKCom/AudioIntercom</lib>
        <lib>HCNetSDKCom/AudioRender</lib>
        <lib>HCNetSDKCom/HCAlarm</lib>
        <lib>HCNetSDKCom/HCCoreDevCfg</lib>
        <lib>HCNetSDKCom/HCDisplay</lib>
        <lib>HCNetSDKCom/HCGeneralCfgMgr</lib>
        <lib>HCNetSDKCom/HCGeneralCfgMgr</lib>
        <lib>HCNetSDKCom/HCIndustry</lib>
        <lib>HCNetSDKCom/HCPlayBack</lib>
        <lib>HCNetSDKCom/HCPreview</lib>
        <lib>HCNetSDKCom/HCVoiceTalk</lib>
        <lib>HCNetSDKCom/libiconv2</lib>
        <lib>HCNetSDKCom/OpenAL32</lib>
        <lib>HCNetSDKCom/StreamTransClient</lib>
        <lib>HCNetSDKCom/SystemTransform</lib>
    </win64>
    <win32>
        <lib>avnetsdk</lib>
ard-work/src/main/resources/lib/win64/AudioRender.dll
Binary files differ
ard-work/src/main/resources/lib/win64/GdiPlus.dll
Binary files differ
ard-work/src/main/resources/lib/win64/HCCore.dll
Binary files differ
ard-work/src/main/resources/lib/win64/HCNetSDK.dll
Binary files differ
ard-work/src/main/resources/lib/win64/HCNetSDKCom/AnalyzeData.dll
Binary files differ
ard-work/src/main/resources/lib/win64/HCNetSDKCom/AudioIntercom.dll
Binary files differ
ard-work/src/main/resources/lib/win64/HCNetSDKCom/AudioRender.dll
Binary files differ
ard-work/src/main/resources/lib/win64/HCNetSDKCom/HCAlarm.dll
Binary files differ
ard-work/src/main/resources/lib/win64/HCNetSDKCom/HCAlarm.lib
Binary files differ
ard-work/src/main/resources/lib/win64/HCNetSDKCom/HCCoreDevCfg.dll
Binary files differ
ard-work/src/main/resources/lib/win64/HCNetSDKCom/HCDisplay.dll
Binary files differ
ard-work/src/main/resources/lib/win64/HCNetSDKCom/HCGeneralCfgMgr.dll
Binary files differ
ard-work/src/main/resources/lib/win64/HCNetSDKCom/HCGeneralCfgMgr.lib
Binary files differ
ard-work/src/main/resources/lib/win64/HCNetSDKCom/HCIndustry.dll
Binary files differ
ard-work/src/main/resources/lib/win64/HCNetSDKCom/HCPlayBack.dll
Binary files differ
ard-work/src/main/resources/lib/win64/HCNetSDKCom/HCPreview.dll
Binary files differ
ard-work/src/main/resources/lib/win64/HCNetSDKCom/HCPreview.lib
Binary files differ
ard-work/src/main/resources/lib/win64/HCNetSDKCom/HCVoiceTalk.dll
Binary files differ
ard-work/src/main/resources/lib/win64/HCNetSDKCom/OpenAL32.dll
Binary files differ
ard-work/src/main/resources/lib/win64/HCNetSDKCom/StreamTransClient.dll
Binary files differ
ard-work/src/main/resources/lib/win64/HCNetSDKCom/SystemTransform.dll
Binary files differ
ard-work/src/main/resources/lib/win64/HCNetSDKCom/libiconv2.dll
Binary files differ
ard-work/src/main/resources/lib/win64/HXVA.dll
Binary files differ
ard-work/src/main/resources/lib/win64/HmMerge.dll
Binary files differ
ard-work/src/main/resources/lib/win64/ImageAlg.dll
Binary files differ
ard-work/src/main/resources/lib/win64/Infra.dll
Binary files differ
ard-work/src/main/resources/lib/win64/IvsDrawer.dll
Binary files differ
ard-work/src/main/resources/lib/win64/MP_Render.dll
Binary files differ
ard-work/src/main/resources/lib/win64/NPQos.dll
Binary files differ
ard-work/src/main/resources/lib/win64/OpenAL32.dll
copy from lib/hikDll/HCNetSDKCom/OpenAL32.dll copy to ard-work/src/main/resources/lib/win64/OpenAL32.dll Binary files differ
ard-work/src/main/resources/lib/win64/PlayCtrl.dll
Binary files differ
ard-work/src/main/resources/lib/win64/RenderEngine.dll
Binary files differ
ard-work/src/main/resources/lib/win64/StreamConvertor.dll
Binary files differ
ard-work/src/main/resources/lib/win64/SuperRender.dll
Binary files differ
ard-work/src/main/resources/lib/win64/YUVProcess.dll
Binary files differ
ard-work/src/main/resources/lib/win64/avnetsdk.dll
Binary files differ
ard-work/src/main/resources/lib/win64/dhconfigsdk.dll
Binary files differ
ard-work/src/main/resources/lib/win64/dhnetsdk.dll
Binary files differ
ard-work/src/main/resources/lib/win64/dhplay.dll
Binary files differ
ard-work/src/main/resources/lib/win64/hlog.dll
Binary files differ
ard-work/src/main/resources/lib/win64/hpr.dll
Binary files differ
ard-work/src/main/resources/lib/win64/libcrypto-1_1-x64.dll
Binary files differ
ard-work/src/main/resources/lib/win64/libmmd.dll
Binary files differ
ard-work/src/main/resources/lib/win64/libssl-1_1-x64.dll
Binary files differ
ard-work/src/main/resources/lib/win64/zlib1.dll
Binary files differ
lib/hikDll/ClientDemoDll/ReadMe.txt
File was deleted
lib/hikDll/ClientDemoDll/calib.dll
Binary files differ
lib/hikDll/ClientDemoDll/iconv.dll
Binary files differ
lib/hikDll/ClientDemoDll/libcrypto-1_1-x64.dll
Binary files differ
lib/hikDll/ClientDemoDll/libssl-1_1-x64.dll
Binary files differ
lib/hikDll/ClientDemoDll/libxml2.dll
Binary files differ
lib/hikDll/ClientDemoDll/zlib1.dll
Binary files differ
lib/hikDll/OpenAL32.dll
Binary files differ
pom.xml
ruoyi-admin/pom.xml
@@ -79,22 +79,22 @@
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <!-- 依赖包输出目录,将来不打进jar包里 -->
                            <outputDirectory>${project.build.directory}/jarLib</outputDirectory>
                            <excludeTransitive>false</excludeTransitive>
                            <stripVersion>false</stripVersion>
                            <includeScope>runtime</includeScope>
                        </configuration>
                    </execution>
                </executions>
<!--                <executions>-->
<!--                    <execution>-->
<!--                        <id>copy-dependencies</id>-->
<!--                        <phase>package</phase>-->
<!--                        <goals>-->
<!--                            <goal>copy-dependencies</goal>-->
<!--                        </goals>-->
<!--                        <configuration>-->
<!--                            &lt;!&ndash; 依赖包输出目录,将来不打进jar包里 &ndash;&gt;-->
<!--                            <outputDirectory>${project.build.directory}/jarLib</outputDirectory>-->
<!--                            <excludeTransitive>false</excludeTransitive>-->
<!--                            <stripVersion>false</stripVersion>-->
<!--                            <includeScope>runtime</includeScope>-->
<!--                        </configuration>-->
<!--                    </execution>-->
<!--                </executions>-->
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
@@ -102,14 +102,14 @@
                <version>2.1.1.RELEASE</version>
                <configuration>
                    <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
                    <mainClass>com.ruoyi.RuoYiApplication</mainClass>
                    <layout>ZIP</layout>
                    <includes>
                        <include>
                            <groupId>nothing</groupId>
                            <artifactId>nothing</artifactId>
                        </include>
                    </includes>
<!--                    <mainClass>com.ruoyi.RuoYiApplication</mainClass>-->
<!--                    <layout>ZIP</layout>-->
<!--                    <includes>-->
<!--                        <include>-->
<!--                            <groupId>nothing</groupId>-->
<!--                            <artifactId>nothing</artifactId>-->
<!--                        </include>-->
<!--                    </includes>-->
                </configuration>
                <executions>
                    <execution>
ruoyi-admin/src/main/resources/application-dev.yml
@@ -44,7 +44,7 @@
  level:
    authorize: info
    minio: info
    hikSdk: info
    hikSdk: debug
    dhSdk: debug
    stealAlarm: info
    websocket: info
ruoyi-admin/src/main/resources/logback.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <!-- 日志存放路径 -->
    <property name="log.path" value="./ardLog/logs"/>
    <property name="log.path" value="./log"/>
    <!-- 日志输出格式 -->
    <property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
@@ -250,6 +250,19 @@
            <pattern>${log.pattern}</pattern>
        </encoder>
    </appender>
    <!--流媒体日志输出-->
    <appender name="vtdu" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${log.path}/vtdu.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <!--按天回滚daily-->
            <fileNamePattern>${log.path}/vtdu.%d{yyyy-MM-dd}.log</fileNamePattern>
            <!--日志最大的历史60天-->
            <maxHistory>60</maxHistory>
        </rollingPolicy>
        <encoder>
            <pattern>${log.pattern}</pattern>
        </encoder>
    </appender>
    <!-- 系统模块日志级别控制  -->
    <logger name="com.ruoyi" level="info"/>
    <!-- Spring日志级别控制  -->
@@ -299,6 +312,10 @@
    <logger name="sy" level="INFO">
        <appender-ref ref="sy"/>
    </logger>
    <!--vtdu日志-->
    <logger name="vtdu" level="INFO">
        <appender-ref ref="vtdu"/>
    </logger>
    <!--rongCloud日志-->
    <logger name="rongCloud" level="INFO">
        <appender-ref ref="rongCloud"/>
server/mediamtx/LICENSE
server/mediamtx/ffmpeg.exe
Binary files differ
server/mediamtx/mediamtx.exe
Binary files differ
server/mediamtx/mediamtx.yml
File was renamed from lib/mediamtx/mediamtx.yml
@@ -44,17 +44,17 @@
# Enable the HTTP API.
api: yes
# Address of the API listener.
apiAddress: 112.98.126.2:9997
apiAddress: 127.0.0.1:9997
# Enable Prometheus-compatible metrics.
metrics: no
# Address of the metrics listener.
metricsAddress: 112.98.126.2:9998
metricsAddress: 127.0.0.1:9998
# Enable pprof-compatible endpoint to monitor performances.
pprof: no
# Address of the pprof listener.
pprofAddress: 112.98.126.2:9999
pprofAddress: 127.0.0.1:9999
# Command to run when a client connects to the server.
# This is terminated with SIGINT when a client disconnects from the server.
@@ -215,7 +215,7 @@
  # needed when server and clients are on different LANs.
  # TURN/TURNS servers are needed when a direct connection between server and
  # clients is not possible. All traffic is routed through them.
- url: stun:112.98.126.2:3478
- url: stun:127.0.0.1:3478
  # if user is "AUTH_SECRET", then authentication is secret based.
  # the secret must be inserted into the password field.
  username: 'admin'
@@ -225,7 +225,7 @@
webrtcICEInterfaces: []
# List of public IP addresses that are to be used as a host.
# This is used typically for servers that are behind 1:1 D-NAT.
webrtcICEHostNAT1To1IPs: [112.98.126.2]
webrtcICEHostNAT1To1IPs: [127.0.0.1]
# Address of a ICE UDP listener in format host:port.
# If filled, ICE traffic will pass through a single UDP port,
# allowing the deployment of the server inside a container or behind a NAT.
@@ -235,7 +235,7 @@
# allowing the deployment of the server inside a container or behind a NAT.
# Using this setting forces usage of the TCP protocol, which is not
# optimal for WebRTC.
webrtcICETCPMuxAddress: 112.98.126.2:1234
webrtcICETCPMuxAddress: 127.0.0.1:1234
###############################################
# Global settings -> SRT
server/minio/minio.exe
Binary files differ
server/redis/EventLog.dll
Binary files differ
server/redis/Redis on Windows Release Notes.docx
Binary files differ
server/redis/Redis on Windows.docx
Binary files differ
server/redis/Windows Service Documentation.docx
Binary files differ
server/redis/dump.rdb
Binary files differ
server/redis/redis-benchmark.exe
Binary files differ
server/redis/redis-benchmark.pdb
Binary files differ
server/redis/redis-check-aof.exe
Binary files differ
server/redis/redis-check-aof.pdb
Binary files differ
server/redis/redis-cli.exe
Binary files differ
server/redis/redis-cli.pdb
Binary files differ
server/redis/redis-desktop-manager-0.9.3.817.exe
Binary files differ
server/redis/redis-server.exe
Binary files differ
server/redis/redis-server.pdb
Binary files differ
server/redis/redis.windows-service.conf
server/redis/redis.windows.conf
server/webrtc/Procfile
server/webrtc/config.json
server/webrtc/html/Bunny.html
server/webrtc/html/LICENSE
server/webrtc/html/README.md
server/webrtc/html/admin.html
server/webrtc/html/apprtc.html
server/webrtc/html/apprtc.json
server/webrtc/html/help.html
server/webrtc/html/htmlmapmarker.js
server/webrtc/html/index.html
server/webrtc/html/info.png

server/webrtc/html/janusconfig.js
server/webrtc/html/janustest.html
server/webrtc/html/janusvideoroom-element.js
server/webrtc/html/janusvideoroom.html
server/webrtc/html/janusvideoroom.js
server/webrtc/html/jitsi.ico

server/webrtc/html/jitsiroom.html
server/webrtc/html/jitsitest.html
server/webrtc/html/jsdoc/JanusVideoRoom.html
server/webrtc/html/jsdoc/WebRtcStreamer.html
server/webrtc/html/jsdoc/XMPPVideoRoom.html
server/webrtc/html/jsdoc/fonts/OpenSans-Bold-webfont.eot
Binary files differ
server/webrtc/html/jsdoc/fonts/OpenSans-Bold-webfont.svg
server/webrtc/html/jsdoc/fonts/OpenSans-Bold-webfont.woff
Binary files differ
server/webrtc/html/jsdoc/fonts/OpenSans-BoldItalic-webfont.eot
Binary files differ
server/webrtc/html/jsdoc/fonts/OpenSans-BoldItalic-webfont.svg
server/webrtc/html/jsdoc/fonts/OpenSans-BoldItalic-webfont.woff
Binary files differ
server/webrtc/html/jsdoc/fonts/OpenSans-Italic-webfont.eot
Binary files differ
server/webrtc/html/jsdoc/fonts/OpenSans-Italic-webfont.svg
server/webrtc/html/jsdoc/fonts/OpenSans-Italic-webfont.woff
Binary files differ
server/webrtc/html/jsdoc/fonts/OpenSans-Light-webfont.eot
Binary files differ
server/webrtc/html/jsdoc/fonts/OpenSans-Light-webfont.svg
server/webrtc/html/jsdoc/fonts/OpenSans-Light-webfont.woff
Binary files differ
server/webrtc/html/jsdoc/fonts/OpenSans-LightItalic-webfont.eot
Binary files differ
server/webrtc/html/jsdoc/fonts/OpenSans-LightItalic-webfont.svg
server/webrtc/html/jsdoc/fonts/OpenSans-LightItalic-webfont.woff
Binary files differ
server/webrtc/html/jsdoc/fonts/OpenSans-Regular-webfont.eot
Binary files differ
server/webrtc/html/jsdoc/fonts/OpenSans-Regular-webfont.svg
server/webrtc/html/jsdoc/fonts/OpenSans-Regular-webfont.woff
Binary files differ
server/webrtc/html/jsdoc/index.html
server/webrtc/html/jsdoc/janusvideoroom.js.html
server/webrtc/html/jsdoc/scripts/linenumber.js
server/webrtc/html/jsdoc/scripts/prettify/Apache-License-2.0.txt
server/webrtc/html/jsdoc/scripts/prettify/lang-css.js
server/webrtc/html/jsdoc/scripts/prettify/prettify.js
server/webrtc/html/jsdoc/styles/jsdoc-default.css
server/webrtc/html/jsdoc/styles/prettify-jsdoc.css
server/webrtc/html/jsdoc/styles/prettify-tomorrow.css
server/webrtc/html/jsdoc/webrtcstreamer.js.html
server/webrtc/html/jsdoc/xmppvideoroom.js.html
server/webrtc/html/libs/EventEmitter.min.js
server/webrtc/html/libs/adapter.min.js
server/webrtc/html/libs/ag-grid.min.js
server/webrtc/html/libs/blazeface
server/webrtc/html/libs/body-pix
server/webrtc/html/libs/coco-ssd
server/webrtc/html/libs/deeplab
server/webrtc/html/libs/jquery-3.5.1.min.js
server/webrtc/html/libs/lib-jitsi-meet.min.js
server/webrtc/html/libs/posenet
server/webrtc/html/libs/strophe.disco.min.js
server/webrtc/html/libs/strophe.jingle.sdp.js
server/webrtc/html/libs/strophe.min.js
server/webrtc/html/libs/strophe.muc.min.js
server/webrtc/html/libs/tf-backend-wasm.js
server/webrtc/html/libs/tfjs
server/webrtc/html/libs/tfjs-backend-wasm-simd.wasm
Binary files differ
server/webrtc/html/libs/tfjs-backend-wasm.wasm
Binary files differ
server/webrtc/html/libs/whep-video.component.js
server/webrtc/html/map.html
server/webrtc/html/nav.css
server/webrtc/html/sendstream.html
server/webrtc/html/styles.css
server/webrtc/html/tensorflow.js
server/webrtc/html/webrtc-streamer-algo-element.js
server/webrtc/html/webrtc-streamer-element.html
server/webrtc/html/webrtc-streamer-element.js
server/webrtc/html/webrtc-streamer-footer-element.js
server/webrtc/html/webrtc-streamer-menu-element.js
server/webrtc/html/webrtc-streamer-options-element.js
server/webrtc/html/webrtc-streamer-selector-element.js
server/webrtc/html/webrtc-streamer.html
server/webrtc/html/webrtc.png

server/webrtc/html/webrtcconfig.js
server/webrtc/html/webrtcstreamer.html
server/webrtc/html/webrtcstreamer.js
server/webrtc/html/whep.html
server/webrtc/html/xmppconfig.js
server/webrtc/html/xmppvideoroom.html
server/webrtc/html/xmppvideoroom.js
server/webrtc/webrtc-streamer.exe
Binary files differ