Commit 7da6f244 by 鲁志-悦动

落盘由向音视频发指令改由向算法发指令 And 修复BEnableSpline初始化时忘记赋值的缺陷

parent 1c4c7d18
......@@ -89,7 +89,6 @@ namespace VIZ.FGOUT.Connection
manager.SendJson(package);
}
public static void AutoMode(UdpEndpointManager manager, AlgorithmPackage_Figout_model package, AlgorithmSenderOption option)
{
......
......@@ -5,16 +5,26 @@
/// <summary>
/// 类型
/// </summary>
public string type { get;set; }
public string Type { get;set; }
/// <summary>
/// 开始时间戳
/// </summary>
public long start_time { get; set; }
//public long start_time { get; set; }
/// <summary>
/// 结束时间戳
/// </summary>
public long end_time { get; set;}
//public long end_time { get; set;}
/// <summary>
/// 项目编码
/// </summary>
public string SportsCode { get; set; }
/// <summary>
/// 是否落盘
/// </summary>
public bool RecordResult { get; set; }
}
}
......@@ -148,11 +148,51 @@
FontSize="24"
Style="{StaticResource TextBlockStyle}"
Text="输出视频" />
<!--<Canvas
Grid.Row="2"
Width="740"
Height="90">
<Slider
Width="740"
Height="90"
AutoToolTipPlacement="BottomRight"
AutoToolTipPrecision="0"
IsMoveToPointEnabled="True"
IsSnapToTickEnabled="True"
Maximum="{Binding SliderMaxValue, Mode=TwoWay}"
TickFrequency="1"
TickPlacement="BottomRight"
Visibility="{Binding SliderVisibility, Mode=TwoWay}"
Value="{Binding SliderValue, Mode=TwoWay}">
<b:Interaction.Triggers>
<b:EventTrigger EventName="ValueChanged">
<b:InvokeCommandAction Command="{Binding SliderValueChangedCommand}" />
</b:EventTrigger>
</b:Interaction.Triggers>
</Slider>
<Slider
Width="740"
Height="90"
AutoToolTipPlacement="BottomRight"
AutoToolTipPrecision="0"
IsMoveToPointEnabled="True"
IsSnapToTickEnabled="True"
Maximum="{Binding SliderMaxValue, Mode=TwoWay}"
TickFrequency="1"
TickPlacement="BottomRight"
Visibility="{Binding SliderVisibility, Mode=TwoWay}"
Value="{Binding SliderValue2, Mode=TwoWay}">
<b:Interaction.Triggers>
<b:EventTrigger EventName="ValueChanged">
<b:InvokeCommandAction Command="{Binding SliderValueChangedCommand}" />
</b:EventTrigger>
</b:Interaction.Triggers>
</Slider>
</Canvas>-->
<Slider
Grid.Row="2"
Width="740"
Height="90"
Margin="80,0,0,0"
AutoToolTipPlacement="BottomRight"
AutoToolTipPrecision="0"
IsMoveToPointEnabled="True"
......
......@@ -803,18 +803,26 @@ namespace VIZ.FGOUT.Module
/// </summary>
private void MatImageCommand()
{
if (IsMatImage)
{
var config = ApplicationDomainEx.LiteDbContext.AlgorithmSaveMatImage.FindAll().FirstOrDefault();
//if (IsMatImage)
//{
//var config = ApplicationDomainEx.LiteDbContext.AlgorithmSaveMatImage.FindAll().FirstOrDefault();
SaveMatImagePackage package = new SaveMatImagePackage();
package.type = "LOADMASK";
package.start_time = config.start;
package.end_time = config.end;
// 发送UDP命令
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
package.Type = "LOADMASK";
//package.start_time = config.start;
//package.end_time = config.end;
//// 发送UDP命令给音视频
//UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
var ndiViewConfig =
ApplicationDomainEx.LiteDbContext.ViewConfig.FindOne(p => p.ViewKey == NDIViewKeys.CAM_1);
package.SportsCode = ndiViewConfig.GameName;
package.RecordResult = IsMatImage;
// 发送UDP命令给算法
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
if (manager == null) return;
manager.SendJson(package);
}
//}
//ReplayPackage replayPackage = new ReplayPackage();
// data.loadFlag = 1;
//else
......@@ -823,16 +831,16 @@ namespace VIZ.FGOUT.Module
//replayPackage.data = data;
}
private bool isMatImage = false;
private bool _isMatImage = false;
public bool IsMatImage
{
get
{
return isMatImage;
return _isMatImage;
}
set
{
isMatImage = value;
_isMatImage = value;
this.RaisePropertyChanged(nameof(IsMatImage));
}
}
......@@ -976,6 +984,13 @@ namespace VIZ.FGOUT.Module
set { _sliderValue = value; this.RaisePropertyChanged(nameof(SliderValue)); }
}
private int _sliderValue2 = 150;
public int SliderValue2
{
get => (int)_sliderValue2;
set { _sliderValue2 = value; this.RaisePropertyChanged(nameof(SliderValue2)); }
}
private int _sliderMaxValue = 150;
public int SliderMaxValue
{
......
......@@ -395,7 +395,6 @@ namespace VIZ.FGOUT.Module
this.ViewConfig.GameName = GetDicKey(PresetsItem);
ApplicationDomainEx.LiteDbContext.ViewConfig.Upsert(this.ViewConfig);
}
return true;
}
......@@ -533,6 +532,7 @@ namespace VIZ.FGOUT.Module
_algorithmMessage = package == null ? string.Empty : JsonConvert.SerializeObject(package, JSON_SERIALIZER_SETTINGS);
//如果体育项目没有更改,向算法发送参数,此时算法不重启
if (_initItem == (PresetsItem ?? string.Empty))
manager.SendJson(package);
......@@ -635,6 +635,7 @@ namespace VIZ.FGOUT.Module
ShowHeight = enableStats.bShowHeight;
ShowSpeed = enableStats.bShowSpeed;
UseZoom = enableStats.bEnableZoom;
BEnableSpline = enableStats.bEnableSpline;
var splineSets = uePackage.UE_Presets.StartSets.SplineSets;
Line = splineSets.bLineBehind;
......
......@@ -74,6 +74,7 @@ namespace VIZ.FGOUT.Module
//option.id = this.Support.ID;
//AlgorithmSender.AutoMode(manager, this.bulidPackage(AlgorithmAutoModeCmd.detect, null), option);
//算法重启后,向算法发送保存在数据库的相关体育项目的算法数据
var ndiViewConfig =
ApplicationDomainEx.LiteDbContext.ViewConfig.FindOne(p => p.ViewKey == NDIViewKeys.CAM_1);
var config = ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.FindOne(p => p.Number == ndiViewConfig.GameName);
......
......@@ -124,7 +124,7 @@ namespace VIZ.FGOUT.Module
// 算法跟踪消息--裁切
ApplicationDomainEx.MessageManager.Register<AlgorithmMessage__crop_roi>(this, this.OnAlgorithmMessage__crop_roi);
// 算法落盘开始、结束时间戳消息
ApplicationDomainEx.MessageManager.Register<AlgorithmMessage__start_end>(this, this.OnAlgorithmMessage__start_end);
//ApplicationDomainEx.MessageManager.Register<AlgorithmMessage__start_end>(this, this.OnAlgorithmMessage__start_end);
NDIView nDIView = this.GetView<NDIView>();
// 开始的位置
......
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "1F0CD7ED3A15FF623F56A5882C07D163F927211CFE7FA51430430A23C723B029"
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "4AE5D405ECDA6991E1C8C36C771B608532832E87D67F619AB963B418F4374738"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......@@ -58,7 +58,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 440 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 480 "..\..\..\..\..\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 487 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 527 "..\..\..\..\..\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}" "1F0CD7ED3A15FF623F56A5882C07D163F927211CFE7FA51430430A23C723B029"
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "4AE5D405ECDA6991E1C8C36C771B608532832E87D67F619AB963B418F4374738"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......@@ -58,7 +58,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 440 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 480 "..\..\..\..\..\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 487 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 527 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam2;
......
......@@ -10,11 +10,11 @@ none
false
DEBUG;TRACE
22-808211288
4-699044453
90-747441034
151674092382
22-1559853185
4-1529606353
90-1236168610
151915249285
NDIMainView\View\NDIMainView.xaml;NDIPreviewView\View\NDIPreviewView.xaml;NDISettingView\View\AlgorithmSettingPanelView.xaml;NDISettingView\View\Algorithm\AlgorithmCablewayPanelView.xaml;NDISettingView\View\Algorithm\AlgorithmNearPanelView.xaml;NDISettingView\View\Algorithm\AlgorithmSinglePanelView.xaml;NDISettingView\View\Algorithm\AlgorithmSixteenPanelView.xaml;NDISettingView\View\Algorithm\AlgorithmTacticsPanelView.xaml;NDISettingView\View\NDISettingPanelView.xaml;NDISettingView\View\NDISettingView.xaml;NDIView\View\NDIView.xaml;SystemSetting\View\AboutPanelView.xaml;SystemSetting\View\CheckDataPanelView.xaml;SystemSetting\View\HotkeySettingPanelView.xaml;SystemSetting\View\MattingImagePanelView.xaml;SystemSetting\View\PackageSettingPanelView.xaml;SystemSetting\View\PreviewSettingPanelView.xaml;SystemSetting\View\ReplayPanelView.xaml;SystemSetting\View\StyleSettingPanelView.xaml;SystemSetting\View\SystemSettingView.xaml;SystemSetting\View\UEControlPanelView.xaml;SystemSetting\View\UESettingPanelView.xaml;
False
True
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -68,6 +68,11 @@ namespace VIZ.Framework.Connection
log.Info("发送UDPJosn串:"+msg);
}
/// <summary>
/// 发送JSON字符串(UDF-8编码)
/// </summary>
/// <param name="manager">UDP终结点管理器</param>
/// <param name="msg">字符串</param>
public static void SendJsonString(this UdpEndpointManager manager, string msg)
{
SendString(manager, msg, Encoding.UTF8);
......
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