Commit 50662fa7 by 鲁志-悦动

手动模式下,”刷新位置“按钮不可用 And 输出流支持高清 And 源视频输入没有选择,不弹出“是否重启算法”的框 And…

手动模式下,”刷新位置“按钮不可用 And 输出流支持高清 And 源视频输入没有选择,不弹出“是否重启算法”的框 And NDI设置,算法的“参数设置”用的频率高一些默认选中 And ReplayStart延时2秒给音视频发送指令的延时取消
parent 72f63aa5

C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Common\obj\x64\Debug\GeneratedInternalTypeHelper.g.cs
FC:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Common\Themes\Generic.xaml;;
FC:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Common\Widgets\FootballFieldPanel\FootballFieldPanel.xaml;;
......
......@@ -23,7 +23,7 @@
///// <summary>
///// CAM 4
///// </summary>
//public const string CAM_4 = "CAM_4";
public const string CAM_4 = "CAM_4";
/// <summary>
/// 主视图
......
......@@ -82,6 +82,7 @@
<Trigger Property="IsFocused" Value="True">
<Setter Property="Foreground" Value="White" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="16" />
<!--<Setter TargetName="border" Property="BorderBrush" Value="{StaticResource BorderHighLight}" />-->
</Trigger>
<Trigger Property="IsEnabled" Value="False">
......
......@@ -165,7 +165,7 @@ namespace VIZ.FGOUT.Module
}
//位置标记删除命令
if (string.Equals(this.Support.HotkeyConfig.Delete, hotkey))
if (string.Equals("Ctrl + Z", hotkey) || string.Equals(this.Support.HotkeyConfig.Delete, hotkey))
{
return AssembleHotkeyMode(NDIViewHotkeys.Delete);
}
......@@ -209,26 +209,29 @@ namespace VIZ.FGOUT.Module
//点击空格实现算法手动模式下的开始、结束抠像
//先实现不兼容S、D的情况
if(string.Equals(this.Support.HotkeyConfig.Space, hotkey))
{
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
AlgorithmPackage__MatCmd algorithmPackage__MatCmd = new AlgorithmPackage__MatCmd();
algorithmPackage__MatCmd.mode = AlgorithmPackageSignal.manual_mode;
//空格键
//Space
if (_isStop)
{
algorithmPackage__MatCmd.signal = AlgorithmPackageSignal.matt_start;
log.Info(hotkey + "发送开始命令:" + algorithmPackage__MatCmd.mode + "" + algorithmPackage__MatCmd.signal);
_isStop = false;
}
else
{
algorithmPackage__MatCmd.signal = AlgorithmPackageSignal.matt_end;
log.Info(hotkey + "发送结束命令:" + algorithmPackage__MatCmd.mode + "" + algorithmPackage__MatCmd.signal);
_isStop = true;
}
AlgorithmSender.MatImageCmd(manager, algorithmPackage__MatCmd);
}
//if(string.Equals(this.Support.HotkeyConfig.Space, hotkey))
//{
// UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
// AlgorithmPackage__MatCmd algorithmPackage__MatCmd = new AlgorithmPackage__MatCmd();
// algorithmPackage__MatCmd.mode = AlgorithmPackageSignal.manual_mode;
// if (_isStop)
// {
// algorithmPackage__MatCmd.signal = AlgorithmPackageSignal.matt_start;
// log.Info(hotkey + "发送开始命令:" + algorithmPackage__MatCmd.mode + "" + algorithmPackage__MatCmd.signal);
// _isStop = false;
// }
// else
// {
// algorithmPackage__MatCmd.signal = AlgorithmPackageSignal.matt_end;
// log.Info(hotkey + "发送结束命令:" + algorithmPackage__MatCmd.mode + "" + algorithmPackage__MatCmd.signal);
// _isStop = true;
// }
// AlgorithmSender.MatImageCmd(manager, algorithmPackage__MatCmd);
//}
//if (string.Equals(this.Support.HotkeyConfig.AutoCAM3, hotkey))
//{
......
......@@ -422,6 +422,7 @@
Margin="10"
Command="{Binding Path=RefreshPositionCommand}"
Content="刷新位置"
IsEnabled="{Binding StartEnable}"
Style="{StaticResource ButtonStyle}" />
<ToggleButton
......@@ -651,7 +652,6 @@
Margin="10"
Command="{Binding Path=CleanInPointCommand}"
Content="Clean Points"
IsEnabled="{Binding CleanEnable}"
Style="{StaticResource ButtonStyle}"
Visibility="{Binding ReplaySendVisibility, Mode=TwoWay}" />
</Grid>
......
......@@ -62,7 +62,7 @@
</behaviors:EventTrigger>
</behaviors:Interaction.Triggers>
<Grid Margin="15,0,0,0">
<Grid Margin="15,30,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="60" />
<RowDefinition Height="60" />
......
......@@ -57,17 +57,15 @@
</behaviors:EventTrigger>
</behaviors:Interaction.Triggers>
<Border>
<Grid Margin="15,30,5,0">
<Grid Margin="15,30,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="60" />
<RowDefinition Height="60" />
<RowDefinition Height="60" />
<RowDefinition Height="60" />
<!--<RowDefinition Height="60" />-->
<RowDefinition Height="3" />
<!--<RowDefinition Height="60" />
<RowDefinition Height="60" />-->
<RowDefinition Height="60" />
<RowDefinition Height="26*" />
<RowDefinition Height="49*" />
<RowDefinition Height="49*" />-->
</Grid.RowDefinitions>
<!-- 输入源 -->
<TextBlock
......@@ -100,6 +98,13 @@
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<!-- 白线 -->
<Rectangle
Grid.Row="2"
Height="1"
Margin="0,0,10,0"
VerticalAlignment="Bottom"
Fill="White" />
<!--<TextBlock
Grid.Row="2"
VerticalAlignment="Center"
......
......@@ -65,7 +65,6 @@
Content="视频输入"
FontSize="22"
Foreground="White"
IsChecked="True"
Style="{StaticResource RadioButton_Setting}" />
<RadioButton
x:Name="rbAlgorithm"
......@@ -74,6 +73,7 @@
Content="参数设置"
FontSize="22"
Foreground="White"
IsChecked="True"
Style="{StaticResource RadioButton_Setting}"
Visibility="{Binding IsCam1Visibility}" />
</StackPanel>
......
......@@ -228,7 +228,7 @@ namespace VIZ.FGOUT.Module
NDISettingView settingView = WPFHelper.GetAncestorByType<NDISettingView>(this.GetView<System.Windows.FrameworkElement>());
NDISettingViewModel vm = settingView.DataContext as NDISettingViewModel;
this.ViewKey = vm.ViewKey;
if (this.ViewKey.Equals(NDIViewKeys.CAM_2))
if (this.ViewKey.Equals(NDIViewKeys.CAM_2) || this.ViewKey.Equals(NDIViewKeys.CAM_4))
IsCam1Visibility = Visibility.Hidden;
else if(this.ViewKey.Equals(NDIViewKeys.CAM_1))
IsCam1Visibility = Visibility.Visible;
......@@ -349,6 +349,8 @@ namespace VIZ.FGOUT.Module
{
string streamName = this.SelectedNDIStreamInfo == null ? string.Empty : this.SelectedNDIStreamInfo.FullName;
// int delay = this.SelectedNDIDelayInfo == null ? 0 : this.SelectedNDIDelayInfo.Value;
if (streamName == null)
return false;
//if (this.NdiDispalyName != this.ViewConfig.DisplayName)
// return true;
......@@ -366,7 +368,6 @@ namespace VIZ.FGOUT.Module
// return true;
return true;
}
/// <summary>
......@@ -377,14 +378,10 @@ namespace VIZ.FGOUT.Module
{
string streamName = this.SelectedNDIStreamInfo == null ? string.Empty : this.SelectedNDIStreamInfo.FullName;
// NDI流不一致时需要重启算法
if (ViewConfig == null)
{
if(streamName == null || ViewConfig == null)
return false;
}
// NDI流不一致时需要重启算法
if (streamName != (this.ViewConfig.StreamName ?? string.Empty))
return true;
......
......@@ -161,7 +161,7 @@ namespace VIZ.FGOUT.Module
NdiViewConfig config = ApplicationDomainEx.ServiceManager.GetService<INDIViewService>(this.ViewKey).ViewConfig;
this.ViewConfig = config;
if (this.ViewKey.Equals(NDIViewKeys.CAM_2))
if (this.ViewKey.Equals(NDIViewKeys.CAM_2) || this.ViewKey.Equals(NDIViewKeys.CAM_4))
IsCam1Visibility = Visibility.Collapsed;
else if (this.ViewKey.Equals(NDIViewKeys.CAM_1))
IsCam1Visibility = Visibility.Visible;
......@@ -221,8 +221,8 @@ namespace VIZ.FGOUT.Module
}
}
//如果是CAM_2,不需要重启算法进程
if (this.ViewKey.Equals(NDIViewKeys.CAM_2))
//如果是CAM_2或CAM_4,不需要重启算法进程
if (this.ViewKey.Equals(NDIViewKeys.CAM_2) || this.ViewKey.Equals(NDIViewKeys.CAM_4))
isNeedRestart = false;
if (isNeedRestart)
......@@ -260,8 +260,8 @@ namespace VIZ.FGOUT.Module
// 关闭窗口
this.GetWindow().Close();
//如果是CAM_2,不需要重启算法进程
if (this.ViewKey.Equals(NDIViewKeys.CAM_2))
//如果是CAM_2或CAM_4,不需要重启算法进程
if (this.ViewKey.Equals(NDIViewKeys.CAM_2) || this.ViewKey.Equals(NDIViewKeys.CAM_4))
return;
if (service == null) return;
......
......@@ -250,8 +250,8 @@ namespace VIZ.FGOUT.Module
};
managerAlgorithm.SendJson(replayPackage);
//延时2秒
Thread.Sleep(2000);
////延时2秒
//Thread.Sleep(2000);
manager.SendJson(replayPackage);
MessageBoxEx.ShowDialog("Replay Start OK.");
}
......
......@@ -35,7 +35,7 @@ namespace VIZ.FGOUT.Module
NdiViewConfig config3 = ApplicationDomainEx.LiteDbContext.ViewConfig.FindOne(p => p.ViewKey == NDIViewKeys.CAM_3);
//NdiViewConfig config4 = ApplicationDomainEx.LiteDbContext.ViewConfig.FindOne(p => p.ViewKey == NDIViewKeys.CAM_4);
NdiViewConfig config4 = ApplicationDomainEx.LiteDbContext.ViewConfig.FindOne(p => p.ViewKey == NDIViewKeys.CAM_4);
// CAM 1
NDIStreamOption option1 = new NDIStreamOption();
......@@ -56,10 +56,10 @@ namespace VIZ.FGOUT.Module
VideoStreamManager.Append(NDIViewKeys.CAM_3, ndiStream3);
//// CAM 4
//NDIStreamOption option4 = new NDIStreamOption();
//option4.DelayFrame = config4?.DelayFrame ?? 0;
//NDIStream ndiStream4 = new NDIStream(localrecvname, config4?.StreamName, option4);
//VideoStreamManager.Append(NDIViewKeys.CAM_4, ndiStream4);
NDIStreamOption option4 = new NDIStreamOption();
option4.DelayFrame = config4?.DelayFrame ?? 0;
NDIStream ndiStream4 = new NDIStream(localrecvname, config4?.StreamName, option4);
VideoStreamManager.Append(NDIViewKeys.CAM_4, ndiStream4);
//SystemConfig systemConfig = ApplicationDomainEx.LiteDbContext.SystemConfig.FindAll().FirstOrDefault();
......
......@@ -13,8 +13,8 @@
mc:Ignorable="d">
<Grid Background="#2C333B">
<local:NDIView
IsHiddenSetting="True"
NDIKey="{x:Static Member=domain:NDIViewKeys.CAM_2}"
IsCam2="True"
NDIKey="{x:Static Member=domain:NDIViewKeys.CAM_4}"
VideoBorderBrush="#B85069" />
</Grid>
</Window>
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "B113860AB0C0197CED7CCF2E34D93345831C6625C0F36BCEDECC51FD15DE4B17"
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "2F8DEAB8CC5116FED71BF3B8602ADEACCF8E7E8D478EFFD6531C3D0E42D71D2D"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "B113860AB0C0197CED7CCF2E34D93345831C6625C0F36BCEDECC51FD15DE4B17"
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "2F8DEAB8CC5116FED71BF3B8602ADEACCF8E7E8D478EFFD6531C3D0E42D71D2D"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "DEBEE15FCB5CFADA4B8FA0173F9349B7D666163EF1A2472053C8ECA51C06EA89"
#pragma checksum "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "577B9394477112379FA04A97AD73F2679B77A8E541E18DB324B94A6D4447202F"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "DEBEE15FCB5CFADA4B8FA0173F9349B7D666163EF1A2472053C8ECA51C06EA89"
#pragma checksum "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "577B9394477112379FA04A97AD73F2679B77A8E541E18DB324B94A6D4447202F"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "0FB6D42FBF898DCDF11B740998213B64B0B5056C6C5CEA059C3C934F0929D71E"
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "4E159E73191D48FECDE137EE654C2D1CE329280989828972780B908F12950A3C"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "0FB6D42FBF898DCDF11B740998213B64B0B5056C6C5CEA059C3C934F0929D71E"
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "4E159E73191D48FECDE137EE654C2D1CE329280989828972780B908F12950A3C"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "63FD1989510EB2DBA0C2AEECC7EFD86BF6F22D8ADDE38557E58E425DA46C62B4"
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "DD016B8F9DBF0067CEEFFD763DB77C7D02A9BC939BE92384C4C522B958436679"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......@@ -56,7 +56,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 71 "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml"
#line 70 "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.RadioButton rbAlgorithm;
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "63FD1989510EB2DBA0C2AEECC7EFD86BF6F22D8ADDE38557E58E425DA46C62B4"
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "DD016B8F9DBF0067CEEFFD763DB77C7D02A9BC939BE92384C4C522B958436679"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......@@ -56,7 +56,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 71 "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml"
#line 70 "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.RadioButton rbAlgorithm;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -201,7 +201,9 @@ namespace VIZ.Framework.Common
NDIlib.recv_create_v3_t recvCreateDesc = new NDIlib.recv_create_v3_t();
recvCreateDesc.source_to_connect_to = info.Source;
recvCreateDesc.color_format = NDIlib.recv_color_format_e.recv_color_format_BGRX_BGRA;
//recvCreateDesc.bandwidth = NDIlib.recv_bandwidth_e.recv_bandwidth_highest;
//if (remoteSenderName.Contains("3"))
// recvCreateDesc.bandwidth = NDIlib.recv_bandwidth_e.recv_bandwidth_highest;
//else
recvCreateDesc.bandwidth = NDIlib.recv_bandwidth_e.recv_bandwidth_lowest;
recvCreateDesc.allow_video_fields = false;
recvCreateDesc.p_ndi_recv_name = UTF.StringToUtf8(this.LocalRecevierName);
......@@ -210,7 +212,6 @@ namespace VIZ.Framework.Common
// -------------------------------------------------------------------------------
// 切换成功
return true;
}
}
......
......@@ -130,8 +130,16 @@ namespace VIZ.Framework.Common
{
videoFrame.Width = frame.xres;
videoFrame.Height = frame.yres;
try
{
Buffer.MemoryCopy(frame.p_data.ToPointer(), videoFrame.DataStream.DataPointer.ToPointer(), videoFrame.Length, videoFrame.Length);
Buffer.MemoryCopy(frame.p_data.ToPointer(), videoFrame.DataStream.DataPointer.ToPointer(),
videoFrame.Length, videoFrame.Length);
}
catch (Exception ex)
{
log.Error(ex.Message);
}
}
}
......
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