Commit 959fd547 by 鲁志-悦动

Replay时,手动模式下入出点改为按下快捷键S,D的时间,自动模式下入出点默认改为算法发送的时间

parent c04c5134
......@@ -12,9 +12,6 @@ namespace VIZ.FGOUT.Connection
public string play_mat_image_cmd { get; set; }
public string mode { get; set; }
}
}
......@@ -35,6 +35,16 @@
/// <summary>
/// 帧跳到出点位置
/// </summary>
Bottom
Bottom,
/// <summary>
/// In Point
/// </summary>
S,
/// <summary>
/// Out Point
/// </summary>
D
}
}
......@@ -17,5 +17,9 @@
public int SliderValue { get; set; }
public bool IsSliderValueChanged { get; set; }
public long InPointStartTime { get; set; }
public long OutPointEndTime { get; set;}
}
}
......@@ -142,18 +142,18 @@ namespace VIZ.FGOUT.Module
return true;
}
private bool AssembleHotkeyModeCam3(NDIViewHotkeys hotkey)
{
var service = ApplicationDomain.ServiceManager.GetService<INDIViewService>(NDIViewKeys.CAM_3);
if (service == null) return false;
var context = new NDIViewHotkeyContext()
{
hotkey = hotkey
};
service.NDIViewHotkeyMode(context);
return true;
}
//private bool AssembleHotkeyModeCam3(NDIViewHotkeys hotkey)
//{
// var service = ApplicationDomain.ServiceManager.GetService<INDIViewService>(NDIViewKeys.CAM_3);
// if (service == null) return false;
// var context = new NDIViewHotkeyContext()
// {
// hotkey = hotkey
// };
// service.NDIViewHotkeyMode(context);
// return true;
//}
/// <summary>
/// 算法是否处于停止状态
......@@ -210,7 +210,7 @@ namespace VIZ.FGOUT.Module
}
//INDIViewService service = null;
//if (ApplicationDomainEx.LiteDbContext.SetManualConfig.FindAll().FirstOrDefault().IsManual) return false;
//如果不是手动,返回false
var manualConfig = ApplicationDomainEx.LiteDbContext.SetManualConfig.FindAll().FirstOrDefault();
if (manualConfig == null || !manualConfig.IsManual) return false;
......@@ -219,33 +219,34 @@ namespace VIZ.FGOUT.Module
{
//service = ApplicationDomainEx.ServiceManager.GetService<INDIViewService>(NDIViewKeys.CAM_1);
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
AlgorithmPackage__MatCmd algorithmPackage__MatCmd = new AlgorithmPackage__MatCmd();
algorithmPackage__MatCmd.mode = AlgorithmPackageSignal.manual_mode;
algorithmPackage__MatCmd.signal = AlgorithmPackageSignal.matt_start;
log.Info(hotkey+"发送开始命令:" + algorithmPackage__MatCmd.mode+"" + algorithmPackage__MatCmd.signal);
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
AlgorithmSender.MatImageCmd(manager, algorithmPackage__MatCmd);
}
return AssembleHotkeyMode(NDIViewHotkeys.S);
}
if (string.Equals(this.Support.HotkeyConfig.EndCmd, hotkey))
{
//service = ApplicationDomainEx.ServiceManager.GetService<INDIViewService>(NDIViewKeys.CAM_2);
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
AlgorithmPackage__MatCmd algorithmPackage__MatCmd = new AlgorithmPackage__MatCmd();
algorithmPackage__MatCmd.mode = AlgorithmPackageSignal.manual_mode;
algorithmPackage__MatCmd.signal = AlgorithmPackageSignal.matt_end;
log.Info(hotkey + "发送结束命令:" + algorithmPackage__MatCmd.mode + "" + algorithmPackage__MatCmd.signal);
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
AlgorithmSender.MatImageCmd(manager, algorithmPackage__MatCmd);
return AssembleHotkeyMode(NDIViewHotkeys.D);
}
#region 注释的代码
//点击空格实现算法手动模式下的开始、结束抠像
//先实现不兼容S、D的情况
//空格键
......@@ -292,6 +293,8 @@ namespace VIZ.FGOUT.Module
//service.ChangeStrategyMode(context);
#endregion
return true;
}
......
......@@ -779,7 +779,22 @@ namespace VIZ.FGOUT.Module
ReplaySendVisibility = Visibility.Visible;
SliderVisibility = Visibility.Visible;
SliderValue = SliderMaxValue;
var replayModel = new ReplayModel() { IsReplay = true, IsReplayStarted = true};
var replayModel = new ReplayModel();
replayModel.IsReplay = true;
replayModel.IsReplayStarted = true;
//自动模式下,取算法发过来的Start、EndTime
if (isAutoEnable)
{
var config = ApplicationDomainEx.LiteDbContext.AlgorithmSaveMatImage.FindAll().FirstOrDefault();
if (config != null)
{
replayModel.InPointStartTime = config.start;
replayModel.OutPointEndTime = config.end;
}
}
ApplicationDomain.MessageManager.Send(replayModel);
var manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
......
......@@ -350,7 +350,7 @@ namespace VIZ.FGOUT.Module
var y = Convert.ToInt32(startPoint.Y / xy);
//最小距离
double minDistance = 1920;
double minDistance = 3840;
saveInfo = new TrackingBoxInfo();
//当有跟踪框的时候,就不用拖一个出来了
if (NDIViewModel._cam3StaticInfos.Count > 0)
......
......@@ -188,6 +188,12 @@ namespace VIZ.FGOUT.Module
if (view.vm.IsReplayStarted)
{
view.vm.IsReplayStarted = false;
if(view.vm.ReplayInPointStartTime > 0)
StartTime = view.vm.ReplayInPointStartTime;
if(view.vm.ReplayOutPointEndTime > 0)
EndTime = view.vm.ReplayOutPointEndTime;
//if (view.vm.IsSliderValueChanged)
//{
if (buffer.Count > 0)
......
......@@ -395,6 +395,8 @@ namespace VIZ.FGOUT.Module
//滑动条的值
public int SliderValue;
public bool IsSliderValueChanged;
public long ReplayInPointStartTime;
public long ReplayOutPointEndTime;
public bool IsReplay;
public bool IsReplayStarted;
public bool IsStartValue;
......@@ -1582,9 +1584,11 @@ namespace VIZ.FGOUT.Module
// StartTime = ReplayTimeStamp;
//if (context.hotkey.Equals(NDIViewHotkeys.O))
// EndTime = ReplayTimeStamp;
if (context.hotkey.Equals(NDIViewHotkeys.I))
//新增手动模式下S、D快捷键
if (context.hotkey.Equals(NDIViewHotkeys.I) || context.hotkey.Equals(NDIViewHotkeys.S))
IsSliderStartClicked = true;
if (context.hotkey.Equals(NDIViewHotkeys.O))
if (context.hotkey.Equals(NDIViewHotkeys.O) || context.hotkey.Equals(NDIViewHotkeys.D))
IsSliderEndClicked =true;
if (context.hotkey.Equals(NDIViewHotkeys.Delete))
DeletePositionMarker();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment