zhangqiankun 2 роки тому
батько
коміт
5f8c4a4ed5

+ 1 - 1
src/main/java/com/persagy/cameractl/conf/CameraApiConfig.java

@@ -26,7 +26,7 @@ public class CameraApiConfig {
 	@Value("${hk-config.decodeDevicePort}")
 	private int decodeDevicePort;
 	
-	@Value("${hk-config.decodeDevicePort:}")
+	@Value("${hk-config.recordLocation:}")
 	private String recordLocation;
 
 	public String getHkApiHost() {

+ 3 - 10
src/main/java/com/persagy/cameractl/service/HkCameraExecuteApi.java

@@ -186,18 +186,11 @@ public class HkCameraExecuteApi {
 					+ hkCamera.bitrate + "&videotype=" + hkCamera.videotype;
 			jsonBody.put("expand", expandStr);
 			String body = jsonBody.toString();
-
+			logger.info("params: {}", body);
 			ResultClass resultClass = SendRequest(reqUrl, body);
-//			return resultClass;
-			// hls格式回放时,直接返回
-//			if (hkCamera.protocol.equals("hls"))
-//				return resultClass;
-			/*
-			 * 如果不是hls格式,那么即为rtsp格式,此时需抓取rtsp流并转成mp4
-			 * */
-			// 调用失败直接返回
-			if (!resultClass.name)
+			if (!resultClass.name) {
 				return resultClass;
+			}
 			String resultDataStr = JsonTools.obj2Str(resultClass.resultData);
 			Map<String, Object> resultDataMap = JsonTools.str2Map(resultDataStr);
 			String videoUrl = String.valueOf(resultDataMap.get("url"));