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