Commit 43914347 张东亮

1

1 个父辈 e238c076
...@@ -37,15 +37,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -37,15 +37,21 @@ namespace OnlineStore.DeviceLibrary
static string baseDir = ConfigHelper.Config.Get("IPCameraService_HttpServer", "http://localhost:8088"); static string baseDir = ConfigHelper.Config.Get("IPCameraService_HttpServer", "http://localhost:8088");
public static void StartRecord(string camName, string fileName = "") public static void StartRecord(string camName, string fileName = "")
{ {
Task.Factory.StartNew(delegate {
string url = $"{baseDir}/cam/startRecord?camName={camName}&filename={fileName}"; string url = $"{baseDir}/cam/startRecord?camName={camName}&filename={fileName}";
string res = HttpHelper.Get(url); string res = HttpHelper.Get(url);
LogUtil.info($"开始记录视频:{fileName},{res}"); LogUtil.info($"开始记录视频:{fileName},{res}");
});
} }
public static void StopRecord(string camName) public static void StopRecord(string camName)
{ {
Task.Factory.StartNew(delegate {
string url = $"{baseDir}/cam/stopRecord?camName={camName}"; string url = $"{baseDir}/cam/stopRecord?camName={camName}";
string res = HttpHelper.Get(url); string res = HttpHelper.Get(url);
LogUtil.info($"停止记录视频:{res}"); LogUtil.info($"停止记录视频:{res}");
});
} }
//判断服务是否存在 //判断服务是否存在
static bool IsServiceExisted(string serviceName) static bool IsServiceExisted(string serviceName)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!