Skip to content

Commit

Permalink
configure slide drive video rates
Browse files Browse the repository at this point in the history
update default switcher settings
  • Loading branch information
kjgriffin committed Oct 25, 2020
1 parent 8a3a972 commit faef770
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public class BMDSwitcherConfigSettings

public BMDUSKSettings PIPSettings { get; set; } = new BMDUSKSettings();

public BMDSwitcherVideoSettings VideoSettings { get; set; } = new BMDSwitcherVideoSettings();



public static BMDSwitcherConfigSettings Load(string filename)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Integrated_Presenter.BMDSwitcher.Config
{
public class BMDSwitcherVideoSettings
{
public int VideoWidth { get; set; }
public int VideoHeight { get; set; }
public int VideoFPS { get; set; }
}
}
24 changes: 15 additions & 9 deletions Integrated Presenter/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ private async void SlideDriveVideo_Next()
if (switcherState.ProgramID == _config.Routing.Where(r => r.KeyName == "slide").First().PhysicalInputId)
{
switcherManager?.PerformAutoTransition();
await Task.Delay(1000);
await Task.Delay((_config.MixEffectSettings.Rate / _config.VideoSettings.VideoFPS) * 1000);
}
Presentation.NextSlide();
slidesUpdated();
Expand All @@ -830,7 +830,7 @@ private async void SlideDriveVideo_Next()
if (switcherState.DSK1OnAir)
{
switcherManager?.PerformAutoOffAirDSK1();
await Task.Delay(1000);
await Task.Delay((_config.MixEffectSettings.Rate / _config.VideoSettings.VideoFPS) * 1000);
}
Presentation.NextSlide();
slidesUpdated();
Expand Down Expand Up @@ -861,7 +861,7 @@ private async void SlideDriveVideo_ToSlide(Slide s)
if (switcherState.ProgramID == _config.Routing.Where(r => r.KeyName == "slide").First().PhysicalInputId)
{
switcherManager?.PerformAutoTransition();
await Task.Delay(1000);
await Task.Delay((_config.MixEffectSettings.Rate / _config.VideoSettings.VideoFPS) * 1000);
}
Presentation.Override = s;
Presentation.OverridePres = true;
Expand All @@ -875,7 +875,7 @@ private async void SlideDriveVideo_ToSlide(Slide s)
if (switcherState.DSK1OnAir)
{
switcherManager?.PerformAutoOffAirDSK1();
await Task.Delay(1000);
await Task.Delay((_config.MixEffectSettings.Rate / _config.VideoSettings.VideoFPS) * 1000);
}
Presentation.Override = s;
Presentation.OverridePres = true;
Expand Down Expand Up @@ -903,7 +903,7 @@ private void SlideDriveVideo_Action(Slide s)
switch (s.Action)
{
case "t1restart":
timer1span = TimeSpan.Zero;
timer1span = TimeSpan.Zero;
break;
case "mastercaution2":
MasterCautionState = 2;
Expand All @@ -926,7 +926,7 @@ private async void SlideDriveVideo_Current()
if (switcherState.ProgramID == _config.Routing.Where(r => r.KeyName == "slide").First().PhysicalInputId)
{
switcherManager?.PerformAutoTransition();
await Task.Delay(1000);
await Task.Delay((_config.MixEffectSettings.Rate / _config.VideoSettings.VideoFPS) * 1000);
}
slidesUpdated();
PresentationStateUpdated?.Invoke(Presentation.Current);
Expand All @@ -938,7 +938,7 @@ private async void SlideDriveVideo_Current()
if (switcherState.DSK1OnAir)
{
switcherManager?.PerformAutoOffAirDSK1();
await Task.Delay(1000);
await Task.Delay((_config.MixEffectSettings.Rate / _config.VideoSettings.VideoFPS) * 1000);
}
slidesUpdated();
PresentationStateUpdated?.Invoke(Presentation.Current);
Expand Down Expand Up @@ -1600,6 +1600,12 @@ private void SetDefaultConfig()
{
BMDSwitcherConfigSettings cfg = new BMDSwitcherConfigSettings()
{
VideoSettings = new BMDSwitcherVideoSettings()
{
VideoFPS = 30,
VideoHeight = 1080,
VideoWidth = 1920
},
Routing = new List<ButtonSourceMapping>() {
new ButtonSourceMapping() { KeyName = "left", ButtonId = 1, ButtonName = "PULPIT", PhysicalInputId = 5, LongName = "PULPIT", ShortName = "PLPT" },
new ButtonSourceMapping() { KeyName = "center", ButtonId = 2, ButtonName = "CENTER", PhysicalInputId = 1, LongName = "CENTER", ShortName = "CNTR" },
Expand Down Expand Up @@ -1630,8 +1636,8 @@ private void SetDefaultConfig()
{
InputFill = 4,
InputCut = 0,
Clip = 1,
Gain = 1,
Clip = 0.3,
Gain = 0.06,
Rate = 30,
Invert = 1,
IsPremultipled = 0,
Expand Down

0 comments on commit faef770

Please sign in to comment.