NetMQ 协议,支持摄像头增、删、改

This commit is contained in:
2026-01-12 18:27:58 +08:00
parent 031d4f3416
commit 3f8e42e560
20 changed files with 604 additions and 332 deletions

View File

@@ -55,8 +55,11 @@ public class FileStorageService : IStorageService
await _configLock.WaitAsync();
try
{
var json = JsonSerializer.Serialize(configs, _jsonOptions);
await File.WriteAllTextAsync(_devicesPath, json);
if (SdkGlobal.SaveCameraConfigEnable)
{
var json = JsonSerializer.Serialize(configs, _jsonOptions);
await File.WriteAllTextAsync(_devicesPath, json);
}
}
catch (Exception ex)
{
@@ -72,6 +75,9 @@ public class FileStorageService : IStorageService
await _configLock.WaitAsync();
try
{
if (!SdkGlobal.SaveCameraConfigEnable)
return new List<VideoSourceConfig>();
var json = await File.ReadAllTextAsync(_devicesPath);
if (string.IsNullOrWhiteSpace(json)) return new List<VideoSourceConfig>();