|
|
|
@ -605,37 +605,37 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
|
{
|
|
|
|
|
string taskCode = DateTime.Now.ToString("yyyyMMddHHmmssffff");
|
|
|
|
|
string fileName = $"{taskCode}.mp4";
|
|
|
|
|
Task.Run(() =>
|
|
|
|
|
{
|
|
|
|
|
var url = $"{_appConfig.videoFilePath}\\可见光\\{fileName}";
|
|
|
|
|
CHCNetSDK.NET_DVR_MakeKeyFrame(m_lUserID, 1);
|
|
|
|
|
if (!CHCNetSDK.NET_DVR_SaveRealData(Scenery_RealHandle, url))
|
|
|
|
|
{
|
|
|
|
|
var str = "可见光通道开启巡检录像失败, error code= " + NET_DVR_GetLastError();
|
|
|
|
|
_log.Info(str);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_log.Info($"可见光通道开启巡检录像成功");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Task.Run(() =>
|
|
|
|
|
{
|
|
|
|
|
var url = $"{_appConfig.videoFilePath}\\热成像\\{fileName}";
|
|
|
|
|
CHCNetSDK.NET_DVR_MakeKeyFrame(m_lUserID, 2);
|
|
|
|
|
if (!CHCNetSDK.NET_DVR_SaveRealData(Thermal_RealHandle, url))
|
|
|
|
|
{
|
|
|
|
|
var str = "热成像通道开启巡检录像失败, error code= " + NET_DVR_GetLastError();
|
|
|
|
|
_log.Info(str);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_log.Info($"热成像通道开启巡检录像成功");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
//Task.Run(() =>
|
|
|
|
|
//{
|
|
|
|
|
// var url = $"{_appConfig.videoFilePath}\\可见光\\{fileName}";
|
|
|
|
|
// CHCNetSDK.NET_DVR_MakeKeyFrame(m_lUserID, 1);
|
|
|
|
|
// if (!CHCNetSDK.NET_DVR_SaveRealData(Scenery_RealHandle, url))
|
|
|
|
|
// {
|
|
|
|
|
// var str = "可见光通道开启巡检录像失败, error code= " + NET_DVR_GetLastError();
|
|
|
|
|
// _log.Info(str);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// _log.Info($"可见光通道开启巡检录像成功");
|
|
|
|
|
// }
|
|
|
|
|
//});
|
|
|
|
|
|
|
|
|
|
//Task.Run(() =>
|
|
|
|
|
//{
|
|
|
|
|
// var url = $"{_appConfig.videoFilePath}\\热成像\\{fileName}";
|
|
|
|
|
// CHCNetSDK.NET_DVR_MakeKeyFrame(m_lUserID, 2);
|
|
|
|
|
// if (!CHCNetSDK.NET_DVR_SaveRealData(Thermal_RealHandle, url))
|
|
|
|
|
// {
|
|
|
|
|
// var str = "热成像通道开启巡检录像失败, error code= " + NET_DVR_GetLastError();
|
|
|
|
|
// _log.Info(str);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// _log.Info($"热成像通道开启巡检录像成功");
|
|
|
|
|
// }
|
|
|
|
|
//});
|
|
|
|
|
|
|
|
|
|
inspModeBusiness.Start(taskCode, fileName);
|
|
|
|
|
}
|
|
|
|
@ -645,33 +645,35 @@ namespace SlnMesnac.WPF.ViewModel
|
|
|
|
|
/// </summary>
|
|
|
|
|
public void Stop_InspMode()
|
|
|
|
|
{
|
|
|
|
|
Task.Run(() =>
|
|
|
|
|
{
|
|
|
|
|
if (!CHCNetSDK.NET_DVR_StopSaveRealData(Scenery_RealHandle))
|
|
|
|
|
{
|
|
|
|
|
var str = "可见光通道关闭巡检录像失败, error code= " + NET_DVR_GetLastError();
|
|
|
|
|
_log.Info(str);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_log.Info($"可见光通道关闭巡检录像成功");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Task.Run(() =>
|
|
|
|
|
{
|
|
|
|
|
if (!CHCNetSDK.NET_DVR_StopSaveRealData(Thermal_RealHandle))
|
|
|
|
|
{
|
|
|
|
|
var str = "热成像通道关闭巡检录像失败, error code= " + NET_DVR_GetLastError();
|
|
|
|
|
_log.Info(str);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_log.Info($"热成像通道关闭巡检录像成功");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
//Task.Run(() =>
|
|
|
|
|
//{
|
|
|
|
|
// if (!CHCNetSDK.NET_DVR_StopSaveRealData(Scenery_RealHandle))
|
|
|
|
|
// {
|
|
|
|
|
// var str = "可见光通道关闭巡检录像失败, error code= " + NET_DVR_GetLastError();
|
|
|
|
|
// _log.Info(str);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// _log.Info($"可见光通道关闭巡检录像成功");
|
|
|
|
|
// }
|
|
|
|
|
//});
|
|
|
|
|
|
|
|
|
|
//Task.Run(() =>
|
|
|
|
|
//{
|
|
|
|
|
// if (!CHCNetSDK.NET_DVR_StopSaveRealData(Thermal_RealHandle))
|
|
|
|
|
// {
|
|
|
|
|
// var str = "热成像通道关闭巡检录像失败, error code= " + NET_DVR_GetLastError();
|
|
|
|
|
// _log.Info(str);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// _log.Info($"热成像通道关闭巡检录像成功");
|
|
|
|
|
// }
|
|
|
|
|
//});
|
|
|
|
|
|
|
|
|
|
inspModeBusiness.Stop();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private int lastTrackMotorAddress = 0;
|
|
|
|
|