houzhongjian
2024-11-14 08b6a55a3a111aaee9842999b85afa60b6d61dc3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package com.iailab.module.data.video.config;
 
import com.iailab.module.data.video.service.CameraService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
 
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
 
/**
 * 摄像头配置文件
 */
@Configuration
public class VideoConfiguration {
 
    @Value("${video.capture-dir}")
    public String captureDir;
 
    @Value("${video.dahua.path.capture-path}")
    public String dhCapturePath;
 
    @Value("${video.dahua.path.model-path}")
    public String dhModelPath;
 
    @Value("${video.hikvision.path.capture-path}")
    public String hkCapturePath;
 
    @Value("${video.hikvision.path.model-path}")
    public String hkModelPath;
 
    @Value("${video.hikvision.pic-size}")
    public String picSize;
 
    @Value("${video.hikvision.pic-quality}")
    public String picQuality;
 
    @Resource
    public CameraService cameraService;
 
    public static String staticDhCapturePath;
 
    public static String staticDhModelPath;
 
    public static String staticHkCapturePath;
 
    public static String staticHkModelPath;
 
    public static String staticPicSize;
 
    public static String staticPicQuality;
 
    public static CameraService staticCameraService;
 
    @PostConstruct
    public void initUrl() {
        staticDhCapturePath = this.captureDir + this.dhCapturePath;
        staticDhModelPath = this.captureDir + this.dhModelPath;
        staticHkCapturePath = this.captureDir + this.hkCapturePath;
        staticHkModelPath = this.captureDir + this.hkModelPath;
        staticPicSize = this.picSize;
        staticPicQuality = this.picQuality;
        staticCameraService = this.cameraService;
    }
}