|
|
@ -13,6 +13,7 @@ using System.Collections.Generic; |
|
|
|
using System.IO.Ports; |
|
|
|
using System.Linq; |
|
|
|
using System.Text.RegularExpressions; |
|
|
|
using System.Threading; |
|
|
|
using System.Windows; |
|
|
|
using System.Windows.Controls; |
|
|
|
using System.Windows.Input; |
|
|
@ -326,6 +327,14 @@ public partial class Main : UserControl |
|
|
|
if (cameraSdk == null) { LogUnit.Error(this, $"CameraSdk(cameraId:{cameraId}) not found."); return; } |
|
|
|
if (realPlay) Dispatcher.Invoke(() => ShowLiveVideo(cameraSdk)); |
|
|
|
|
|
|
|
// TODO: 设计 PriorityQueue
|
|
|
|
int len = cameraLinkage.PresetIds.Length; |
|
|
|
for (int i = 0; i < len; i++) |
|
|
|
{ |
|
|
|
int presetId = cameraLinkage.PresetIds[i]; |
|
|
|
PtzCameraCmd.PtzMove(cameraSdk, PtzCmdType.PresetGoto, new int[] { presetId }); |
|
|
|
if (i != len) Thread.Sleep(5000); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public void ShowLiveVideo(string cameraIp) |
|
|
|