|
|
@@ -104,6 +104,8 @@ func getSupportedCameraCount(ctx context.Context, req *jsonrpc2.Request) *jsonrp
|
|
|
cameraMutex.Lock()
|
|
|
defer cameraMutex.Unlock()
|
|
|
|
|
|
+ baseapp.Logger.Infof("查找相机(%s), 请稍微...", strings.ToUpper(cameraType))
|
|
|
+
|
|
|
switch strings.ToLower(cameraType) {
|
|
|
case "all":
|
|
|
count = camera.GetSupportedCameraCount()
|
|
|
@@ -111,10 +113,10 @@ func getSupportedCameraCount(ctx context.Context, req *jsonrpc2.Request) *jsonrp
|
|
|
count = hk_takephoto.GetHKCameraCount()
|
|
|
case "dh":
|
|
|
count = dh_takephoto.GetDHCameraCount()
|
|
|
- default:
|
|
|
- return jsonrpc2.BuildError(req, -32001, "unsupported camera type")
|
|
|
}
|
|
|
|
|
|
+ baseapp.Logger.Infof("查找结束(%s)", strings.ToUpper(cameraType))
|
|
|
+
|
|
|
return jsonrpc2.BuildResponse(req, strconv.Itoa(count), nil)
|
|
|
}
|
|
|
|