Commit 1c4c7d18 by 鲁志-悦动

Replay设置入点、出点,发送开始、结束、重新开始

parent 7ab98695
......@@ -8,6 +8,22 @@
public string type { get; set; }
/// <summary>
/// 开始时间戳
/// </summary>
public long start_time { get; set; }
/// <summary>
/// 结束时间戳
/// </summary>
public long end_time { get; set; }
/// <summary>
/// 是否开始或者停止或者重新开始
/// 开始1 结束0 重新开始2
/// </summary>
public int status { get; set; }
/// <summary>
/// 数据
/// </summary>
public VideoData data { get; set; }
......
......@@ -2,9 +2,19 @@
{
public class SaveMatImagePackage
{
/// <summary>
/// 类型
/// </summary>
public string type { get;set; }
/// <summary>
/// 开始时间戳
/// </summary>
public long start_time { get; set; }
/// <summary>
/// 结束时间戳
/// </summary>
public long end_time { get; set;}
}
}
......@@ -14,6 +14,7 @@
/// <summary>
/// 是否开始或者停止
/// 开始1 结束0 重新开始2
/// </summary>
public int status { get; set; }
......
......@@ -222,6 +222,7 @@
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
......@@ -252,6 +253,7 @@
Height="40"
Margin="10"
Content="Replay"
IsChecked="{Binding ReplayIsChecked, Mode=OneWay}"
Style="{StaticResource ToggleButtonStyle}">
<b:Interaction.Triggers>
<b:EventTrigger EventName="Checked">
......@@ -383,10 +385,55 @@
Width="100"
Height="40"
Margin="10"
Command="{Binding Path=InPointCommand}"
Content="In Point"
Style="{StaticResource ButtonStyle}"
Visibility="{Binding ReplaySendVisibility, Mode=TwoWay}" />
<Button
Grid.Row="3"
Grid.Column="2"
Width="100"
Height="40"
Margin="10"
Command="{Binding Path=OutPointCommand}"
Content="Out Point"
Style="{StaticResource ButtonStyle}"
Visibility="{Binding ReplaySendVisibility, Mode=TwoWay}" />
<Button
Grid.Row="3"
Grid.Column="3"
Width="100"
Height="40"
Margin="10"
Command="{Binding Path=ReplaySendCommand}"
Content="Replay Send"
Content="Replay Start"
Style="{StaticResource ButtonStyle}"
Visibility="{Binding ReplaySendVisibility, Mode=TwoWay}" />
<Button
Grid.Row="4"
Grid.Column="2"
Width="100"
Height="40"
Margin="10"
Command="{Binding Path=ReplayReStartCommand}"
Content="Replay Restart"
Style="{StaticResource ButtonStyle}"
Visibility="{Binding ReplaySendVisibility, Mode=TwoWay}" />
<Button
Grid.Row="4"
Grid.Column="3"
Width="100"
Height="40"
Margin="10"
Command="{Binding Path=ReplayStopCommand}"
Content="Replay Stop"
Style="{StaticResource ButtonStyle}"
Visibility="{Binding ReplaySendVisibility, Mode=TwoWay}" />
</Grid>
</WrapPanel>
<local:NDIView
......
......@@ -71,12 +71,21 @@ namespace VIZ.FGOUT.Module
this.ReplayCheckedCommand = new VCommand(this.ReplayChecked);
this.ReplayUncheckedCommand = new VCommand(this.ReplayUnchecked);
this.SliderValueChangedCommand = new VCommand(this.SliderValueChanged);
//Replay Start
this.ReplaySendCommand = new VCommand(this.ReplaySend);
//Replay Stop
this.ReplayStopCommand = new VCommand(this.ReplayStop);
//Replay Restart
this.ReplayReStartCommand = new VCommand(this.ReplayReStart);
//入点
this.InPointCommand = new VCommand(this.InPoint);
//出点
this.OutPointCommand = new VCommand(this.OutPoint);
//UESetting
this.UESettingCommand = new VCommand(this.UESetting);
//UEControl
this.UEControlCommand = new VCommand(this.UEControl);
//ReplaySend
this.ReplaySendCommand = new VCommand(this.ReplaySend);
//算法重启
this.RestartCommand = new VCommand(this.Restart);
//算法关闭
......@@ -510,6 +519,17 @@ namespace VIZ.FGOUT.Module
}
}
private bool _replayIsChecked = false;
public bool ReplayIsChecked
{
get => _replayIsChecked;
set
{
_replayIsChecked = value;
this.RaisePropertyChanged(nameof(ReplayIsChecked));
}
}
public VCommand ReplayCheckedCommand { get; set; }
public VCommand ReplayUncheckedCommand { get; set; }
private void ReplayChecked()
......@@ -528,6 +548,8 @@ namespace VIZ.FGOUT.Module
ReplayModel replayModel = new ReplayModel() { IsReplay = false };
ApplicationDomain.MessageManager.Send(replayModel);
_initialValue = SliderMaxValue;
StartTime = 0;
EndTime = 0;
}
#endregion
......@@ -545,22 +567,129 @@ namespace VIZ.FGOUT.Module
}
}
public VCommand ReplayStopCommand { get; set; }
public VCommand ReplayReStartCommand { get; set; }
public VCommand ReplaySendCommand { get; set; }
private void ReplayReStart()
{
if (StartTime == 0)
{
MessageBoxEx.ShowDialog("请选择入点.");
return;
}
if (EndTime == 0)
{
MessageBoxEx.ShowDialog("请选择出点.");
return;
}
if (EndTime <= StartTime)
{
MessageBoxEx.ShowDialog("出点应大于入点.");
return;
}
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
if (manager == null) return;
ReplayPackage replayPackage = new ReplayPackage();
replayPackage.type = "REPLAY";
replayPackage.start_time = StartTime;
replayPackage.end_time = EndTime;
replayPackage.status = 2;
manager.SendJson(replayPackage);
MessageBoxEx.ShowDialog("Replay Restart OK.");
}
private void ReplayStop()
{
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
if (manager == null) return;
ReplayPackage replayPackage = new ReplayPackage();
replayPackage.type = "REPLAY";
replayPackage.status = 0;
manager.SendJson(replayPackage);
MessageBoxEx.ShowDialog("Replay Stop OK.");
ReplayIsChecked = false;
}
private void ReplaySend()
{
if (StartTime == 0)
{
MessageBoxEx.ShowDialog("请选择入点.");
return;
}
if (EndTime == 0)
{
MessageBoxEx.ShowDialog("请选择出点.");
return;
}
if (EndTime <= StartTime)
{
MessageBoxEx.ShowDialog("出点应大于入点.");
return;
}
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
if (manager == null) return;
ReplayPackage replayPackage = new ReplayPackage();
replayPackage.type = "REPLAY";
VideoData data = new VideoData();
//data.backTimes = Convert.ToInt32(ReplaySecond);
//timecode时间戳
data.timecode = NDIViewModel.ReplayTimeStamp;
data.status = 1;
replayPackage.data = data;
//VideoData data = new VideoData();
////data.backTimes = Convert.ToInt32(ReplaySecond);
////timecode时间戳
//data.timecode = NDIViewModel.ReplayTimeStamp;
//data.status = 1;
//replayPackage.data = data;
replayPackage.start_time = StartTime;
replayPackage.end_time = EndTime;
replayPackage.status = 1;
manager.SendJson(replayPackage);
MessageBoxEx.ShowDialog("Replay Start OK.");
}
public VCommand InPointCommand { get; set; }
private void InPoint()
{
StartTime = NDIViewModel.ReplayTimeStamp;
}
public VCommand OutPointCommand { get; set; }
private void OutPoint()
{
EndTime = NDIViewModel.ReplayTimeStamp;
}
private long _start_time;
/// <summary>
/// 开始时间戳
/// </summary>
public long StartTime
{
get => _start_time;
set
{
_start_time = value;
this.RaisePropertyChanged(nameof(StartTime));
}
}
private long _end_time;
/// <summary>
/// 结束时间戳
/// </summary>
public long EndTime
{
get => _end_time;
set
{
_end_time = value;
this.RaisePropertyChanged(nameof(EndTime));
}
}
#endregion
......
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F0CB3519E538CED13041FB8E895A389830E6ED5349F119CFF8BD51D043BC9E62"
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "1F0CD7ED3A15FF623F56A5882C07D163F927211CFE7FA51430430A23C723B029"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......@@ -58,7 +58,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 393 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 440 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam1;
......@@ -66,7 +66,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 440 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 487 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam2;
......
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F0CB3519E538CED13041FB8E895A389830E6ED5349F119CFF8BD51D043BC9E62"
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "1F0CD7ED3A15FF623F56A5882C07D163F927211CFE7FA51430430A23C723B029"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......@@ -58,7 +58,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 393 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 440 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam1;
......@@ -66,7 +66,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 440 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 487 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam2;
......
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module\obj\x64\Debug\GeneratedInternalTypeHelper.g.cs

FC:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module\NDIMainView\View\NDIMainView.xaml;;
FC:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module\NDIPreviewView\View\NDIPreviewView.xaml;;
......
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