From c0abd4878d8ef86559221a5f19752f768025d0cb Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Thu, 14 May 2020 19:34:49 +0200 Subject: [PATCH 01/90] Roll-back to YamlDotNet 5.3.1 Remark: iRacingReplayDirector does not recognize running iRacing when using YamlDotNet 8.1.1 --- iRacingReplayDirector.csproj | 4 +-- iRacingReplayOverlay.net.Tests/app.config | 11 ++++++++ .../iRacingReplayOverlay.net.Tests.csproj | 9 ++++--- .../packages.config | 2 +- iRacingReplayOverlay.net.csproj | 10 ++++--- ...ngReplayOverlay.net.nugetreferenceswitcher | 1 + packages.config | 2 +- .../iRacingDirector.Plugin.Tester/App.config | 26 ++++++++++++------- .../iRacingDirector.Plugin.Tester.csproj | 4 +-- .../packages.config | 2 +- 10 files changed, 48 insertions(+), 23 deletions(-) create mode 100644 iRacingReplayOverlay.net.Tests/app.config create mode 100644 iRacingReplayOverlay.net.nugetreferenceswitcher diff --git a/iRacingReplayDirector.csproj b/iRacingReplayDirector.csproj index db174a0..dad541c 100644 --- a/iRacingReplayDirector.csproj +++ b/iRacingReplayDirector.csproj @@ -111,8 +111,8 @@ - - packages\YamlDotNet.8.1.1\lib\net45\YamlDotNet.dll + + packages\YamlDotNet.5.3.1\lib\net45\YamlDotNet.dll diff --git a/iRacingReplayOverlay.net.Tests/app.config b/iRacingReplayOverlay.net.Tests/app.config new file mode 100644 index 0000000..f0f1284 --- /dev/null +++ b/iRacingReplayOverlay.net.Tests/app.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj index c5b71b4..e6fd863 100644 --- a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj +++ b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj @@ -43,8 +43,8 @@ - - ..\packages\YamlDotNet.8.1.1\lib\net45\YamlDotNet.dll + + ..\packages\YamlDotNet.5.3.1\lib\net45\YamlDotNet.dll @@ -59,7 +59,10 @@ - + + + Designer + diff --git a/iRacingReplayOverlay.net.Tests/packages.config b/iRacingReplayOverlay.net.Tests/packages.config index ad9f24b..0553ce7 100644 --- a/iRacingReplayOverlay.net.Tests/packages.config +++ b/iRacingReplayOverlay.net.Tests/packages.config @@ -4,5 +4,5 @@ - + \ No newline at end of file diff --git a/iRacingReplayOverlay.net.csproj b/iRacingReplayOverlay.net.csproj index d08b529..073a931 100644 --- a/iRacingReplayOverlay.net.csproj +++ b/iRacingReplayOverlay.net.csproj @@ -82,9 +82,6 @@ packages\AWSSDK.Core.3.1.4.0\lib\net35\AWSSDK.Core.dll True - - packages\iRacingSDK.1.0.0.40\lib\net40-client\iRacingSDK.dll - packages\Newtonsoft.Json.4.0.5\lib\net40\Newtonsoft.Json.dll @@ -322,5 +319,10 @@ - + + + {5422AE20-F220-4BE1-9E61-5296981ABB5C} + iRacingSDK + + \ No newline at end of file diff --git a/iRacingReplayOverlay.net.nugetreferenceswitcher b/iRacingReplayOverlay.net.nugetreferenceswitcher new file mode 100644 index 0000000..d7f387e --- /dev/null +++ b/iRacingReplayOverlay.net.nugetreferenceswitcher @@ -0,0 +1 @@ +iRacingSDK iRacingSDK.Net/iRacingSDK.csproj packages/iRacingSDK.1.0.0.40/lib/net40-client/iRacingSDK.dll diff --git a/packages.config b/packages.config index 2b0a0c5..0d76b39 100644 --- a/packages.config +++ b/packages.config @@ -9,5 +9,5 @@ - + \ No newline at end of file diff --git a/plugins/iRacingDirector.Plugin.Tester/App.config b/plugins/iRacingDirector.Plugin.Tester/App.config index 06a67a6..79fa9f8 100644 --- a/plugins/iRacingDirector.Plugin.Tester/App.config +++ b/plugins/iRacingDirector.Plugin.Tester/App.config @@ -1,33 +1,41 @@ - + -
-
+
+
- + - + - + - + - + - + + + + + + + + + diff --git a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj index a4dc21c..4767c94 100644 --- a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj +++ b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj @@ -70,8 +70,8 @@ - - ..\..\packages\YamlDotNet.8.1.1\lib\net45\YamlDotNet.dll + + ..\..\packages\YamlDotNet.5.3.1\lib\net45\YamlDotNet.dll diff --git a/plugins/iRacingDirector.Plugin.Tester/packages.config b/plugins/iRacingDirector.Plugin.Tester/packages.config index bb9973f..4334bc0 100644 --- a/plugins/iRacingDirector.Plugin.Tester/packages.config +++ b/plugins/iRacingDirector.Plugin.Tester/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file From 2350af86a15f995682da39d85b92f83ebae9aa7a Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Fri, 15 May 2020 18:30:48 +0200 Subject: [PATCH 02/90] comment where to add race_analysis code --- Phases/AnalyseRace.cs | 3 +++ Properties/AssemblyInfo.cs | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index d731667..988fbba 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -57,6 +57,9 @@ public void _AnalyseRace(Action onComplete) TraceDebug.WriteLine(data.Telemetry.ToString()); AnalyseIncidents(); + + + //add here complete Analyse of race - not only incidents onComplete(); } diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index c18cd71..bcaeffd 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -1,6 +1,7 @@ // This file is part of iRacingReplayOverlay. // // Copyright 2014 Dean Netherton +// Copyright 2020 (c) Merlin Cooper // https://github.com/vipoo/iRacingReplayOverlay.net // // iRacingReplayOverlay is free software: you can redistribute it and/or modify @@ -50,7 +51,7 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.1.*")] +[assembly: AssemblyFileVersion("1.1.*")] [assembly: InternalsVisibleTo("iRacingReplayOverlay.net.Tests")] \ No newline at end of file From 6f0836e1b8f1904dda06161c534d80d0e90a46fb Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sun, 17 May 2020 12:03:01 +0200 Subject: [PATCH 03/90] Adding methodes to analyse all race-events before start of capture. Not implemeted yet --- ClassDiagram1.cd | 123 ++++++++++++++++++++++++++++++++ Phases/AnalyseRace.cs | 14 +++- iRacingReplayOverlay.net.csproj | 21 ++++++ 3 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 ClassDiagram1.cd diff --git a/ClassDiagram1.cd b/ClassDiagram1.cd new file mode 100644 index 0000000..0edb9d1 --- /dev/null +++ b/ClassDiagram1.cd @@ -0,0 +1,123 @@ + + + + + + AEAAAAAAAAAAAgAAAgAAAAAAAAAAAAAAAQAAAAAAAAA= + Phases\Capturing\LeaderBoard\CaptureLeaderBoardFirstLap.cs + + + + + + AEIAAAAAAAAAAgAAAgAAAAAAAAAAAAIAAIAACAAAAAA= + Phases\Capturing\LeaderBoard\CaptureLeaderBoardLastLap.cs + + + + + + AEAAAAIAAAAAAgAAAgAAAAEAAAAAAAAAAAAACAABAAA= + Phases\Capturing\LeaderBoard\CaptureLeaderBoardMiddleLaps.cs + + + + + + AAAAAAAAAAAAAhAABgAAAAABAAAAAAAAAAAAAAIAAAA= + Phases\Capturing\CaptureCamDriver.cs + + + + + + gAAAAAAAAAAAEgCEAwACAAAAAAAAAAAICAAAAAAAAAI= + Phases\Capturing\CaptureLeaderBoard.cs + + + + + + AAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAQAAAAA= + Phases\Capturing\CommentaryMessages.cs + + + + + + AAAAAAAAACAAAAAAAAAAAIEAAAAgAAAAIQAAAAAIAAA= + Phases\Capturing\EditMarker.cs + + + + + + AAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAA= + Phases\Capturing\LogCamDriver.cs + + + + + + BAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAABAAAA= + Phases\Capturing\OverlayData.cs + + + + + + AEAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAA= + Phases\Capturing\OverlayData.cs + + + + + + AAAAAAiAAAAAAoAkAAAAAAAAgAAAAAAEAAAAACgEAAA= + Phases\Capturing\OverlayData.cs + + + + + + AAAAAAAAAAAARgAAAgAAIAAAAAAAAAAAAAAAAAAAAAQ= + Phases\Capturing\RecordFastestLaps.cs + + + + + + AAAAAAAAAAAAAAAAAgAAAAAABAAAAAAAAAAACAAAAAA= + Phases\Capturing\RecordPitStops.cs + + + + + + AACAAAAAAAAAgABAAgAAIAAAIAABIAIgIQAAACAAAAA= + Phases\Capturing\RemovalEdits.cs + + + + + + AAQAAAAAAAAAAAAAAgAAAgAAAAAAAAAAAAAAAgAAAAA= + Phases\Capturing\SampleFilter.cs + + + + + + AAAAAAAAAAAAAgAAAgAAAAAAAAAAAAAAAAAAAAAAAAA= + Phases\Capturing\SessionDataCapture.cs + + + + + + EAAAAAAAAACAQAAAAAAACAAAIAAAAAAAAAAAAAEAABA= + Phases\Capturing\RemovalEdits.cs + + + + \ No newline at end of file diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index 988fbba..a3129a6 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -3,6 +3,9 @@ // Copyright 2014 Dean Netherton // https://github.com/vipoo/iRacingReplayOverlay.net // +// Copyright 2020 Merlin Cooper +// https://github.com/MerlinCooper/iRacingReplayDirector +// // iRacingReplayOverlay is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or @@ -57,9 +60,10 @@ public void _AnalyseRace(Action onComplete) TraceDebug.WriteLine(data.Telemetry.ToString()); AnalyseIncidents(); - + //add here complete Analyse of race - not only incidents + AnalyseRaceSituations(); onComplete(); } @@ -78,5 +82,13 @@ void AnalyseIncidents() incidents.Process(data); } } + + //Analyse race situations at maximum replay speed w/o recording. + void AnalyseRaceSituations() + { + // + + + } } } diff --git a/iRacingReplayOverlay.net.csproj b/iRacingReplayOverlay.net.csproj index 073a931..ffcffb1 100644 --- a/iRacingReplayOverlay.net.csproj +++ b/iRacingReplayOverlay.net.csproj @@ -16,11 +16,24 @@ v4.5 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true iRacing Replay Director Dean Netherton iRacing Apps 34 1.0.0.34 + false + false + true false @@ -254,6 +267,7 @@ + @@ -325,4 +339,11 @@ iRacingSDK + + + False + .NET Framework 3.5 SP1 + false + + \ No newline at end of file From f4d98a92cf379f463a837e6864f21cd5d2676bea Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sun, 17 May 2020 17:33:21 +0200 Subject: [PATCH 04/90] Write OverlayData as JSON File in addition to the XML file --- ClassDiagram1.cd | 42 ++++++++++++++++----------------- Phases/CaptureRace.cs | 12 ++++++---- Phases/Capturing/OverlayData.cs | 10 ++++++++ iRacingReplayDirector.csproj | 4 ++-- packages.config | 2 +- 5 files changed, 41 insertions(+), 29 deletions(-) diff --git a/ClassDiagram1.cd b/ClassDiagram1.cd index 0edb9d1..046ede0 100644 --- a/ClassDiagram1.cd +++ b/ClassDiagram1.cd @@ -56,27 +56,6 @@ Phases\Capturing\LogCamDriver.cs - - - - BAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAABAAAA= - Phases\Capturing\OverlayData.cs - - - - - - AEAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAA= - Phases\Capturing\OverlayData.cs - - - - - - AAAAAAiAAAAAAoAkAAAAAAAAgAAAAAAEAAAAACgEAAA= - Phases\Capturing\OverlayData.cs - - @@ -112,6 +91,27 @@ Phases\Capturing\SessionDataCapture.cs + + + + BAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAABAAAA= + Phases\Capturing\OverlayData.cs + + + + + + AEAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAA= + Phases\Capturing\OverlayData.cs + + + + + + AAAAAAiAAAAAAoAkAAAAAAAAgAAAAAAEAAAAACgEAAA= + Phases\Capturing\OverlayData.cs + + diff --git a/Phases/CaptureRace.cs b/Phases/CaptureRace.cs index a602c0e..9ecb59a 100644 --- a/Phases/CaptureRace.cs +++ b/Phases/CaptureRace.cs @@ -119,10 +119,14 @@ internal void _CaptureRaceTest(Action onComplete, IEnumerable onComplete, IEnumerablepackages\AWSSDK.Core.3.1.4.0\lib\net35\AWSSDK.Core.dll True - - packages\Newtonsoft.Json.4.0.5\lib\net40\Newtonsoft.Json.dll + + packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll packages\Octokit.0.17.0\lib\net45\Octokit.dll diff --git a/packages.config b/packages.config index 0d76b39..9b254f5 100644 --- a/packages.config +++ b/packages.config @@ -6,7 +6,7 @@ - + From 050c7d0089b62e69a00e96fec7fb463b4a942423 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sun, 17 May 2020 19:47:24 +0200 Subject: [PATCH 05/90] - Code to analyse replay copied from capture phase. - No video is recorded - just replay executed at higher speed to get data for race analysis - Needs further improvments, optimization needed. --- Phases/AnalyseRace.cs | 82 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 76 insertions(+), 6 deletions(-) diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index a3129a6..2f74e97 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -21,13 +21,17 @@ // using iRacingReplayOverlay.Phases.Analysis; +using iRacingReplayOverlay.Phases.Capturing; +using iRacingReplayOverlay.Phases.Direction; using iRacingSDK; +using iRacingSDK.Support; using System; using System.Diagnostics; using System.Linq; using System.Threading; -using iRacingReplayOverlay.Support; -using iRacingSDK.Support; +using System.Reflection; +using System.Collections.Generic; + namespace iRacingReplayOverlay.Phases { @@ -63,7 +67,7 @@ public void _AnalyseRace(Action onComplete) //add here complete Analyse of race - not only incidents - AnalyseRaceSituations(); + AnalyseRaceSituations(new iRacingConnection().GetBufferedDataFeed()); onComplete(); } @@ -84,11 +88,77 @@ void AnalyseIncidents() } //Analyse race situations at maximum replay speed w/o recording. - void AnalyseRaceSituations() + void AnalyseRaceSituations(IEnumerable samples) { - // - + //Start iRacing Replay from the beginning with maximum speed (16x) + iRacing.Replay.MoveToFrame(raceStartFrameNumber); + iRacing.Replay.SetSpeed(16); + + //copied from iRacing.Capturing because race events in app V1.0.x.x are identified during capturing the whole video. + var overlayData = new OverlayData(); + var removalEdits = new RemovalEdits(overlayData.RaceEvents); + var commentaryMessages = new CommentaryMessages(overlayData); + //var videoCapture = new VideoCapture(); //do not capture a video during analysis + var recordPitStop = new RecordPitStop(commentaryMessages); + var fastestLaps = new RecordFastestLaps(overlayData); + var replayControl = new ReplayControl(samples.First().SessionData, incidents, removalEdits, TrackCameras); + var sessionDataCapture = new SessionDataCapture(overlayData); + var captureLeaderBoardEveryHalfSecond = new SampleFilter(TimeSpan.FromSeconds(0.5), + new CaptureLeaderBoard(overlayData, commentaryMessages, removalEdits).Process); + var captureCamDriverEveryQuaterSecond = new SampleFilter(TimeSpan.FromSeconds(0.25), + new CaptureCamDriver(overlayData).Process); + + var captureCamDriverEvery4Seconds = new SampleFilter(TimeSpan.FromSeconds(4), + new LogCamDriver().Process); + + + TraceDebug.WriteLine("Cameras:"); + TraceDebug.WriteLine(TrackCameras.ToString()); + + ApplyFirstLapCameraDirection(samples, replayControl); + + samples = samples + .VerifyReplayFrames() + .WithCorrectedPercentages() + .WithCorrectedDistances() + .WithFastestLaps() + .WithFinishingStatus() + .WithPitStopCounts() + .TakeUntil(3.Seconds()).Of(d => d.Telemetry.LeaderHasFinished && d.Telemetry.RaceCars.All(c => c.HasSeenCheckeredFlag || c.HasRetired || c.TrackSurface != TrackLocation.OnTrack)) + .TakeUntil(3.Seconds()).AfterReplayPaused(); + + if (shortTestOnly) + { + samples = samples.AtSpeed(Settings.Default.TimingFactorForShortTest); + Settings.AppliedTimingFactor = 1.0 / Settings.Default.TimingFactorForShortTest; + } + + //videoCapture.Activate(workingFolder); //do not capture a video during analysis + var startTime = DateTime.Now; + + overlayData.CapturedVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); + + foreach (var data in samples) + { + var relativeTime = DateTime.Now - startTime; + + replayControl.Process(data); + sessionDataCapture.Process(data); + captureLeaderBoardEveryHalfSecond.Process(data, relativeTime); + captureCamDriverEveryQuaterSecond.Process(data, relativeTime); + recordPitStop.Process(data, relativeTime); + fastestLaps.Process(data, relativeTime); + removalEdits.Process(data, relativeTime); + captureCamDriverEvery4Seconds.Process(data, relativeTime); + } + + //var files = videoCapture.Deactivate(); //do not capture a video during analysis + + removalEdits.Stop(); + + //var overlayFile = SaveOverlayData(overlayData, files); + iRacing.Replay.SetSpeed(0); } } } From 1f19061356de9f535da5eb37fd4b7a2d66d75ff2 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sun, 17 May 2020 20:45:12 +0200 Subject: [PATCH 06/90] code added to save replayscript after full analysis of race in fast-forward mode (16x) --- Phases/AnalyseRace.cs | 16 +++++----------- Phases/CaptureRace.cs | 12 ++++++++++++ 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index 2f74e97..7c5a4ea 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -98,7 +98,6 @@ void AnalyseRaceSituations(IEnumerable samples) var overlayData = new OverlayData(); var removalEdits = new RemovalEdits(overlayData.RaceEvents); var commentaryMessages = new CommentaryMessages(overlayData); - //var videoCapture = new VideoCapture(); //do not capture a video during analysis var recordPitStop = new RecordPitStop(commentaryMessages); var fastestLaps = new RecordFastestLaps(overlayData); var replayControl = new ReplayControl(samples.First().SessionData, incidents, removalEdits, TrackCameras); @@ -126,14 +125,9 @@ void AnalyseRaceSituations(IEnumerable samples) .WithPitStopCounts() .TakeUntil(3.Seconds()).Of(d => d.Telemetry.LeaderHasFinished && d.Telemetry.RaceCars.All(c => c.HasSeenCheckeredFlag || c.HasRetired || c.TrackSurface != TrackLocation.OnTrack)) .TakeUntil(3.Seconds()).AfterReplayPaused(); + samples = samples.AtSpeed(16); + Settings.AppliedTimingFactor = 1.0 / 16.0; - if (shortTestOnly) - { - samples = samples.AtSpeed(Settings.Default.TimingFactorForShortTest); - Settings.AppliedTimingFactor = 1.0 / Settings.Default.TimingFactorForShortTest; - } - - //videoCapture.Activate(workingFolder); //do not capture a video during analysis var startTime = DateTime.Now; overlayData.CapturedVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); @@ -152,11 +146,11 @@ void AnalyseRaceSituations(IEnumerable samples) captureCamDriverEvery4Seconds.Process(data, relativeTime); } - //var files = videoCapture.Deactivate(); //do not capture a video during analysis - removalEdits.Stop(); - //var overlayFile = SaveOverlayData(overlayData, files); + //save OverlayData into target folder for video ("working folder") + + var overlayFile = SaveReplaySript(overlayData); iRacing.Replay.SetSpeed(0); } diff --git a/Phases/CaptureRace.cs b/Phases/CaptureRace.cs index 9ecb59a..6832a90 100644 --- a/Phases/CaptureRace.cs +++ b/Phases/CaptureRace.cs @@ -191,5 +191,17 @@ string SaveOverlayData(OverlayData overlayData, List files) return overlayFile; } + + string SaveReplaySript (OverlayData overlayData) + { + string fullNameReplayScript = workingFolder + DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + ".replayscript"; + + Trace.WriteLine("Saving ReplayScript (analysis phase) to {0}" + fullNameReplayScript); + + overlayData.SaveTo(fullNameReplayScript); + + return fullNameReplayScript; + } + } } From c5c21258c4cab157b6f5533fcf7f1884d3ac37c3 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sun, 17 May 2020 23:07:52 +0200 Subject: [PATCH 07/90] Bugfix: Build correct full-filename in SaveReplayScript --- Phases/AnalyseRace.cs | 2 +- Phases/CaptureRace.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index 7c5a4ea..b5392b8 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -150,7 +150,7 @@ void AnalyseRaceSituations(IEnumerable samples) //save OverlayData into target folder for video ("working folder") - var overlayFile = SaveReplaySript(overlayData); + var overlayFile = SaveReplayScript(overlayData); iRacing.Replay.SetSpeed(0); } diff --git a/Phases/CaptureRace.cs b/Phases/CaptureRace.cs index 6832a90..8cb4e61 100644 --- a/Phases/CaptureRace.cs +++ b/Phases/CaptureRace.cs @@ -192,9 +192,9 @@ string SaveOverlayData(OverlayData overlayData, List files) return overlayFile; } - string SaveReplaySript (OverlayData overlayData) + string SaveReplayScript (OverlayData overlayData) { - string fullNameReplayScript = workingFolder + DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + ".replayscript"; + string fullNameReplayScript = workingFolder + "/" + DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + "analysis.replayscript"; Trace.WriteLine("Saving ReplayScript (analysis phase) to {0}" + fullNameReplayScript); From a55bbb231e790d130c3cc2bc9d4626310b67304c Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sun, 17 May 2020 23:35:47 +0200 Subject: [PATCH 08/90] Return value of SaveReplayScript not necessary --- Phases/AnalyseRace.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index b5392b8..89bbed8 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -150,7 +150,7 @@ void AnalyseRaceSituations(IEnumerable samples) //save OverlayData into target folder for video ("working folder") - var overlayFile = SaveReplayScript(overlayData); + SaveReplayScript(overlayData); iRacing.Replay.SetSpeed(0); } From bb8d58f7b036ffba485604346123a587af373f8b Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Thu, 14 May 2020 19:34:49 +0200 Subject: [PATCH 09/90] Roll-back to YamlDotNet 5.3.1 Remark: iRacingReplayDirector does not recognize running iRacing when using YamlDotNet 8.1.1 --- iRacingReplayOverlay.net.Tests/app.config | 11 ++++++++ .../iRacingReplayOverlay.net.Tests.csproj | 5 +++- ...ngReplayOverlay.net.nugetreferenceswitcher | 1 - .../iRacingDirector.Plugin.Tester/App.config | 26 ++++++++++++------- 4 files changed, 32 insertions(+), 11 deletions(-) create mode 100644 iRacingReplayOverlay.net.Tests/app.config diff --git a/iRacingReplayOverlay.net.Tests/app.config b/iRacingReplayOverlay.net.Tests/app.config new file mode 100644 index 0000000..f0f1284 --- /dev/null +++ b/iRacingReplayOverlay.net.Tests/app.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj index 3fc5654..e6fd863 100644 --- a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj +++ b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj @@ -59,7 +59,10 @@ - + + + Designer + diff --git a/iRacingReplayOverlay.net.nugetreferenceswitcher b/iRacingReplayOverlay.net.nugetreferenceswitcher index 1e9fba6..d7f387e 100644 --- a/iRacingReplayOverlay.net.nugetreferenceswitcher +++ b/iRacingReplayOverlay.net.nugetreferenceswitcher @@ -1,2 +1 @@ iRacingSDK iRacingSDK.Net/iRacingSDK.csproj packages/iRacingSDK.1.0.0.40/lib/net40-client/iRacingSDK.dll -iRacingSDK iRacingSDK.Net/iRacingSDK.csproj packages/iRacingSDK.1.0.0.40/lib/net40-client/iRacingSDK.dll diff --git a/plugins/iRacingDirector.Plugin.Tester/App.config b/plugins/iRacingDirector.Plugin.Tester/App.config index 06a67a6..79fa9f8 100644 --- a/plugins/iRacingDirector.Plugin.Tester/App.config +++ b/plugins/iRacingDirector.Plugin.Tester/App.config @@ -1,33 +1,41 @@ - + -
-
+
+
- + - + - + - + - + - + + + + + + + + + From 6f71cd4b1c7581da31405a4fa47b1912feaee3af Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Fri, 15 May 2020 18:30:48 +0200 Subject: [PATCH 10/90] comment where to add race_analysis code --- Phases/AnalyseRace.cs | 3 +++ Properties/AssemblyInfo.cs | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index d731667..988fbba 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -57,6 +57,9 @@ public void _AnalyseRace(Action onComplete) TraceDebug.WriteLine(data.Telemetry.ToString()); AnalyseIncidents(); + + + //add here complete Analyse of race - not only incidents onComplete(); } diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index c18cd71..bcaeffd 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -1,6 +1,7 @@ // This file is part of iRacingReplayOverlay. // // Copyright 2014 Dean Netherton +// Copyright 2020 (c) Merlin Cooper // https://github.com/vipoo/iRacingReplayOverlay.net // // iRacingReplayOverlay is free software: you can redistribute it and/or modify @@ -50,7 +51,7 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.1.*")] +[assembly: AssemblyFileVersion("1.1.*")] [assembly: InternalsVisibleTo("iRacingReplayOverlay.net.Tests")] \ No newline at end of file From 248727e736e21b0c896c641ad05bde16ef03fa3e Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sun, 17 May 2020 12:03:01 +0200 Subject: [PATCH 11/90] Adding methodes to analyse all race-events before start of capture. Not implemeted yet --- ClassDiagram1.cd | 123 ++++++++++++++++++++++++++++++++ Phases/AnalyseRace.cs | 14 +++- iRacingReplayOverlay.net.csproj | 21 ++++++ 3 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 ClassDiagram1.cd diff --git a/ClassDiagram1.cd b/ClassDiagram1.cd new file mode 100644 index 0000000..0edb9d1 --- /dev/null +++ b/ClassDiagram1.cd @@ -0,0 +1,123 @@ + + + + + + AEAAAAAAAAAAAgAAAgAAAAAAAAAAAAAAAQAAAAAAAAA= + Phases\Capturing\LeaderBoard\CaptureLeaderBoardFirstLap.cs + + + + + + AEIAAAAAAAAAAgAAAgAAAAAAAAAAAAIAAIAACAAAAAA= + Phases\Capturing\LeaderBoard\CaptureLeaderBoardLastLap.cs + + + + + + AEAAAAIAAAAAAgAAAgAAAAEAAAAAAAAAAAAACAABAAA= + Phases\Capturing\LeaderBoard\CaptureLeaderBoardMiddleLaps.cs + + + + + + AAAAAAAAAAAAAhAABgAAAAABAAAAAAAAAAAAAAIAAAA= + Phases\Capturing\CaptureCamDriver.cs + + + + + + gAAAAAAAAAAAEgCEAwACAAAAAAAAAAAICAAAAAAAAAI= + Phases\Capturing\CaptureLeaderBoard.cs + + + + + + AAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAQAAAAA= + Phases\Capturing\CommentaryMessages.cs + + + + + + AAAAAAAAACAAAAAAAAAAAIEAAAAgAAAAIQAAAAAIAAA= + Phases\Capturing\EditMarker.cs + + + + + + AAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAA= + Phases\Capturing\LogCamDriver.cs + + + + + + BAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAABAAAA= + Phases\Capturing\OverlayData.cs + + + + + + AEAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAA= + Phases\Capturing\OverlayData.cs + + + + + + AAAAAAiAAAAAAoAkAAAAAAAAgAAAAAAEAAAAACgEAAA= + Phases\Capturing\OverlayData.cs + + + + + + AAAAAAAAAAAARgAAAgAAIAAAAAAAAAAAAAAAAAAAAAQ= + Phases\Capturing\RecordFastestLaps.cs + + + + + + AAAAAAAAAAAAAAAAAgAAAAAABAAAAAAAAAAACAAAAAA= + Phases\Capturing\RecordPitStops.cs + + + + + + AACAAAAAAAAAgABAAgAAIAAAIAABIAIgIQAAACAAAAA= + Phases\Capturing\RemovalEdits.cs + + + + + + AAQAAAAAAAAAAAAAAgAAAgAAAAAAAAAAAAAAAgAAAAA= + Phases\Capturing\SampleFilter.cs + + + + + + AAAAAAAAAAAAAgAAAgAAAAAAAAAAAAAAAAAAAAAAAAA= + Phases\Capturing\SessionDataCapture.cs + + + + + + EAAAAAAAAACAQAAAAAAACAAAIAAAAAAAAAAAAAEAABA= + Phases\Capturing\RemovalEdits.cs + + + + \ No newline at end of file diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index 988fbba..a3129a6 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -3,6 +3,9 @@ // Copyright 2014 Dean Netherton // https://github.com/vipoo/iRacingReplayOverlay.net // +// Copyright 2020 Merlin Cooper +// https://github.com/MerlinCooper/iRacingReplayDirector +// // iRacingReplayOverlay is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or @@ -57,9 +60,10 @@ public void _AnalyseRace(Action onComplete) TraceDebug.WriteLine(data.Telemetry.ToString()); AnalyseIncidents(); - + //add here complete Analyse of race - not only incidents + AnalyseRaceSituations(); onComplete(); } @@ -78,5 +82,13 @@ void AnalyseIncidents() incidents.Process(data); } } + + //Analyse race situations at maximum replay speed w/o recording. + void AnalyseRaceSituations() + { + // + + + } } } diff --git a/iRacingReplayOverlay.net.csproj b/iRacingReplayOverlay.net.csproj index 29a7d59..9b38097 100644 --- a/iRacingReplayOverlay.net.csproj +++ b/iRacingReplayOverlay.net.csproj @@ -16,11 +16,24 @@ v4.5 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true iRacing Replay Director Dean Netherton iRacing Apps 34 1.0.0.34 + false + false + true false @@ -251,6 +264,7 @@ + @@ -326,4 +340,11 @@ iRacingSDK + + + False + .NET Framework 3.5 SP1 + false + + \ No newline at end of file From 0468e62320cf9b44cd61006dfaacc2773fcc695d Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sun, 17 May 2020 17:33:21 +0200 Subject: [PATCH 12/90] Write OverlayData as JSON File in addition to the XML file --- ClassDiagram1.cd | 42 ++++++++++++++++----------------- Phases/CaptureRace.cs | 12 ++++++---- Phases/Capturing/OverlayData.cs | 10 ++++++++ iRacingReplayDirector.csproj | 4 ++-- packages.config | 2 +- 5 files changed, 41 insertions(+), 29 deletions(-) diff --git a/ClassDiagram1.cd b/ClassDiagram1.cd index 0edb9d1..046ede0 100644 --- a/ClassDiagram1.cd +++ b/ClassDiagram1.cd @@ -56,27 +56,6 @@ Phases\Capturing\LogCamDriver.cs - - - - BAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAABAAAA= - Phases\Capturing\OverlayData.cs - - - - - - AEAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAA= - Phases\Capturing\OverlayData.cs - - - - - - AAAAAAiAAAAAAoAkAAAAAAAAgAAAAAAEAAAAACgEAAA= - Phases\Capturing\OverlayData.cs - - @@ -112,6 +91,27 @@ Phases\Capturing\SessionDataCapture.cs + + + + BAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAABAAAA= + Phases\Capturing\OverlayData.cs + + + + + + AEAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAA= + Phases\Capturing\OverlayData.cs + + + + + + AAAAAAiAAAAAAoAkAAAAAAAAgAAAAAAEAAAAACgEAAA= + Phases\Capturing\OverlayData.cs + + diff --git a/Phases/CaptureRace.cs b/Phases/CaptureRace.cs index a602c0e..9ecb59a 100644 --- a/Phases/CaptureRace.cs +++ b/Phases/CaptureRace.cs @@ -119,10 +119,14 @@ internal void _CaptureRaceTest(Action onComplete, IEnumerable onComplete, IEnumerablepackages\AWSSDK.Core.3.1.4.0\lib\net35\AWSSDK.Core.dll True - - packages\Newtonsoft.Json.4.0.5\lib\net40\Newtonsoft.Json.dll + + packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll packages\Octokit.0.17.0\lib\net45\Octokit.dll diff --git a/packages.config b/packages.config index 0d76b39..9b254f5 100644 --- a/packages.config +++ b/packages.config @@ -6,7 +6,7 @@ - + From 3e9c67948aa7f4eb3d6c8f22460b5ddc581975e2 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sun, 17 May 2020 19:47:24 +0200 Subject: [PATCH 13/90] - Code to analyse replay copied from capture phase. - No video is recorded - just replay executed at higher speed to get data for race analysis - Needs further improvments, optimization needed. --- Phases/AnalyseRace.cs | 82 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 76 insertions(+), 6 deletions(-) diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index a3129a6..2f74e97 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -21,13 +21,17 @@ // using iRacingReplayOverlay.Phases.Analysis; +using iRacingReplayOverlay.Phases.Capturing; +using iRacingReplayOverlay.Phases.Direction; using iRacingSDK; +using iRacingSDK.Support; using System; using System.Diagnostics; using System.Linq; using System.Threading; -using iRacingReplayOverlay.Support; -using iRacingSDK.Support; +using System.Reflection; +using System.Collections.Generic; + namespace iRacingReplayOverlay.Phases { @@ -63,7 +67,7 @@ public void _AnalyseRace(Action onComplete) //add here complete Analyse of race - not only incidents - AnalyseRaceSituations(); + AnalyseRaceSituations(new iRacingConnection().GetBufferedDataFeed()); onComplete(); } @@ -84,11 +88,77 @@ void AnalyseIncidents() } //Analyse race situations at maximum replay speed w/o recording. - void AnalyseRaceSituations() + void AnalyseRaceSituations(IEnumerable samples) { - // - + //Start iRacing Replay from the beginning with maximum speed (16x) + iRacing.Replay.MoveToFrame(raceStartFrameNumber); + iRacing.Replay.SetSpeed(16); + + //copied from iRacing.Capturing because race events in app V1.0.x.x are identified during capturing the whole video. + var overlayData = new OverlayData(); + var removalEdits = new RemovalEdits(overlayData.RaceEvents); + var commentaryMessages = new CommentaryMessages(overlayData); + //var videoCapture = new VideoCapture(); //do not capture a video during analysis + var recordPitStop = new RecordPitStop(commentaryMessages); + var fastestLaps = new RecordFastestLaps(overlayData); + var replayControl = new ReplayControl(samples.First().SessionData, incidents, removalEdits, TrackCameras); + var sessionDataCapture = new SessionDataCapture(overlayData); + var captureLeaderBoardEveryHalfSecond = new SampleFilter(TimeSpan.FromSeconds(0.5), + new CaptureLeaderBoard(overlayData, commentaryMessages, removalEdits).Process); + var captureCamDriverEveryQuaterSecond = new SampleFilter(TimeSpan.FromSeconds(0.25), + new CaptureCamDriver(overlayData).Process); + + var captureCamDriverEvery4Seconds = new SampleFilter(TimeSpan.FromSeconds(4), + new LogCamDriver().Process); + + + TraceDebug.WriteLine("Cameras:"); + TraceDebug.WriteLine(TrackCameras.ToString()); + + ApplyFirstLapCameraDirection(samples, replayControl); + + samples = samples + .VerifyReplayFrames() + .WithCorrectedPercentages() + .WithCorrectedDistances() + .WithFastestLaps() + .WithFinishingStatus() + .WithPitStopCounts() + .TakeUntil(3.Seconds()).Of(d => d.Telemetry.LeaderHasFinished && d.Telemetry.RaceCars.All(c => c.HasSeenCheckeredFlag || c.HasRetired || c.TrackSurface != TrackLocation.OnTrack)) + .TakeUntil(3.Seconds()).AfterReplayPaused(); + + if (shortTestOnly) + { + samples = samples.AtSpeed(Settings.Default.TimingFactorForShortTest); + Settings.AppliedTimingFactor = 1.0 / Settings.Default.TimingFactorForShortTest; + } + + //videoCapture.Activate(workingFolder); //do not capture a video during analysis + var startTime = DateTime.Now; + + overlayData.CapturedVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); + + foreach (var data in samples) + { + var relativeTime = DateTime.Now - startTime; + + replayControl.Process(data); + sessionDataCapture.Process(data); + captureLeaderBoardEveryHalfSecond.Process(data, relativeTime); + captureCamDriverEveryQuaterSecond.Process(data, relativeTime); + recordPitStop.Process(data, relativeTime); + fastestLaps.Process(data, relativeTime); + removalEdits.Process(data, relativeTime); + captureCamDriverEvery4Seconds.Process(data, relativeTime); + } + + //var files = videoCapture.Deactivate(); //do not capture a video during analysis + + removalEdits.Stop(); + + //var overlayFile = SaveOverlayData(overlayData, files); + iRacing.Replay.SetSpeed(0); } } } From 900fae15bf5674cf7cec8d24a9becfddb9f5919c Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sun, 17 May 2020 20:45:12 +0200 Subject: [PATCH 14/90] code added to save replayscript after full analysis of race in fast-forward mode (16x) --- Phases/AnalyseRace.cs | 16 +++++----------- Phases/CaptureRace.cs | 12 ++++++++++++ 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index 2f74e97..7c5a4ea 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -98,7 +98,6 @@ void AnalyseRaceSituations(IEnumerable samples) var overlayData = new OverlayData(); var removalEdits = new RemovalEdits(overlayData.RaceEvents); var commentaryMessages = new CommentaryMessages(overlayData); - //var videoCapture = new VideoCapture(); //do not capture a video during analysis var recordPitStop = new RecordPitStop(commentaryMessages); var fastestLaps = new RecordFastestLaps(overlayData); var replayControl = new ReplayControl(samples.First().SessionData, incidents, removalEdits, TrackCameras); @@ -126,14 +125,9 @@ void AnalyseRaceSituations(IEnumerable samples) .WithPitStopCounts() .TakeUntil(3.Seconds()).Of(d => d.Telemetry.LeaderHasFinished && d.Telemetry.RaceCars.All(c => c.HasSeenCheckeredFlag || c.HasRetired || c.TrackSurface != TrackLocation.OnTrack)) .TakeUntil(3.Seconds()).AfterReplayPaused(); + samples = samples.AtSpeed(16); + Settings.AppliedTimingFactor = 1.0 / 16.0; - if (shortTestOnly) - { - samples = samples.AtSpeed(Settings.Default.TimingFactorForShortTest); - Settings.AppliedTimingFactor = 1.0 / Settings.Default.TimingFactorForShortTest; - } - - //videoCapture.Activate(workingFolder); //do not capture a video during analysis var startTime = DateTime.Now; overlayData.CapturedVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); @@ -152,11 +146,11 @@ void AnalyseRaceSituations(IEnumerable samples) captureCamDriverEvery4Seconds.Process(data, relativeTime); } - //var files = videoCapture.Deactivate(); //do not capture a video during analysis - removalEdits.Stop(); - //var overlayFile = SaveOverlayData(overlayData, files); + //save OverlayData into target folder for video ("working folder") + + var overlayFile = SaveReplaySript(overlayData); iRacing.Replay.SetSpeed(0); } diff --git a/Phases/CaptureRace.cs b/Phases/CaptureRace.cs index 9ecb59a..6832a90 100644 --- a/Phases/CaptureRace.cs +++ b/Phases/CaptureRace.cs @@ -191,5 +191,17 @@ string SaveOverlayData(OverlayData overlayData, List files) return overlayFile; } + + string SaveReplaySript (OverlayData overlayData) + { + string fullNameReplayScript = workingFolder + DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + ".replayscript"; + + Trace.WriteLine("Saving ReplayScript (analysis phase) to {0}" + fullNameReplayScript); + + overlayData.SaveTo(fullNameReplayScript); + + return fullNameReplayScript; + } + } } From 737d0ecfd8274c92f23ee93e06f8310972868974 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sun, 17 May 2020 23:07:52 +0200 Subject: [PATCH 15/90] Bugfix: Build correct full-filename in SaveReplayScript --- Phases/AnalyseRace.cs | 2 +- Phases/CaptureRace.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index 7c5a4ea..b5392b8 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -150,7 +150,7 @@ void AnalyseRaceSituations(IEnumerable samples) //save OverlayData into target folder for video ("working folder") - var overlayFile = SaveReplaySript(overlayData); + var overlayFile = SaveReplayScript(overlayData); iRacing.Replay.SetSpeed(0); } diff --git a/Phases/CaptureRace.cs b/Phases/CaptureRace.cs index 6832a90..8cb4e61 100644 --- a/Phases/CaptureRace.cs +++ b/Phases/CaptureRace.cs @@ -192,9 +192,9 @@ string SaveOverlayData(OverlayData overlayData, List files) return overlayFile; } - string SaveReplaySript (OverlayData overlayData) + string SaveReplayScript (OverlayData overlayData) { - string fullNameReplayScript = workingFolder + DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + ".replayscript"; + string fullNameReplayScript = workingFolder + "/" + DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + "analysis.replayscript"; Trace.WriteLine("Saving ReplayScript (analysis phase) to {0}" + fullNameReplayScript); From 758f400c23b046e8460cc8ffbc14d2fcd3f9cbf0 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sun, 17 May 2020 23:35:47 +0200 Subject: [PATCH 16/90] Return value of SaveReplayScript not necessary --- Phases/AnalyseRace.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index b5392b8..89bbed8 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -150,7 +150,7 @@ void AnalyseRaceSituations(IEnumerable samples) //save OverlayData into target folder for video ("working folder") - var overlayFile = SaveReplayScript(overlayData); + SaveReplayScript(overlayData); iRacing.Replay.SetSpeed(0); } From 03f68d0ca45febef1eddc0e0b9419016655d0a85 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Thu, 21 May 2020 16:30:37 +0200 Subject: [PATCH 17/90] Added project for plugin supporting the interface but not drawing anything. --- iRacingReplayOverlay.net.sln | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/iRacingReplayOverlay.net.sln b/iRacingReplayOverlay.net.sln index 731602d..7f0a2a4 100644 --- a/iRacingReplayOverlay.net.sln +++ b/iRacingReplayOverlay.net.sln @@ -44,6 +44,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JockeOverlays", "plugins\Jo EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iRacingReplayDirector", "iRacingReplayDirector.csproj", "{F82A3871-1554-4964-BF81-59854E9C4BB3}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NoOverlay", "plugins\NoOverlay\NoOverlay.csproj", "{C4ABC83D-1801-4407-B7C2-BDF9396D28AD}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -156,6 +158,14 @@ Global {F82A3871-1554-4964-BF81-59854E9C4BB3}.Release|Any CPU.ActiveCfg = Release|x64 {F82A3871-1554-4964-BF81-59854E9C4BB3}.Release|x64.ActiveCfg = Release|x64 {F82A3871-1554-4964-BF81-59854E9C4BB3}.Release|x64.Build.0 = Release|x64 + {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Debug|x64.ActiveCfg = Debug|Any CPU + {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Debug|x64.Build.0 = Debug|Any CPU + {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Release|Any CPU.Build.0 = Release|Any CPU + {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Release|x64.ActiveCfg = Release|Any CPU + {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From ad34c553bc17ec3049bee293b6badee95563ba61 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Thu, 21 May 2020 16:40:20 +0200 Subject: [PATCH 18/90] Revert "Merge "NoOverlay PlugIn" into the branch" This reverts commit fa9e0940e0b9b0880c5f72219406ea909f1f20ee, reversing changes made to a55bbb231e790d130c3cc2bc9d4626310b67304c. --- Main.Designer.cs | 65 +++++++++++++++++++++----------- Main.cs | 12 +++++- Properties/Resources.Designer.cs | 6 +-- iRacingReplayDirector.csproj | 2 +- iRacingReplayOverlay.net.sln | 24 ++++-------- 5 files changed, 64 insertions(+), 45 deletions(-) diff --git a/Main.Designer.cs b/Main.Designer.cs index 074bfb0..f451dba 100644 --- a/Main.Designer.cs +++ b/Main.Designer.cs @@ -52,7 +52,7 @@ private void InitializeComponent() this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabCapture = new System.Windows.Forms.TabPage(); this.checkBoxShutdownAfterEncode = new System.Windows.Forms.CheckBox(); - this.EncodeVideoAfterCapture = new System.Windows.Forms.CheckBox(); + this.cb_EncodeVideoAfterCapture = new System.Windows.Forms.CheckBox(); this.verifyVideoCaptureButton = new System.Windows.Forms.Button(); this.configureTrackCamerasLabel = new System.Windows.Forms.Label(); this.TestOnlyCheckBox = new System.Windows.Forms.CheckBox(); @@ -82,6 +82,7 @@ private void InitializeComponent() this.changeVersionButton = new System.Windows.Forms.Button(); this.configurePluginsButton = new System.Windows.Forms.Button(); this.newVersionMessage = new System.Windows.Forms.Label(); + this.cb_FastVideoRecording = new System.Windows.Forms.CheckBox(); this.tabControl1.SuspendLayout(); this.tabCapture.SuspendLayout(); this.tabTranscoding.SuspendLayout(); @@ -132,7 +133,8 @@ private void InitializeComponent() // tabCapture // this.tabCapture.Controls.Add(this.checkBoxShutdownAfterEncode); - this.tabCapture.Controls.Add(this.EncodeVideoAfterCapture); + this.tabCapture.Controls.Add(this.cb_FastVideoRecording); + this.tabCapture.Controls.Add(this.cb_EncodeVideoAfterCapture); this.tabCapture.Controls.Add(this.verifyVideoCaptureButton); this.tabCapture.Controls.Add(this.configureTrackCamerasLabel); this.tabCapture.Controls.Add(this.TestOnlyCheckBox); @@ -156,7 +158,9 @@ private void InitializeComponent() // checkBoxShutdownAfterEncode // this.checkBoxShutdownAfterEncode.AutoSize = true; - this.checkBoxShutdownAfterEncode.Location = new System.Drawing.Point(514, 18); + this.checkBoxShutdownAfterEncode.Checked = true; + this.checkBoxShutdownAfterEncode.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBoxShutdownAfterEncode.Location = new System.Drawing.Point(514, 29); this.checkBoxShutdownAfterEncode.Name = "checkBoxShutdownAfterEncode"; this.checkBoxShutdownAfterEncode.Size = new System.Drawing.Size(189, 23); this.checkBoxShutdownAfterEncode.TabIndex = 8; @@ -164,20 +168,21 @@ private void InitializeComponent() this.checkBoxShutdownAfterEncode.UseVisualStyleBackColor = true; this.checkBoxShutdownAfterEncode.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); // - // EncodeVideoAfterCapture + // cb_EncodeVideoAfterCapture // - this.EncodeVideoAfterCapture.AutoSize = true; - this.EncodeVideoAfterCapture.Location = new System.Drawing.Point(300, 18); - this.EncodeVideoAfterCapture.Name = "EncodeVideoAfterCapture"; - this.EncodeVideoAfterCapture.Size = new System.Drawing.Size(207, 23); - this.EncodeVideoAfterCapture.TabIndex = 8; - this.EncodeVideoAfterCapture.Text = "Encode Video After Capture"; - this.EncodeVideoAfterCapture.UseVisualStyleBackColor = true; + this.cb_EncodeVideoAfterCapture.AutoSize = true; + this.cb_EncodeVideoAfterCapture.Location = new System.Drawing.Point(300, 29); + this.cb_EncodeVideoAfterCapture.Name = "cb_EncodeVideoAfterCapture"; + this.cb_EncodeVideoAfterCapture.Size = new System.Drawing.Size(207, 23); + this.cb_EncodeVideoAfterCapture.TabIndex = 8; + this.cb_EncodeVideoAfterCapture.Text = "Encode Video After Capture"; + this.cb_EncodeVideoAfterCapture.UseVisualStyleBackColor = true; + this.cb_EncodeVideoAfterCapture.CheckedChanged += new System.EventHandler(this.EncodeVideoAfterCapture_CheckedChanged); // // verifyVideoCaptureButton // this.verifyVideoCaptureButton.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.verifyVideoCaptureButton.Location = new System.Drawing.Point(586, 132); + this.verifyVideoCaptureButton.Location = new System.Drawing.Point(586, 180); this.verifyVideoCaptureButton.Margin = new System.Windows.Forms.Padding(4); this.verifyVideoCaptureButton.Name = "verifyVideoCaptureButton"; this.verifyVideoCaptureButton.Size = new System.Drawing.Size(153, 30); @@ -190,7 +195,7 @@ private void InitializeComponent() // this.configureTrackCamerasLabel.Font = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.configureTrackCamerasLabel.ForeColor = System.Drawing.Color.DarkRed; - this.configureTrackCamerasLabel.Location = new System.Drawing.Point(174, 48); + this.configureTrackCamerasLabel.Location = new System.Drawing.Point(7, 115); this.configureTrackCamerasLabel.Name = "configureTrackCamerasLabel"; this.configureTrackCamerasLabel.Size = new System.Drawing.Size(279, 30); this.configureTrackCamerasLabel.TabIndex = 9; @@ -201,7 +206,7 @@ private void InitializeComponent() // TestOnlyCheckBox // this.TestOnlyCheckBox.AutoSize = true; - this.TestOnlyCheckBox.Location = new System.Drawing.Point(174, 18); + this.TestOnlyCheckBox.Location = new System.Drawing.Point(174, 29); this.TestOnlyCheckBox.Name = "TestOnlyCheckBox"; this.TestOnlyCheckBox.Size = new System.Drawing.Size(126, 23); this.TestOnlyCheckBox.TabIndex = 7; @@ -211,7 +216,7 @@ private void InitializeComponent() // WaitingForIRacingLabel // this.WaitingForIRacingLabel.ForeColor = System.Drawing.Color.DarkRed; - this.WaitingForIRacingLabel.Location = new System.Drawing.Point(174, 44); + this.WaitingForIRacingLabel.Location = new System.Drawing.Point(6, 115); this.WaitingForIRacingLabel.Name = "WaitingForIRacingLabel"; this.WaitingForIRacingLabel.Size = new System.Drawing.Size(547, 41); this.WaitingForIRacingLabel.TabIndex = 11; @@ -220,7 +225,7 @@ private void InitializeComponent() // ProcessErrorMessageLabel // this.ProcessErrorMessageLabel.ForeColor = System.Drawing.Color.DarkRed; - this.ProcessErrorMessageLabel.Location = new System.Drawing.Point(174, 44); + this.ProcessErrorMessageLabel.Location = new System.Drawing.Point(6, 115); this.ProcessErrorMessageLabel.Name = "ProcessErrorMessageLabel"; this.ProcessErrorMessageLabel.Size = new System.Drawing.Size(547, 50); this.ProcessErrorMessageLabel.TabIndex = 10; @@ -230,7 +235,7 @@ private void InitializeComponent() // CapturingRaceLabel // this.CapturingRaceLabel.ForeColor = System.Drawing.Color.DarkRed; - this.CapturingRaceLabel.Location = new System.Drawing.Point(174, 48); + this.CapturingRaceLabel.Location = new System.Drawing.Point(6, 115); this.CapturingRaceLabel.Name = "CapturingRaceLabel"; this.CapturingRaceLabel.Size = new System.Drawing.Size(406, 50); this.CapturingRaceLabel.TabIndex = 12; @@ -240,7 +245,7 @@ private void InitializeComponent() // AnalysingRaceLabel // this.AnalysingRaceLabel.ForeColor = System.Drawing.Color.DarkRed; - this.AnalysingRaceLabel.Location = new System.Drawing.Point(174, 44); + this.AnalysingRaceLabel.Location = new System.Drawing.Point(6, 115); this.AnalysingRaceLabel.Name = "AnalysingRaceLabel"; this.AnalysingRaceLabel.Size = new System.Drawing.Size(406, 50); this.AnalysingRaceLabel.TabIndex = 13; @@ -249,7 +254,7 @@ private void InitializeComponent() // // label2 // - this.label2.Location = new System.Drawing.Point(6, 178); + this.label2.Location = new System.Drawing.Point(6, 226); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(594, 55); this.label2.TabIndex = 18; @@ -271,7 +276,7 @@ private void InitializeComponent() // // workingFolderButton // - this.workingFolderButton.Location = new System.Drawing.Point(516, 132); + this.workingFolderButton.Location = new System.Drawing.Point(516, 180); this.workingFolderButton.Name = "workingFolderButton"; this.workingFolderButton.Size = new System.Drawing.Size(64, 30); this.workingFolderButton.TabIndex = 16; @@ -282,7 +287,7 @@ private void InitializeComponent() // label5 // this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(6, 137); + this.label5.Location = new System.Drawing.Point(6, 185); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(149, 19); this.label5.TabIndex = 14; @@ -290,7 +295,7 @@ private void InitializeComponent() // // workingFolderTextBox // - this.workingFolderTextBox.Location = new System.Drawing.Point(156, 134); + this.workingFolderTextBox.Location = new System.Drawing.Point(156, 182); this.workingFolderTextBox.Name = "workingFolderTextBox"; this.workingFolderTextBox.Size = new System.Drawing.Size(355, 27); this.workingFolderTextBox.TabIndex = 15; @@ -482,6 +487,19 @@ private void InitializeComponent() this.newVersionMessage.Text = "New Version available ->"; this.newVersionMessage.Visible = false; // + // cb_FastVideoRecording + // + this.cb_FastVideoRecording.AutoSize = true; + this.cb_FastVideoRecording.Checked = true; + this.cb_FastVideoRecording.CheckState = System.Windows.Forms.CheckState.Checked; + this.cb_FastVideoRecording.Location = new System.Drawing.Point(300, 58); + this.cb_FastVideoRecording.Name = "cb_FastVideoRecording"; + this.cb_FastVideoRecording.Size = new System.Drawing.Size(326, 23); + this.cb_FastVideoRecording.TabIndex = 8; + this.cb_FastVideoRecording.Text = "Fast video recording using OBS pause/resume"; + this.cb_FastVideoRecording.UseVisualStyleBackColor = true; + this.cb_FastVideoRecording.CheckedChanged += new System.EventHandler(this.cb_FastVideoRecording_CheckedChanged); + // // Main // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 19F); @@ -549,10 +567,11 @@ private void InitializeComponent() private System.Windows.Forms.Button verifyVideoCaptureButton; private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button2; - private System.Windows.Forms.CheckBox EncodeVideoAfterCapture; + private System.Windows.Forms.CheckBox cb_EncodeVideoAfterCapture; private System.Windows.Forms.Button changeVersionButton; private System.Windows.Forms.Button configurePluginsButton; private System.Windows.Forms.Label newVersionMessage; private System.Windows.Forms.CheckBox checkBoxShutdownAfterEncode; + private System.Windows.Forms.CheckBox cb_FastVideoRecording; } } \ No newline at end of file diff --git a/Main.cs b/Main.cs index 506224b..53af89d 100644 --- a/Main.cs +++ b/Main.cs @@ -520,7 +520,7 @@ void BeginProcessButton_Click(object sender, EventArgs e) WindowState = FormWindowState.Normal; this.BringToFront(); - if (errorMessage == null && transcodeVideoButton.Enabled && EncodeVideoAfterCapture.Checked) + if (errorMessage == null && transcodeVideoButton.Enabled && cb_EncodeVideoAfterCapture.Checked) { tabControl1.SelectedIndex = 1; Thread.Sleep(1000); @@ -613,5 +613,15 @@ private void checkBox1_CheckedChanged(object sender, EventArgs e) { } + + private void cb_FastVideoRecording_CheckedChanged(object sender, EventArgs e) + { + cb_EncodeVideoAfterCapture.Checked = !cb_FastVideoRecording.Checked; + } + + private void EncodeVideoAfterCapture_CheckedChanged(object sender, EventArgs e) + { + cb_FastVideoRecording.Checked = !cb_EncodeVideoAfterCapture.Checked; + } } } diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index dd8fcb2..cdfb660 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace iRacingReplayOverlay.Properties { +namespace iRacingReplayDirector.Properties { using System; @@ -19,7 +19,7 @@ namespace iRacingReplayOverlay.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { @@ -39,7 +39,7 @@ internal Resources() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("iRacingReplayOverlay.Properties.Resources", typeof(Resources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("iRacingReplayDirector.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; diff --git a/iRacingReplayDirector.csproj b/iRacingReplayDirector.csproj index 97f19d4..bfc160f 100644 --- a/iRacingReplayDirector.csproj +++ b/iRacingReplayDirector.csproj @@ -6,7 +6,7 @@ $(OverrideAssemblyName) Debug x64 - {F82A3871-1554-4964-BF81-59854E9C4BB3} + {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18} WinExe Properties iRacingReplayDirector diff --git a/iRacingReplayOverlay.net.sln b/iRacingReplayOverlay.net.sln index 7f0a2a4..95b04c1 100644 --- a/iRacingReplayOverlay.net.sln +++ b/iRacingReplayOverlay.net.sln @@ -42,9 +42,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iRacingDirector.Plugin.Test EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JockeOverlays", "plugins\JockeOverlays\JockeOverlays.csproj", "{F49DAE6F-321E-45A8-B9B4-23475A3F6080}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iRacingReplayDirector", "iRacingReplayDirector.csproj", "{F82A3871-1554-4964-BF81-59854E9C4BB3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NoOverlay", "plugins\NoOverlay\NoOverlay.csproj", "{C4ABC83D-1801-4407-B7C2-BDF9396D28AD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iRacingReplayDirector", "iRacingReplayDirector.csproj", "{E9EB76FC-CB86-47EA-A1F3-01570C1BBC18}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -152,20 +150,12 @@ Global {F49DAE6F-321E-45A8-B9B4-23475A3F6080}.Release|Any CPU.Build.0 = Release|Any CPU {F49DAE6F-321E-45A8-B9B4-23475A3F6080}.Release|x64.ActiveCfg = Release|Any CPU {F49DAE6F-321E-45A8-B9B4-23475A3F6080}.Release|x64.Build.0 = Release|Any CPU - {F82A3871-1554-4964-BF81-59854E9C4BB3}.Debug|Any CPU.ActiveCfg = Debug|x64 - {F82A3871-1554-4964-BF81-59854E9C4BB3}.Debug|x64.ActiveCfg = Debug|x64 - {F82A3871-1554-4964-BF81-59854E9C4BB3}.Debug|x64.Build.0 = Debug|x64 - {F82A3871-1554-4964-BF81-59854E9C4BB3}.Release|Any CPU.ActiveCfg = Release|x64 - {F82A3871-1554-4964-BF81-59854E9C4BB3}.Release|x64.ActiveCfg = Release|x64 - {F82A3871-1554-4964-BF81-59854E9C4BB3}.Release|x64.Build.0 = Release|x64 - {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Debug|x64.ActiveCfg = Debug|Any CPU - {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Debug|x64.Build.0 = Debug|Any CPU - {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Release|Any CPU.Build.0 = Release|Any CPU - {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Release|x64.ActiveCfg = Release|Any CPU - {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Release|x64.Build.0 = Release|Any CPU + {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18}.Debug|Any CPU.ActiveCfg = Debug|x64 + {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18}.Debug|x64.ActiveCfg = Debug|x64 + {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18}.Debug|x64.Build.0 = Debug|x64 + {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18}.Release|Any CPU.ActiveCfg = Release|x64 + {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18}.Release|x64.ActiveCfg = Release|x64 + {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From 1f52d3ef7ceddd8069311bde21efed9d92faf8ff Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Thu, 21 May 2020 17:59:12 +0200 Subject: [PATCH 19/90] Remove Submodule iRacingSDK.NET --- .gitmodules | 3 --- iRacingSDK.Net | 1 - 2 files changed, 4 deletions(-) delete mode 160000 iRacingSDK.Net diff --git a/.gitmodules b/.gitmodules index bc28a49..0a4c383 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,6 +13,3 @@ [submodule "plugins/JockeOverlays"] path = plugins/JockeOverlays url = git://github.com/vipoo/JockeOverlays.git -[submodule "iRacingSDK.NET"] - path = iRacingSDK.NET - url = https://github.com/MerlinCooper/iRacingSDK.Net.git diff --git a/iRacingSDK.Net b/iRacingSDK.Net deleted file mode 160000 index ab9427c..0000000 --- a/iRacingSDK.Net +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ab9427ce8fa38eb6b4b4c6716deb5f130aaaa29e From 5b87a1a8f1dece5f9f86de41ae8fd81ccb379748 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Thu, 21 May 2020 18:05:47 +0200 Subject: [PATCH 20/90] Add submodule iRacingSKD.NET Using fork of MerlinCooper --- .gitmodules | 3 +++ iRacingSDK.Net | 1 + 2 files changed, 4 insertions(+) create mode 160000 iRacingSDK.Net diff --git a/.gitmodules b/.gitmodules index 0a4c383..7c9a28f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule "plugins/JockeOverlays"] path = plugins/JockeOverlays url = git://github.com/vipoo/JockeOverlays.git +[submodule "iRacingSDK.Net"] + path = iRacingSDK.Net + url = https://github.com/MerlinCooper/iRacingSDK.Net.git diff --git a/iRacingSDK.Net b/iRacingSDK.Net new file mode 160000 index 0000000..ab9427c --- /dev/null +++ b/iRacingSDK.Net @@ -0,0 +1 @@ +Subproject commit ab9427ce8fa38eb6b4b4c6716deb5f130aaaa29e From 10464ad59d5b7271ebce2c8d756c1ecbb5f91484 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Fri, 22 May 2020 08:58:17 +0200 Subject: [PATCH 21/90] Add Methode to send pause/resume Keystroke to OBS --- Phases/Direction/VideoCapture.cs | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/Phases/Direction/VideoCapture.cs b/Phases/Direction/VideoCapture.cs index 34e8c32..b052597 100644 --- a/Phases/Direction/VideoCapture.cs +++ b/Phases/Direction/VideoCapture.cs @@ -33,7 +33,7 @@ public class VideoCapture DateTime started; Timer timer; List captureFileNames = new List(); - + public void Activate(string workingFolder) { this.workingFolder = workingFolder; @@ -44,7 +44,7 @@ public void Activate(string workingFolder) timer.AutoReset = false; timer.Enabled = true; - SendKeyStroke(); + SendKeyStroke_StartStopp(); } private void CaptureNewFileNames(object sender, ElapsedEventArgs e) @@ -86,7 +86,7 @@ public List Deactivate() t.Dispose(); } - SendKeyStroke(); + SendKeyStroke_StartStopp(); System.Threading.Thread.Sleep(2000); @@ -97,9 +97,22 @@ public List Deactivate() return captureFileNames; } - private static void SendKeyStroke() + private static void SendKeyStroke_StartStopp() + { + TraceInfo.WriteLine("Sending key event to start/stopp recording ALT+F9"); + + Keyboard.keybd_event(Keyboard.VK_MENU, 0, 0, UIntPtr.Zero); + System.Threading.Thread.Sleep(700); + Keyboard.keybd_event(Keyboard.VK_F9, 0, 0, UIntPtr.Zero); + System.Threading.Thread.Sleep(700); + Keyboard.keybd_event(Keyboard.VK_F9, 0, Keyboard.KEYEVENTF_KEYUP, UIntPtr.Zero); + System.Threading.Thread.Sleep(700); + Keyboard.keybd_event(Keyboard.VK_MENU, 0, Keyboard.KEYEVENTF_KEYUP, UIntPtr.Zero); + } + + private static void SendKeyStroke_PauseResume() { - TraceInfo.WriteLine("Sending key event ALT+F9"); + TraceInfo.WriteLine("Sending key event to start/stopp recording ALT+F9"); Keyboard.keybd_event(Keyboard.VK_MENU, 0, 0, UIntPtr.Zero); System.Threading.Thread.Sleep(700); From d20b1c0007ce83e3fe5017280722efe3309f6db8 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Fri, 22 May 2020 08:58:39 +0200 Subject: [PATCH 22/90] Add NoOverlay Project to Solution --- iRacingReplayOverlay.net.sln | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/iRacingReplayOverlay.net.sln b/iRacingReplayOverlay.net.sln index 95b04c1..f3aecc5 100644 --- a/iRacingReplayOverlay.net.sln +++ b/iRacingReplayOverlay.net.sln @@ -14,6 +14,9 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample", "iRacingSDK.Net\Sample\Sample.csproj", "{8BDF1915-3140-478E-827F-25D495B8CDC5}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tester", "Tester\Tester.csproj", "{7D205FCC-6CE6-49B3-8012-DC14ED9924D1}" + ProjectSection(ProjectDependencies) = postProject + {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18} = {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18} + EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iRacingReplayOverlay.net.Tests", "iRacingReplayOverlay.net.Tests\iRacingReplayOverlay.net.Tests.csproj", "{E4D21BA6-6275-4D46-A1D6-E7D16BF0E5EC}" EndProject @@ -43,6 +46,13 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JockeOverlays", "plugins\JockeOverlays\JockeOverlays.csproj", "{F49DAE6F-321E-45A8-B9B4-23475A3F6080}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iRacingReplayDirector", "iRacingReplayDirector.csproj", "{E9EB76FC-CB86-47EA-A1F3-01570C1BBC18}" + ProjectSection(ProjectDependencies) = postProject + {5422AE20-F220-4BE1-9E61-5296981ABB5C} = {5422AE20-F220-4BE1-9E61-5296981ABB5C} + {CEC2BB31-324D-41E3-83C8-A5C35C63129B} = {CEC2BB31-324D-41E3-83C8-A5C35C63129B} + {5916B84C-0264-4102-9CCC-28006D84E4FA} = {5916B84C-0264-4102-9CCC-28006D84E4FA} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NoOverlay", "plugins\NoOverlay\NoOverlay.csproj", "{C4ABC83D-1801-4407-B7C2-BDF9396D28AD}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -156,6 +166,14 @@ Global {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18}.Release|Any CPU.ActiveCfg = Release|x64 {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18}.Release|x64.ActiveCfg = Release|x64 {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18}.Release|x64.Build.0 = Release|x64 + {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Debug|x64.ActiveCfg = Debug|Any CPU + {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Debug|x64.Build.0 = Debug|Any CPU + {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Release|Any CPU.Build.0 = Release|Any CPU + {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Release|x64.ActiveCfg = Release|Any CPU + {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From 0edfb996aa05de2ad11f518ab04b56360a771c63 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Fri, 22 May 2020 11:10:25 +0200 Subject: [PATCH 23/90] add variable whether PauseResume to be used and pass on to iRacingReplay. --- Main.cs | 2 +- Phases/IRacingReplay.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Main.cs b/Main.cs index 53af89d..8efbcdb 100644 --- a/Main.cs +++ b/Main.cs @@ -490,7 +490,7 @@ void BeginProcessButton_Click(object sender, EventArgs e) NativeMethods.SetThreadExecutionState(NativeMethods.ES_CONTINUOUS | NativeMethods.ES_SYSTEM_REQUIRED | NativeMethods.ES_DISPLAY_REQUIRED); - iRacingProcess = new IRacingReplay(shortTestOnly: TestOnlyCheckBox.Checked) + iRacingProcess = new IRacingReplay(shortTestOnly: TestOnlyCheckBox.Checked, bRecordPauseResume:cb_FastVideoRecording.Checked) .WithWorkingFolder(workingFolderTextBox.Text) .AnalyseRace(() => { AnalysingRaceLabel.Visible = false; CapturingRaceLabel.Visible = true; }) .CaptureOpeningScenes() diff --git a/Phases/IRacingReplay.cs b/Phases/IRacingReplay.cs index bebfe24..b4fa3d6 100644 --- a/Phases/IRacingReplay.cs +++ b/Phases/IRacingReplay.cs @@ -37,10 +37,12 @@ public partial class IRacingReplay { List actions = new List(); bool shortTestOnly; + bool bRecordPauseResume; - public IRacingReplay(bool shortTestOnly = false) + public IRacingReplay(bool shortTestOnly = false, bool bRecordPauseResume=false) { this.shortTestOnly = shortTestOnly; + this.bRecordPauseResume = bRecordPauseResume; } private void Add(Action action, Action onComplete) From 658fcfbee3eaac3d5d860f9df95a45cf2277dcbe Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sat, 23 May 2020 10:32:55 +0200 Subject: [PATCH 24/90] Added comment to code --- Phases/Direction/VideoCapture.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Phases/Direction/VideoCapture.cs b/Phases/Direction/VideoCapture.cs index b052597..1cb9442 100644 --- a/Phases/Direction/VideoCapture.cs +++ b/Phases/Direction/VideoCapture.cs @@ -44,7 +44,7 @@ public void Activate(string workingFolder) timer.AutoReset = false; timer.Enabled = true; - SendKeyStroke_StartStopp(); + SendKeyStroke_StartStopp(); //Send hot-key to start recording } private void CaptureNewFileNames(object sender, ElapsedEventArgs e) From fb1e7e9f0b776cf266250439bf86a50ab81af4c1 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sat, 23 May 2020 10:35:24 +0200 Subject: [PATCH 25/90] Use same instances of classes needed for anlysis and recording by adding internal members to iRacingReplay class. --- Phases/AnalyseRace.cs | 40 ++++++++++++++++++++++++++-------------- Phases/CaptureRace.cs | 22 ++++++++++++++-------- 2 files changed, 40 insertions(+), 22 deletions(-) diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index 89bbed8..fd85a84 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -40,6 +40,19 @@ public partial class IRacingReplay int raceStartFrameNumber = 0; internal Incidents incidents; + //create classes needed to analze race as global variables in the iRacingReplay instance + internal OverlayData overlayData = new OverlayData(); + internal RemovalEdits removalEdits; + internal CommentaryMessages commentaryMessages; + internal RecordPitStop recordPitStop; + internal RecordFastestLaps fastestLaps; + internal ReplayControl replayControl; + internal SessionDataCapture sessionDataCapture; + internal SampleFilter captureLeaderBoardEveryHalfSecond; + internal SampleFilter captureCamDriverEveryQuaterSecond; + internal SampleFilter captureCamDriverEvery4Seconds; + + public void _AnalyseRace(Action onComplete) { var hwnd = Win32.Messages.FindWindow(null, "iRacing.com Simulator"); @@ -95,25 +108,22 @@ void AnalyseRaceSituations(IEnumerable samples) iRacing.Replay.SetSpeed(16); //copied from iRacing.Capturing because race events in app V1.0.x.x are identified during capturing the whole video. - var overlayData = new OverlayData(); - var removalEdits = new RemovalEdits(overlayData.RaceEvents); - var commentaryMessages = new CommentaryMessages(overlayData); - var recordPitStop = new RecordPitStop(commentaryMessages); - var fastestLaps = new RecordFastestLaps(overlayData); - var replayControl = new ReplayControl(samples.First().SessionData, incidents, removalEdits, TrackCameras); - var sessionDataCapture = new SessionDataCapture(overlayData); - var captureLeaderBoardEveryHalfSecond = new SampleFilter(TimeSpan.FromSeconds(0.5), + //var overlayData = new OverlayData(); + removalEdits = new RemovalEdits(overlayData.RaceEvents); + commentaryMessages = new CommentaryMessages(overlayData); + recordPitStop = new RecordPitStop(commentaryMessages); + fastestLaps = new RecordFastestLaps(overlayData); + replayControl = new ReplayControl(samples.First().SessionData, incidents, removalEdits, TrackCameras); + sessionDataCapture = new SessionDataCapture(overlayData); + captureLeaderBoardEveryHalfSecond = new SampleFilter(TimeSpan.FromSeconds(0.5), new CaptureLeaderBoard(overlayData, commentaryMessages, removalEdits).Process); - var captureCamDriverEveryQuaterSecond = new SampleFilter(TimeSpan.FromSeconds(0.25), + captureCamDriverEveryQuaterSecond = new SampleFilter(TimeSpan.FromSeconds(0.25), new CaptureCamDriver(overlayData).Process); - var captureCamDriverEvery4Seconds = new SampleFilter(TimeSpan.FromSeconds(4), + captureCamDriverEvery4Seconds = new SampleFilter(TimeSpan.FromSeconds(4), new LogCamDriver().Process); - TraceDebug.WriteLine("Cameras:"); - TraceDebug.WriteLine(TrackCameras.ToString()); - ApplyFirstLapCameraDirection(samples, replayControl); samples = samples @@ -148,9 +158,11 @@ void AnalyseRaceSituations(IEnumerable samples) removalEdits.Stop(); - //save OverlayData into target folder for video ("working folder") + TraceDebug.WriteLine("Race analysis phase completed"); + //save OverlayData into target folder for video ("working folder") SaveReplayScript(overlayData); + TraceDebug.WriteLine("Replay Script saved to disk"); iRacing.Replay.SetSpeed(0); } diff --git a/Phases/CaptureRace.cs b/Phases/CaptureRace.cs index 8cb4e61..0913d76 100644 --- a/Phases/CaptureRace.cs +++ b/Phases/CaptureRace.cs @@ -56,7 +56,9 @@ void _CaptureRace(Action onComplete) internal void _CaptureRaceTest(Action onComplete, IEnumerable samples) { - var overlayData = new OverlayData(); + //use internal class members in iRacingReplay class instead of local variables. + /* + var overlayData = new OverlayData(); var removalEdits = new RemovalEdits(overlayData.RaceEvents); var commentaryMessages = new CommentaryMessages(overlayData); var videoCapture = new VideoCapture(); @@ -74,7 +76,9 @@ internal void _CaptureRaceTest(Action onComplete, IEnumerable onComplete, IEnumerable Date: Sat, 23 May 2020 11:44:50 +0200 Subject: [PATCH 26/90] Add timestamp to OverlayData class --- Phases/Capturing/OverlayData.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Phases/Capturing/OverlayData.cs b/Phases/Capturing/OverlayData.cs index b12358e..f618710 100644 --- a/Phases/Capturing/OverlayData.cs +++ b/Phases/Capturing/OverlayData.cs @@ -57,6 +57,8 @@ public static IEnumerable ToSourceReaderExtra(this IEnumerabl public class OverlayData { + public DateTime overlayDateTime = DateTime.Now; + public class RaceEvent { public double StartTime; From 6d3b18b876df6121921a35a8abc01b0288bc9a4a Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sat, 23 May 2020 11:45:10 +0200 Subject: [PATCH 27/90] added comments to make code more readable --- ClassDiagram2.cd | 11 +++++++++++ Phases/CaptureRace.cs | 11 +++++++---- iRacingReplayDirector.csproj | 1 + 3 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 ClassDiagram2.cd diff --git a/ClassDiagram2.cd b/ClassDiagram2.cd new file mode 100644 index 0000000..889ba35 --- /dev/null +++ b/ClassDiagram2.cd @@ -0,0 +1,11 @@ + + + + + + IAuqIAEACgCUKiICgEAAGhgkDAQEEAAEMAEQAIAACoA= + Phases\AnalyseRace.cs + + + + \ No newline at end of file diff --git a/Phases/CaptureRace.cs b/Phases/CaptureRace.cs index 0913d76..b8dbffa 100644 --- a/Phases/CaptureRace.cs +++ b/Phases/CaptureRace.cs @@ -98,7 +98,7 @@ internal void _CaptureRaceTest(Action onComplete, IEnumerable onComplete, IEnumerable files) string firstFileName; if (files.Count == 0) - firstFileName = workingFolder + "/unknown_capture-{0}".F(DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss")); + //firstFileName = workingFolder + "/unknown_capture-{0}".F(DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss")); + firstFileName = workingFolder + "/unknown_capture-{0}".F(overlayData.overlayDateTime.ToString("yyyy-MM-dd-HH-mm-ss")); else firstFileName = files.First().FileName; @@ -200,7 +202,8 @@ string SaveOverlayData(OverlayData overlayData, List files) string SaveReplayScript (OverlayData overlayData) { - string fullNameReplayScript = workingFolder + "/" + DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + "analysis.replayscript"; + //string fullNameReplayScript = workingFolder + "/" + DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss") + "analysis.replayscript"; + string fullNameReplayScript = workingFolder + "/" + overlayData.overlayDateTime.ToString("yyyy-MM-dd HH-mm-ss") + ".analysis.replayscript"; Trace.WriteLine("Saving ReplayScript (analysis phase) to {0}" + fullNameReplayScript); diff --git a/iRacingReplayDirector.csproj b/iRacingReplayDirector.csproj index bfc160f..0c39e28 100644 --- a/iRacingReplayDirector.csproj +++ b/iRacingReplayDirector.csproj @@ -258,6 +258,7 @@ + From c15517e320531d1773b5604f24d16b560646dadb Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sun, 24 May 2020 14:21:38 +0200 Subject: [PATCH 28/90] Rename boolean variable to make code more readable. --- Main.cs | 2 +- Phases/IRacingReplay.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Main.cs b/Main.cs index 8efbcdb..515a33e 100644 --- a/Main.cs +++ b/Main.cs @@ -490,7 +490,7 @@ void BeginProcessButton_Click(object sender, EventArgs e) NativeMethods.SetThreadExecutionState(NativeMethods.ES_CONTINUOUS | NativeMethods.ES_SYSTEM_REQUIRED | NativeMethods.ES_DISPLAY_REQUIRED); - iRacingProcess = new IRacingReplay(shortTestOnly: TestOnlyCheckBox.Checked, bRecordPauseResume:cb_FastVideoRecording.Checked) + iRacingProcess = new IRacingReplay(shortTestOnly: TestOnlyCheckBox.Checked, bRecordUsingPauseResume:cb_FastVideoRecording.Checked) .WithWorkingFolder(workingFolderTextBox.Text) .AnalyseRace(() => { AnalysingRaceLabel.Visible = false; CapturingRaceLabel.Visible = true; }) .CaptureOpeningScenes() diff --git a/Phases/IRacingReplay.cs b/Phases/IRacingReplay.cs index b4fa3d6..8ca4187 100644 --- a/Phases/IRacingReplay.cs +++ b/Phases/IRacingReplay.cs @@ -37,12 +37,12 @@ public partial class IRacingReplay { List actions = new List(); bool shortTestOnly; - bool bRecordPauseResume; + bool bRecordUsingPauseResume; - public IRacingReplay(bool shortTestOnly = false, bool bRecordPauseResume=false) + public IRacingReplay(bool shortTestOnly = false, bool bRecordUsingPauseResume=false) { this.shortTestOnly = shortTestOnly; - this.bRecordPauseResume = bRecordPauseResume; + this.bRecordUsingPauseResume = bRecordUsingPauseResume; } private void Add(Action action, Action onComplete) From ba1a502c27c6562d233465ff9589b0f558596632 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Tue, 2 Jun 2020 13:20:22 +0200 Subject: [PATCH 29/90] adding placeholder where implmentation of recording race-events supposed to start. --- Phases/CaptureRace.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Phases/CaptureRace.cs b/Phases/CaptureRace.cs index b8dbffa..8e3d7c5 100644 --- a/Phases/CaptureRace.cs +++ b/Phases/CaptureRace.cs @@ -78,6 +78,12 @@ internal void _CaptureRaceTest(Action onComplete, IEnumerable Date: Tue, 2 Jun 2020 14:14:02 +0200 Subject: [PATCH 30/90] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines-1.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 azure-pipelines-1.yml diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml new file mode 100644 index 0000000..6d41783 --- /dev/null +++ b/azure-pipelines-1.yml @@ -0,0 +1,34 @@ +# ASP.NET +# Build and test ASP.NET projects. +# Add steps that publish symbols, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4 + +trigger: +- master + +pool: + vmImage: 'windows-latest' + +variables: + solution: '**/*.sln' + buildPlatform: 'Any CPU' + buildConfiguration: 'Release' + +steps: +- task: NuGetToolInstaller@1 + +- task: NuGetCommand@2 + inputs: + restoreSolution: '$(solution)' + +- task: VSBuild@1 + inputs: + solution: '$(solution)' + msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"' + platform: '$(buildPlatform)' + configuration: '$(buildConfiguration)' + +- task: VSTest@2 + inputs: + platform: '$(buildPlatform)' + configuration: '$(buildConfiguration)' From 5b0e7f70b0446f20c174bcce8ed9e1cf1d68b1d0 Mon Sep 17 00:00:00 2001 From: MerlinCooper Date: Tue, 2 Jun 2020 15:17:30 +0200 Subject: [PATCH 31/90] Set up CI with Azure Pipelines Pipeline for branch Fast_Video_Recording_With_OBS [skip ci] --- ...ipelines-Fast_Video_Recording_With_OBS.yml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 azure-pipelines-Fast_Video_Recording_With_OBS.yml diff --git a/azure-pipelines-Fast_Video_Recording_With_OBS.yml b/azure-pipelines-Fast_Video_Recording_With_OBS.yml new file mode 100644 index 0000000..6166cf0 --- /dev/null +++ b/azure-pipelines-Fast_Video_Recording_With_OBS.yml @@ -0,0 +1,34 @@ +# ASP.NET +# Build and test ASP.NET projects. +# Add steps that publish symbols, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4 + +trigger: +- Fast_Video_Recording_With_OBS + +pool: + vmImage: 'windows-latest' + +variables: + solution: '**/*.sln' + buildPlatform: 'Any CPU' + buildConfiguration: 'Release' + +steps: +- task: NuGetToolInstaller@1 + +- task: NuGetCommand@2 + inputs: + restoreSolution: '$(solution)' + +- task: VSBuild@1 + inputs: + solution: '$(solution)' + msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"' + platform: '$(buildPlatform)' + configuration: '$(buildConfiguration)' + +- task: VSTest@2 + inputs: + platform: '$(buildPlatform)' + configuration: '$(buildConfiguration)' From f194f654508a93ca1b1ca5e808354165891089a8 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Tue, 2 Jun 2020 16:22:55 +0200 Subject: [PATCH 32/90] rename Azure Pipeline configuration file to standard name --- azure-pipelines.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..6166cf0 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,34 @@ +# ASP.NET +# Build and test ASP.NET projects. +# Add steps that publish symbols, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4 + +trigger: +- Fast_Video_Recording_With_OBS + +pool: + vmImage: 'windows-latest' + +variables: + solution: '**/*.sln' + buildPlatform: 'Any CPU' + buildConfiguration: 'Release' + +steps: +- task: NuGetToolInstaller@1 + +- task: NuGetCommand@2 + inputs: + restoreSolution: '$(solution)' + +- task: VSBuild@1 + inputs: + solution: '$(solution)' + msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"' + platform: '$(buildPlatform)' + configuration: '$(buildConfiguration)' + +- task: VSTest@2 + inputs: + platform: '$(buildPlatform)' + configuration: '$(buildConfiguration)' From d974d592eede72cfcf4858ad6690a0d54cbac86e Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Tue, 2 Jun 2020 16:25:24 +0200 Subject: [PATCH 33/90] Remove not needed azure pipeline configuration files --- azure-pipelines-1.yml | 34 ------------------- ...ipelines-Fast_Video_Recording_With_OBS.yml | 34 ------------------- 2 files changed, 68 deletions(-) delete mode 100644 azure-pipelines-1.yml delete mode 100644 azure-pipelines-Fast_Video_Recording_With_OBS.yml diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml deleted file mode 100644 index 6d41783..0000000 --- a/azure-pipelines-1.yml +++ /dev/null @@ -1,34 +0,0 @@ -# ASP.NET -# Build and test ASP.NET projects. -# Add steps that publish symbols, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4 - -trigger: -- master - -pool: - vmImage: 'windows-latest' - -variables: - solution: '**/*.sln' - buildPlatform: 'Any CPU' - buildConfiguration: 'Release' - -steps: -- task: NuGetToolInstaller@1 - -- task: NuGetCommand@2 - inputs: - restoreSolution: '$(solution)' - -- task: VSBuild@1 - inputs: - solution: '$(solution)' - msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"' - platform: '$(buildPlatform)' - configuration: '$(buildConfiguration)' - -- task: VSTest@2 - inputs: - platform: '$(buildPlatform)' - configuration: '$(buildConfiguration)' diff --git a/azure-pipelines-Fast_Video_Recording_With_OBS.yml b/azure-pipelines-Fast_Video_Recording_With_OBS.yml deleted file mode 100644 index 6166cf0..0000000 --- a/azure-pipelines-Fast_Video_Recording_With_OBS.yml +++ /dev/null @@ -1,34 +0,0 @@ -# ASP.NET -# Build and test ASP.NET projects. -# Add steps that publish symbols, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4 - -trigger: -- Fast_Video_Recording_With_OBS - -pool: - vmImage: 'windows-latest' - -variables: - solution: '**/*.sln' - buildPlatform: 'Any CPU' - buildConfiguration: 'Release' - -steps: -- task: NuGetToolInstaller@1 - -- task: NuGetCommand@2 - inputs: - restoreSolution: '$(solution)' - -- task: VSBuild@1 - inputs: - solution: '$(solution)' - msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"' - platform: '$(buildPlatform)' - configuration: '$(buildConfiguration)' - -- task: VSTest@2 - inputs: - platform: '$(buildPlatform)' - configuration: '$(buildConfiguration)' From 66b38134c683a865f1693d5f8e6f34226beb6ef4 Mon Sep 17 00:00:00 2001 From: MerlinCooper Date: Tue, 2 Jun 2020 17:02:37 +0200 Subject: [PATCH 34/90] Delete azure-pipelines.yml --- azure-pipelines.yml | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 6166cf0..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,34 +0,0 @@ -# ASP.NET -# Build and test ASP.NET projects. -# Add steps that publish symbols, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4 - -trigger: -- Fast_Video_Recording_With_OBS - -pool: - vmImage: 'windows-latest' - -variables: - solution: '**/*.sln' - buildPlatform: 'Any CPU' - buildConfiguration: 'Release' - -steps: -- task: NuGetToolInstaller@1 - -- task: NuGetCommand@2 - inputs: - restoreSolution: '$(solution)' - -- task: VSBuild@1 - inputs: - solution: '$(solution)' - msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"' - platform: '$(buildPlatform)' - configuration: '$(buildConfiguration)' - -- task: VSTest@2 - inputs: - platform: '$(buildPlatform)' - configuration: '$(buildConfiguration)' From 135e6dfa044effaa1e6b18fb3617104c13c918fc Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Tue, 2 Jun 2020 20:02:40 +0200 Subject: [PATCH 35/90] commit all changes to submodules --- iRacingSDK.Net | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iRacingSDK.Net b/iRacingSDK.Net index ab9427c..60fecf3 160000 --- a/iRacingSDK.Net +++ b/iRacingSDK.Net @@ -1 +1 @@ -Subproject commit ab9427ce8fa38eb6b4b4c6716deb5f130aaaa29e +Subproject commit 60fecf3ba43d9f596224fd5cfe732ec4280932ce From 75c4b609076c7017c65fe26ad22e09842cef85b5 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Tue, 2 Jun 2020 21:00:55 +0200 Subject: [PATCH 36/90] update to be able to compile after upgrading all procject to iRacingSDK.NET 1.0.0.40 --- iRacingReplayDirector.csproj | 11 ++++++----- iRacingReplayDirector.nugetreferenceswitcher | 1 + .../iRacingReplayOverlay.net.Tests.csproj | 10 ++++------ ...cingReplayOverlay.net.Tests.nugetreferenceswitcher | 1 + iRacingReplayOverlay.net.Tests/packages.config | 2 +- iRacingReplayOverlay.net.sln | 3 +-- .../iRacingDirector.Plugin.Tester.csproj | 10 ++++------ plugins/iRacingDirector.Plugin.Tester/packages.config | 2 +- 8 files changed, 19 insertions(+), 21 deletions(-) create mode 100644 iRacingReplayDirector.nugetreferenceswitcher create mode 100644 iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.nugetreferenceswitcher diff --git a/iRacingReplayDirector.csproj b/iRacingReplayDirector.csproj index 0c39e28..45ce035 100644 --- a/iRacingReplayDirector.csproj +++ b/iRacingReplayDirector.csproj @@ -54,10 +54,6 @@ iRacingReplayDirector - - packages\iRacingSDK.1.0.0.36\lib\net40-client\iRacingSDK.dll - True - packages\MediaFoundation.Net.2.0.0.32\lib\net35-client\MediaFoundation.Net.dll True @@ -324,5 +320,10 @@ - + + + {5422AE20-F220-4BE1-9E61-5296981ABB5C} + iRacingSDK + + \ No newline at end of file diff --git a/iRacingReplayDirector.nugetreferenceswitcher b/iRacingReplayDirector.nugetreferenceswitcher new file mode 100644 index 0000000..f3c34ea --- /dev/null +++ b/iRacingReplayDirector.nugetreferenceswitcher @@ -0,0 +1 @@ +iRacingSDK iRacingSDK.Net/iRacingSDK.csproj packages/iRacingSDK.1.0.0.36/lib/net40-client/iRacingSDK.dll diff --git a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj index e6fd863..87c9554 100644 --- a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj +++ b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj @@ -70,12 +70,10 @@ {0E523573-2972-4DC0-AECB-C4CF746854BB} iRacingReplayOverlay.net - - - - packages\iRacingSDK.1.0.0.36\lib\net40-client\iRacingSDK.dll - True - + + {5422AE20-F220-4BE1-9E61-5296981ABB5C} + iRacingSDK + diff --git a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.nugetreferenceswitcher b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.nugetreferenceswitcher new file mode 100644 index 0000000..fc7da50 --- /dev/null +++ b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.nugetreferenceswitcher @@ -0,0 +1 @@ +iRacingSDK ../iRacingSDK.Net/iRacingSDK.csproj ../packages/iRacingSDK.1.0.0.40/lib/net40-client/iRacingSDK.dll diff --git a/iRacingReplayOverlay.net.Tests/packages.config b/iRacingReplayOverlay.net.Tests/packages.config index 0553ce7..f1e6c79 100644 --- a/iRacingReplayOverlay.net.Tests/packages.config +++ b/iRacingReplayOverlay.net.Tests/packages.config @@ -1,6 +1,6 @@  - + diff --git a/iRacingReplayOverlay.net.sln b/iRacingReplayOverlay.net.sln index f3aecc5..7f79b9f 100644 --- a/iRacingReplayOverlay.net.sln +++ b/iRacingReplayOverlay.net.sln @@ -97,7 +97,6 @@ Global {E4D21BA6-6275-4D46-A1D6-E7D16BF0E5EC}.Debug|x64.ActiveCfg = Debug|x64 {E4D21BA6-6275-4D46-A1D6-E7D16BF0E5EC}.Debug|x64.Build.0 = Debug|x64 {E4D21BA6-6275-4D46-A1D6-E7D16BF0E5EC}.Release|Any CPU.ActiveCfg = Release|x64 - {E4D21BA6-6275-4D46-A1D6-E7D16BF0E5EC}.Release|Any CPU.Build.0 = Release|x64 {E4D21BA6-6275-4D46-A1D6-E7D16BF0E5EC}.Release|x64.ActiveCfg = Release|x64 {5422AE20-F220-4BE1-9E61-5296981ABB5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5422AE20-F220-4BE1-9E61-5296981ABB5C}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -150,7 +149,6 @@ Global {96FA1C80-396C-4792-9E8B-C7CBFC25833D}.Debug|x64.ActiveCfg = Debug|Any CPU {96FA1C80-396C-4792-9E8B-C7CBFC25833D}.Debug|x64.Build.0 = Debug|Any CPU {96FA1C80-396C-4792-9E8B-C7CBFC25833D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {96FA1C80-396C-4792-9E8B-C7CBFC25833D}.Release|Any CPU.Build.0 = Release|Any CPU {96FA1C80-396C-4792-9E8B-C7CBFC25833D}.Release|x64.ActiveCfg = Release|Any CPU {F49DAE6F-321E-45A8-B9B4-23475A3F6080}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F49DAE6F-321E-45A8-B9B4-23475A3F6080}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -164,6 +162,7 @@ Global {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18}.Debug|x64.ActiveCfg = Debug|x64 {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18}.Debug|x64.Build.0 = Debug|x64 {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18}.Release|Any CPU.ActiveCfg = Release|x64 + {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18}.Release|Any CPU.Build.0 = Release|x64 {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18}.Release|x64.ActiveCfg = Release|x64 {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18}.Release|x64.Build.0 = Release|x64 {C4ABC83D-1801-4407-B7C2-BDF9396D28AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU diff --git a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj index 4767c94..670694b 100644 --- a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj +++ b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj @@ -45,12 +45,6 @@ .\..\..\packages\ - - - $(PackagesFolder)iRacingSDK.1.0.0.36\lib\net40-client\iRacingSDK.dll - True - - {5422ae20-f220-4be1-9e61-5296981abb5c} @@ -64,6 +58,10 @@ + + ..\..\packages\iRacingSDK.1.0.0.40\lib\net40-client\iRacingSDK.dll + True + diff --git a/plugins/iRacingDirector.Plugin.Tester/packages.config b/plugins/iRacingDirector.Plugin.Tester/packages.config index 4334bc0..16cee49 100644 --- a/plugins/iRacingDirector.Plugin.Tester/packages.config +++ b/plugins/iRacingDirector.Plugin.Tester/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file From 98ae218c80ccfbbea16940148acb50e69675e472 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Wed, 3 Jun 2020 10:54:28 +0200 Subject: [PATCH 37/90] change default value for "Shutdown after Encoding" to "unchecked" --- Main.Designer.cs | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/Main.Designer.cs b/Main.Designer.cs index f451dba..2818d29 100644 --- a/Main.Designer.cs +++ b/Main.Designer.cs @@ -52,6 +52,7 @@ private void InitializeComponent() this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabCapture = new System.Windows.Forms.TabPage(); this.checkBoxShutdownAfterEncode = new System.Windows.Forms.CheckBox(); + this.cb_FastVideoRecording = new System.Windows.Forms.CheckBox(); this.cb_EncodeVideoAfterCapture = new System.Windows.Forms.CheckBox(); this.verifyVideoCaptureButton = new System.Windows.Forms.Button(); this.configureTrackCamerasLabel = new System.Windows.Forms.Label(); @@ -82,7 +83,6 @@ private void InitializeComponent() this.changeVersionButton = new System.Windows.Forms.Button(); this.configurePluginsButton = new System.Windows.Forms.Button(); this.newVersionMessage = new System.Windows.Forms.Label(); - this.cb_FastVideoRecording = new System.Windows.Forms.CheckBox(); this.tabControl1.SuspendLayout(); this.tabCapture.SuspendLayout(); this.tabTranscoding.SuspendLayout(); @@ -158,8 +158,6 @@ private void InitializeComponent() // checkBoxShutdownAfterEncode // this.checkBoxShutdownAfterEncode.AutoSize = true; - this.checkBoxShutdownAfterEncode.Checked = true; - this.checkBoxShutdownAfterEncode.CheckState = System.Windows.Forms.CheckState.Checked; this.checkBoxShutdownAfterEncode.Location = new System.Drawing.Point(514, 29); this.checkBoxShutdownAfterEncode.Name = "checkBoxShutdownAfterEncode"; this.checkBoxShutdownAfterEncode.Size = new System.Drawing.Size(189, 23); @@ -168,6 +166,19 @@ private void InitializeComponent() this.checkBoxShutdownAfterEncode.UseVisualStyleBackColor = true; this.checkBoxShutdownAfterEncode.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); // + // cb_FastVideoRecording + // + this.cb_FastVideoRecording.AutoSize = true; + this.cb_FastVideoRecording.Checked = true; + this.cb_FastVideoRecording.CheckState = System.Windows.Forms.CheckState.Checked; + this.cb_FastVideoRecording.Location = new System.Drawing.Point(300, 58); + this.cb_FastVideoRecording.Name = "cb_FastVideoRecording"; + this.cb_FastVideoRecording.Size = new System.Drawing.Size(326, 23); + this.cb_FastVideoRecording.TabIndex = 8; + this.cb_FastVideoRecording.Text = "Fast video recording using OBS pause/resume"; + this.cb_FastVideoRecording.UseVisualStyleBackColor = true; + this.cb_FastVideoRecording.CheckedChanged += new System.EventHandler(this.cb_FastVideoRecording_CheckedChanged); + // // cb_EncodeVideoAfterCapture // this.cb_EncodeVideoAfterCapture.AutoSize = true; @@ -487,19 +498,6 @@ private void InitializeComponent() this.newVersionMessage.Text = "New Version available ->"; this.newVersionMessage.Visible = false; // - // cb_FastVideoRecording - // - this.cb_FastVideoRecording.AutoSize = true; - this.cb_FastVideoRecording.Checked = true; - this.cb_FastVideoRecording.CheckState = System.Windows.Forms.CheckState.Checked; - this.cb_FastVideoRecording.Location = new System.Drawing.Point(300, 58); - this.cb_FastVideoRecording.Name = "cb_FastVideoRecording"; - this.cb_FastVideoRecording.Size = new System.Drawing.Size(326, 23); - this.cb_FastVideoRecording.TabIndex = 8; - this.cb_FastVideoRecording.Text = "Fast video recording using OBS pause/resume"; - this.cb_FastVideoRecording.UseVisualStyleBackColor = true; - this.cb_FastVideoRecording.CheckedChanged += new System.EventHandler(this.cb_FastVideoRecording_CheckedChanged); - // // Main // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 19F); From f56081b6b63ea33f9d1396ba1da688bde2d46038 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Wed, 3 Jun 2020 11:08:42 +0200 Subject: [PATCH 38/90] Use iRacingSDK.NET as project - not NuGet to avoid assembly error. --- Phases/IRacingReplay.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Phases/IRacingReplay.cs b/Phases/IRacingReplay.cs index 8ca4187..81517d1 100644 --- a/Phases/IRacingReplay.cs +++ b/Phases/IRacingReplay.cs @@ -38,11 +38,13 @@ public partial class IRacingReplay List actions = new List(); bool shortTestOnly; bool bRecordUsingPauseResume; + bool bCloseiRacingAfterRecording; - public IRacingReplay(bool shortTestOnly = false, bool bRecordUsingPauseResume=false) + public IRacingReplay(bool shortTestOnly = false, bool bRecordUsingPauseResume=false, bool bCloseiRacingAfterRecording=false) { this.shortTestOnly = shortTestOnly; this.bRecordUsingPauseResume = bRecordUsingPauseResume; + this.bCloseiRacingAfterRecording = bCloseiRacingAfterRecording; } private void Add(Action action, Action onComplete) From f64a1889a04137fa0558c1cc6e1789126e68488c Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Wed, 3 Jun 2020 11:14:03 +0200 Subject: [PATCH 39/90] Use iRacingSDK.NET as project (not NuGet) to avoid assembly error --- .../iRacingDirector.Plugin.Tester.csproj | 4 ---- plugins/iRacingDirector.Plugin.Tester/packages.config | 1 - 2 files changed, 5 deletions(-) diff --git a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj index 670694b..8fc01af 100644 --- a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj +++ b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj @@ -58,10 +58,6 @@ - - ..\..\packages\iRacingSDK.1.0.0.40\lib\net40-client\iRacingSDK.dll - True - diff --git a/plugins/iRacingDirector.Plugin.Tester/packages.config b/plugins/iRacingDirector.Plugin.Tester/packages.config index 16cee49..f6dd63f 100644 --- a/plugins/iRacingDirector.Plugin.Tester/packages.config +++ b/plugins/iRacingDirector.Plugin.Tester/packages.config @@ -1,5 +1,4 @@  - \ No newline at end of file From 72d46c42de5a782dec292f0f934c3018620b5d96 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Wed, 3 Jun 2020 11:15:21 +0200 Subject: [PATCH 40/90] Add Checkbox to allow user to change behavior whether iRacing will be stopped after recording. --- Main.Designer.cs | 24 +++++++++++++++++++----- Phases/CaptureRace.cs | 20 ++++++++++++-------- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/Main.Designer.cs b/Main.Designer.cs index 2818d29..8ca566f 100644 --- a/Main.Designer.cs +++ b/Main.Designer.cs @@ -83,6 +83,7 @@ private void InitializeComponent() this.changeVersionButton = new System.Windows.Forms.Button(); this.configurePluginsButton = new System.Windows.Forms.Button(); this.newVersionMessage = new System.Windows.Forms.Label(); + this.bcheckBoxCloseiRacingAfterRecording = new System.Windows.Forms.CheckBox(); this.tabControl1.SuspendLayout(); this.tabCapture.SuspendLayout(); this.tabTranscoding.SuspendLayout(); @@ -132,6 +133,7 @@ private void InitializeComponent() // // tabCapture // + this.tabCapture.Controls.Add(this.bcheckBoxCloseiRacingAfterRecording); this.tabCapture.Controls.Add(this.checkBoxShutdownAfterEncode); this.tabCapture.Controls.Add(this.cb_FastVideoRecording); this.tabCapture.Controls.Add(this.cb_EncodeVideoAfterCapture); @@ -158,11 +160,11 @@ private void InitializeComponent() // checkBoxShutdownAfterEncode // this.checkBoxShutdownAfterEncode.AutoSize = true; - this.checkBoxShutdownAfterEncode.Location = new System.Drawing.Point(514, 29); + this.checkBoxShutdownAfterEncode.Location = new System.Drawing.Point(516, 58); this.checkBoxShutdownAfterEncode.Name = "checkBoxShutdownAfterEncode"; - this.checkBoxShutdownAfterEncode.Size = new System.Drawing.Size(189, 23); + this.checkBoxShutdownAfterEncode.Size = new System.Drawing.Size(210, 23); this.checkBoxShutdownAfterEncode.TabIndex = 8; - this.checkBoxShutdownAfterEncode.Text = "Shutdown after Encoding"; + this.checkBoxShutdownAfterEncode.Text = "Shutdown PC after Encoding"; this.checkBoxShutdownAfterEncode.UseVisualStyleBackColor = true; this.checkBoxShutdownAfterEncode.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); // @@ -173,9 +175,9 @@ private void InitializeComponent() this.cb_FastVideoRecording.CheckState = System.Windows.Forms.CheckState.Checked; this.cb_FastVideoRecording.Location = new System.Drawing.Point(300, 58); this.cb_FastVideoRecording.Name = "cb_FastVideoRecording"; - this.cb_FastVideoRecording.Size = new System.Drawing.Size(326, 23); + this.cb_FastVideoRecording.Size = new System.Drawing.Size(190, 23); this.cb_FastVideoRecording.TabIndex = 8; - this.cb_FastVideoRecording.Text = "Fast video recording using OBS pause/resume"; + this.cb_FastVideoRecording.Text = "Use fast video recording "; this.cb_FastVideoRecording.UseVisualStyleBackColor = true; this.cb_FastVideoRecording.CheckedChanged += new System.EventHandler(this.cb_FastVideoRecording_CheckedChanged); // @@ -498,6 +500,17 @@ private void InitializeComponent() this.newVersionMessage.Text = "New Version available ->"; this.newVersionMessage.Visible = false; // + // bcheckBoxCloseiRacingAfterRecording + // + this.bcheckBoxCloseiRacingAfterRecording.AutoSize = true; + this.bcheckBoxCloseiRacingAfterRecording.Location = new System.Drawing.Point(516, 29); + this.bcheckBoxCloseiRacingAfterRecording.Name = "bcheckBoxCloseiRacingAfterRecording"; + this.bcheckBoxCloseiRacingAfterRecording.Size = new System.Drawing.Size(220, 23); + this.bcheckBoxCloseiRacingAfterRecording.TabIndex = 8; + this.bcheckBoxCloseiRacingAfterRecording.Text = "Close iRacing after Recording"; + this.bcheckBoxCloseiRacingAfterRecording.UseVisualStyleBackColor = true; + this.bcheckBoxCloseiRacingAfterRecording.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); + // // Main // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 19F); @@ -571,5 +584,6 @@ private void InitializeComponent() private System.Windows.Forms.Label newVersionMessage; private System.Windows.Forms.CheckBox checkBoxShutdownAfterEncode; private System.Windows.Forms.CheckBox cb_FastVideoRecording; + private System.Windows.Forms.CheckBox bcheckBoxCloseiRacingAfterRecording; } } \ No newline at end of file diff --git a/Phases/CaptureRace.cs b/Phases/CaptureRace.cs index 8e3d7c5..ddbcb5f 100644 --- a/Phases/CaptureRace.cs +++ b/Phases/CaptureRace.cs @@ -137,16 +137,20 @@ internal void _CaptureRaceTest(Action onComplete, IEnumerable Date: Wed, 3 Jun 2020 11:41:31 +0200 Subject: [PATCH 41/90] Use Release version of MediaFoundation and SuperMFLib for Debug versions of other projects to compile w/o errors. --- iRacingReplayDirector.csproj | 4 ---- ... iRacingReplayDirector.previous.nugetreferenceswitcher | 0 .../iRacingReplayOverlay.net.Tests.csproj | 5 +---- ...playOverlay.net.Tests.previous.nugetreferenceswitcher} | 0 iRacingReplayOverlay.net.csproj | 5 +---- ...acingReplayOverlay.net.previous.nugetreferenceswitcher | 0 iRacingReplayOverlay.net.sln | 8 ++++---- 7 files changed, 6 insertions(+), 16 deletions(-) rename iRacingReplayDirector.nugetreferenceswitcher => iRacingReplayDirector.previous.nugetreferenceswitcher (100%) rename iRacingReplayOverlay.net.Tests/{iRacingReplayOverlay.net.Tests.nugetreferenceswitcher => iRacingReplayOverlay.net.Tests.previous.nugetreferenceswitcher} (100%) rename iRacingReplayOverlay.net.nugetreferenceswitcher => iRacingReplayOverlay.net.previous.nugetreferenceswitcher (100%) diff --git a/iRacingReplayDirector.csproj b/iRacingReplayDirector.csproj index 45ce035..187ce8f 100644 --- a/iRacingReplayDirector.csproj +++ b/iRacingReplayDirector.csproj @@ -60,10 +60,6 @@ - - {5422ae20-f220-4be1-9e61-5296981abb5c} - iRacingSDK - {b78c0f3b-071a-4fd2-829d-7a67e0f7bd1c} MediaFoundation diff --git a/iRacingReplayDirector.nugetreferenceswitcher b/iRacingReplayDirector.previous.nugetreferenceswitcher similarity index 100% rename from iRacingReplayDirector.nugetreferenceswitcher rename to iRacingReplayDirector.previous.nugetreferenceswitcher diff --git a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj index 87c9554..a85e219 100644 --- a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj +++ b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj @@ -34,6 +34,7 @@ DEBUG;TRACE + ..\packages\Moq.4.2.1409.1722\lib\net40\Moq.dll @@ -70,10 +71,6 @@ {0E523573-2972-4DC0-AECB-C4CF746854BB} iRacingReplayOverlay.net - - {5422AE20-F220-4BE1-9E61-5296981ABB5C} - iRacingSDK - diff --git a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.nugetreferenceswitcher b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.previous.nugetreferenceswitcher similarity index 100% rename from iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.nugetreferenceswitcher rename to iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.previous.nugetreferenceswitcher diff --git a/iRacingReplayOverlay.net.csproj b/iRacingReplayOverlay.net.csproj index ffcffb1..6f79c89 100644 --- a/iRacingReplayOverlay.net.csproj +++ b/iRacingReplayOverlay.net.csproj @@ -73,10 +73,6 @@ - - {5422ae20-f220-4be1-9e61-5296981abb5c} - iRacingSDK - {b78c0f3b-071a-4fd2-829d-7a67e0f7bd1c} MediaFoundation @@ -95,6 +91,7 @@ packages\AWSSDK.Core.3.1.4.0\lib\net35\AWSSDK.Core.dll True + packages\Newtonsoft.Json.4.0.5\lib\net40\Newtonsoft.Json.dll diff --git a/iRacingReplayOverlay.net.nugetreferenceswitcher b/iRacingReplayOverlay.net.previous.nugetreferenceswitcher similarity index 100% rename from iRacingReplayOverlay.net.nugetreferenceswitcher rename to iRacingReplayOverlay.net.previous.nugetreferenceswitcher diff --git a/iRacingReplayOverlay.net.sln b/iRacingReplayOverlay.net.sln index 7f79b9f..cab6711 100644 --- a/iRacingReplayOverlay.net.sln +++ b/iRacingReplayOverlay.net.sln @@ -70,8 +70,8 @@ Global {0E523573-2972-4DC0-AECB-C4CF746854BB}.Release|Any CPU.Build.0 = Release|x64 {0E523573-2972-4DC0-AECB-C4CF746854BB}.Release|x64.ActiveCfg = Release|x64 {0E523573-2972-4DC0-AECB-C4CF746854BB}.Release|x64.Build.0 = Release|x64 - {59D2B4B5-2852-4396-A0D9-9CA546AC3C09}.Debug|Any CPU.ActiveCfg = Debug|x64 - {59D2B4B5-2852-4396-A0D9-9CA546AC3C09}.Debug|Any CPU.Build.0 = Debug|x64 + {59D2B4B5-2852-4396-A0D9-9CA546AC3C09}.Debug|Any CPU.ActiveCfg = Release|x64 + {59D2B4B5-2852-4396-A0D9-9CA546AC3C09}.Debug|Any CPU.Build.0 = Release|x64 {59D2B4B5-2852-4396-A0D9-9CA546AC3C09}.Debug|x64.ActiveCfg = Debug|x64 {59D2B4B5-2852-4396-A0D9-9CA546AC3C09}.Debug|x64.Build.0 = Debug|x64 {59D2B4B5-2852-4396-A0D9-9CA546AC3C09}.Release|Any CPU.ActiveCfg = Release|x64 @@ -120,8 +120,8 @@ Global {90126FE7-C20E-43EC-93AF-77AA5268E860}.Release|Any CPU.ActiveCfg = Release|Any CPU {90126FE7-C20E-43EC-93AF-77AA5268E860}.Release|Any CPU.Build.0 = Release|Any CPU {90126FE7-C20E-43EC-93AF-77AA5268E860}.Release|x64.ActiveCfg = Release|Any CPU - {B78C0F3B-071A-4FD2-829D-7A67E0F7BD1C}.Debug|Any CPU.ActiveCfg = Debug|x64 - {B78C0F3B-071A-4FD2-829D-7A67E0F7BD1C}.Debug|Any CPU.Build.0 = Debug|x64 + {B78C0F3B-071A-4FD2-829D-7A67E0F7BD1C}.Debug|Any CPU.ActiveCfg = Release|x64 + {B78C0F3B-071A-4FD2-829D-7A67E0F7BD1C}.Debug|Any CPU.Build.0 = Release|x64 {B78C0F3B-071A-4FD2-829D-7A67E0F7BD1C}.Debug|x64.ActiveCfg = Debug|x64 {B78C0F3B-071A-4FD2-829D-7A67E0F7BD1C}.Debug|x64.Build.0 = Debug|x64 {B78C0F3B-071A-4FD2-829D-7A67E0F7BD1C}.Release|Any CPU.ActiveCfg = Release|x64 From 9dc1c3eaac49e43802d37167085ede3c9b5e422e Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Wed, 3 Jun 2020 11:43:08 +0200 Subject: [PATCH 42/90] add checkbox to allow user to control closure of iRacing after recording finshed and "PC-Shutdown" after transcoding finished --- Main.Designer.cs | 28 ++++++++++++++-------------- Main.cs | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Main.Designer.cs b/Main.Designer.cs index 8ca566f..0666274 100644 --- a/Main.Designer.cs +++ b/Main.Designer.cs @@ -51,6 +51,7 @@ private void InitializeComponent() this.logMessagesButton = new System.Windows.Forms.Button(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabCapture = new System.Windows.Forms.TabPage(); + this.cb_BoxCloseiRacingAfterRecording = new System.Windows.Forms.CheckBox(); this.checkBoxShutdownAfterEncode = new System.Windows.Forms.CheckBox(); this.cb_FastVideoRecording = new System.Windows.Forms.CheckBox(); this.cb_EncodeVideoAfterCapture = new System.Windows.Forms.CheckBox(); @@ -83,7 +84,6 @@ private void InitializeComponent() this.changeVersionButton = new System.Windows.Forms.Button(); this.configurePluginsButton = new System.Windows.Forms.Button(); this.newVersionMessage = new System.Windows.Forms.Label(); - this.bcheckBoxCloseiRacingAfterRecording = new System.Windows.Forms.CheckBox(); this.tabControl1.SuspendLayout(); this.tabCapture.SuspendLayout(); this.tabTranscoding.SuspendLayout(); @@ -133,7 +133,7 @@ private void InitializeComponent() // // tabCapture // - this.tabCapture.Controls.Add(this.bcheckBoxCloseiRacingAfterRecording); + this.tabCapture.Controls.Add(this.cb_BoxCloseiRacingAfterRecording); this.tabCapture.Controls.Add(this.checkBoxShutdownAfterEncode); this.tabCapture.Controls.Add(this.cb_FastVideoRecording); this.tabCapture.Controls.Add(this.cb_EncodeVideoAfterCapture); @@ -157,6 +157,17 @@ private void InitializeComponent() this.tabCapture.Text = "Race Capture"; this.tabCapture.UseVisualStyleBackColor = true; // + // cb_BoxCloseiRacingAfterRecording + // + this.cb_BoxCloseiRacingAfterRecording.AutoSize = true; + this.cb_BoxCloseiRacingAfterRecording.Location = new System.Drawing.Point(516, 29); + this.cb_BoxCloseiRacingAfterRecording.Name = "cb_BoxCloseiRacingAfterRecording"; + this.cb_BoxCloseiRacingAfterRecording.Size = new System.Drawing.Size(220, 23); + this.cb_BoxCloseiRacingAfterRecording.TabIndex = 8; + this.cb_BoxCloseiRacingAfterRecording.Text = "Close iRacing after Recording"; + this.cb_BoxCloseiRacingAfterRecording.UseVisualStyleBackColor = true; + this.cb_BoxCloseiRacingAfterRecording.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); + // // checkBoxShutdownAfterEncode // this.checkBoxShutdownAfterEncode.AutoSize = true; @@ -500,17 +511,6 @@ private void InitializeComponent() this.newVersionMessage.Text = "New Version available ->"; this.newVersionMessage.Visible = false; // - // bcheckBoxCloseiRacingAfterRecording - // - this.bcheckBoxCloseiRacingAfterRecording.AutoSize = true; - this.bcheckBoxCloseiRacingAfterRecording.Location = new System.Drawing.Point(516, 29); - this.bcheckBoxCloseiRacingAfterRecording.Name = "bcheckBoxCloseiRacingAfterRecording"; - this.bcheckBoxCloseiRacingAfterRecording.Size = new System.Drawing.Size(220, 23); - this.bcheckBoxCloseiRacingAfterRecording.TabIndex = 8; - this.bcheckBoxCloseiRacingAfterRecording.Text = "Close iRacing after Recording"; - this.bcheckBoxCloseiRacingAfterRecording.UseVisualStyleBackColor = true; - this.bcheckBoxCloseiRacingAfterRecording.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); - // // Main // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 19F); @@ -584,6 +584,6 @@ private void InitializeComponent() private System.Windows.Forms.Label newVersionMessage; private System.Windows.Forms.CheckBox checkBoxShutdownAfterEncode; private System.Windows.Forms.CheckBox cb_FastVideoRecording; - private System.Windows.Forms.CheckBox bcheckBoxCloseiRacingAfterRecording; + private System.Windows.Forms.CheckBox cb_BoxCloseiRacingAfterRecording; } } \ No newline at end of file diff --git a/Main.cs b/Main.cs index 515a33e..e21603f 100644 --- a/Main.cs +++ b/Main.cs @@ -490,7 +490,7 @@ void BeginProcessButton_Click(object sender, EventArgs e) NativeMethods.SetThreadExecutionState(NativeMethods.ES_CONTINUOUS | NativeMethods.ES_SYSTEM_REQUIRED | NativeMethods.ES_DISPLAY_REQUIRED); - iRacingProcess = new IRacingReplay(shortTestOnly: TestOnlyCheckBox.Checked, bRecordUsingPauseResume:cb_FastVideoRecording.Checked) + iRacingProcess = new IRacingReplay(shortTestOnly: TestOnlyCheckBox.Checked, bRecordUsingPauseResume:cb_FastVideoRecording.Checked, bCloseiRacingAfterRecording: cb_BoxCloseiRacingAfterRecording.Checked) .WithWorkingFolder(workingFolderTextBox.Text) .AnalyseRace(() => { AnalysingRaceLabel.Visible = false; CapturingRaceLabel.Visible = true; }) .CaptureOpeningScenes() From 26881db3d573de7540599d42a9adb3650a3cf66c Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Wed, 3 Jun 2020 12:09:29 +0200 Subject: [PATCH 43/90] Change / Correct name of variable from cb_BoxCloseiRacingAfterRecording to cb_CloseiRacingAfterRecording --- Main.Designer.cs | 24 ++++++++++++------------ Main.cs | 2 +- Phases/CaptureRace.cs | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Main.Designer.cs b/Main.Designer.cs index 0666274..6bbbdd6 100644 --- a/Main.Designer.cs +++ b/Main.Designer.cs @@ -51,7 +51,7 @@ private void InitializeComponent() this.logMessagesButton = new System.Windows.Forms.Button(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabCapture = new System.Windows.Forms.TabPage(); - this.cb_BoxCloseiRacingAfterRecording = new System.Windows.Forms.CheckBox(); + this.cb_CloseiRacingAfterRecording = new System.Windows.Forms.CheckBox(); this.checkBoxShutdownAfterEncode = new System.Windows.Forms.CheckBox(); this.cb_FastVideoRecording = new System.Windows.Forms.CheckBox(); this.cb_EncodeVideoAfterCapture = new System.Windows.Forms.CheckBox(); @@ -133,7 +133,7 @@ private void InitializeComponent() // // tabCapture // - this.tabCapture.Controls.Add(this.cb_BoxCloseiRacingAfterRecording); + this.tabCapture.Controls.Add(this.cb_CloseiRacingAfterRecording); this.tabCapture.Controls.Add(this.checkBoxShutdownAfterEncode); this.tabCapture.Controls.Add(this.cb_FastVideoRecording); this.tabCapture.Controls.Add(this.cb_EncodeVideoAfterCapture); @@ -157,16 +157,16 @@ private void InitializeComponent() this.tabCapture.Text = "Race Capture"; this.tabCapture.UseVisualStyleBackColor = true; // - // cb_BoxCloseiRacingAfterRecording + // cb_CloseiRacingAfterRecording // - this.cb_BoxCloseiRacingAfterRecording.AutoSize = true; - this.cb_BoxCloseiRacingAfterRecording.Location = new System.Drawing.Point(516, 29); - this.cb_BoxCloseiRacingAfterRecording.Name = "cb_BoxCloseiRacingAfterRecording"; - this.cb_BoxCloseiRacingAfterRecording.Size = new System.Drawing.Size(220, 23); - this.cb_BoxCloseiRacingAfterRecording.TabIndex = 8; - this.cb_BoxCloseiRacingAfterRecording.Text = "Close iRacing after Recording"; - this.cb_BoxCloseiRacingAfterRecording.UseVisualStyleBackColor = true; - this.cb_BoxCloseiRacingAfterRecording.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); + this.cb_CloseiRacingAfterRecording.AutoSize = true; + this.cb_CloseiRacingAfterRecording.Location = new System.Drawing.Point(516, 29); + this.cb_CloseiRacingAfterRecording.Name = "cb_CloseiRacingAfterRecording"; + this.cb_CloseiRacingAfterRecording.Size = new System.Drawing.Size(220, 23); + this.cb_CloseiRacingAfterRecording.TabIndex = 8; + this.cb_CloseiRacingAfterRecording.Text = "Close iRacing after Recording"; + this.cb_CloseiRacingAfterRecording.UseVisualStyleBackColor = true; + this.cb_CloseiRacingAfterRecording.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); // // checkBoxShutdownAfterEncode // @@ -584,6 +584,6 @@ private void InitializeComponent() private System.Windows.Forms.Label newVersionMessage; private System.Windows.Forms.CheckBox checkBoxShutdownAfterEncode; private System.Windows.Forms.CheckBox cb_FastVideoRecording; - private System.Windows.Forms.CheckBox cb_BoxCloseiRacingAfterRecording; + private System.Windows.Forms.CheckBox cb_CloseiRacingAfterRecording; } } \ No newline at end of file diff --git a/Main.cs b/Main.cs index e21603f..992af51 100644 --- a/Main.cs +++ b/Main.cs @@ -490,7 +490,7 @@ void BeginProcessButton_Click(object sender, EventArgs e) NativeMethods.SetThreadExecutionState(NativeMethods.ES_CONTINUOUS | NativeMethods.ES_SYSTEM_REQUIRED | NativeMethods.ES_DISPLAY_REQUIRED); - iRacingProcess = new IRacingReplay(shortTestOnly: TestOnlyCheckBox.Checked, bRecordUsingPauseResume:cb_FastVideoRecording.Checked, bCloseiRacingAfterRecording: cb_BoxCloseiRacingAfterRecording.Checked) + iRacingProcess = new IRacingReplay(shortTestOnly: TestOnlyCheckBox.Checked, bRecordUsingPauseResume:cb_FastVideoRecording.Checked, bCloseiRacingAfterRecording: cb_CloseiRacingAfterRecording.Checked) .WithWorkingFolder(workingFolderTextBox.Text) .AnalyseRace(() => { AnalysingRaceLabel.Visible = false; CapturingRaceLabel.Visible = true; }) .CaptureOpeningScenes() diff --git a/Phases/CaptureRace.cs b/Phases/CaptureRace.cs index ddbcb5f..b9f4b2d 100644 --- a/Phases/CaptureRace.cs +++ b/Phases/CaptureRace.cs @@ -84,7 +84,7 @@ internal void _CaptureRaceTest(Action onComplete, IEnumerable Date: Wed, 3 Jun 2020 12:17:36 +0200 Subject: [PATCH 44/90] update and add remark with regard to analysis of race events. --- Phases/AnalyseRace.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index fd85a84..6657c5d 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -76,11 +76,8 @@ public void _AnalyseRace(Action onComplete) TraceDebug.WriteLine(data.Telemetry.ToString()); - AnalyseIncidents(); - - - //add here complete Analyse of race - not only incidents - AnalyseRaceSituations(new iRacingConnection().GetBufferedDataFeed()); + AnalyseIncidents(); //Analyse incidents + AnalyseRaceSituations(new iRacingConnection().GetBufferedDataFeed()); //Analyse race situation (all) by playing out replay at 16x speed. onComplete(); } From d3384f64b55db3e803966138bc7c775c784c587a Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Thu, 4 Jun 2020 19:42:55 +0200 Subject: [PATCH 45/90] add possibility to pause / resume video recording software --- Phases/Direction/VideoCapture.cs | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/Phases/Direction/VideoCapture.cs b/Phases/Direction/VideoCapture.cs index 1cb9442..c431db5 100644 --- a/Phases/Direction/VideoCapture.cs +++ b/Phases/Direction/VideoCapture.cs @@ -27,12 +27,15 @@ namespace iRacingReplayOverlay.Phases.Direction { - public class VideoCapture + enum videoStatus { stopped, running, paused }; + + public class VideoCapture { string workingFolder; DateTime started; Timer timer; List captureFileNames = new List(); + videoStatus curVideoStatus = videoStatus.stopped; public void Activate(string workingFolder) { @@ -43,6 +46,7 @@ public void Activate(string workingFolder) timer.Elapsed += CaptureNewFileNames; ; timer.AutoReset = false; timer.Enabled = true; + curVideoStatus = videoStatus.running; SendKeyStroke_StartStopp(); //Send hot-key to start recording } @@ -84,6 +88,7 @@ public List Deactivate() timer = null; t.Stop(); t.Dispose(); + curVideoStatus = videoStatus.stopped; } SendKeyStroke_StartStopp(); @@ -97,6 +102,26 @@ public List Deactivate() return captureFileNames; } + //methode sending key-stroke command to pause recording software + public void Pause() + { + if(curVideoStatus == videoStatus.running && curVideoStatus != videoStatus.paused) + { + SendKeyStroke_PauseResume(); + curVideoStatus = videoStatus.paused; + } + } + + //methode sending key-stroke command to resume recording software + public void Resume() + { + if (curVideoStatus == videoStatus.running && curVideoStatus == videoStatus.paused) + { + SendKeyStroke_PauseResume(); + curVideoStatus = videoStatus.running; + } + } + private static void SendKeyStroke_StartStopp() { TraceInfo.WriteLine("Sending key event to start/stopp recording ALT+F9"); @@ -116,9 +141,9 @@ private static void SendKeyStroke_PauseResume() Keyboard.keybd_event(Keyboard.VK_MENU, 0, 0, UIntPtr.Zero); System.Threading.Thread.Sleep(700); - Keyboard.keybd_event(Keyboard.VK_F9, 0, 0, UIntPtr.Zero); + Keyboard.keybd_event(Keyboard.VK_F10, 0, 0, UIntPtr.Zero); System.Threading.Thread.Sleep(700); - Keyboard.keybd_event(Keyboard.VK_F9, 0, Keyboard.KEYEVENTF_KEYUP, UIntPtr.Zero); + Keyboard.keybd_event(Keyboard.VK_F10, 0, Keyboard.KEYEVENTF_KEYUP, UIntPtr.Zero); System.Threading.Thread.Sleep(700); Keyboard.keybd_event(Keyboard.VK_MENU, 0, Keyboard.KEYEVENTF_KEYUP, UIntPtr.Zero); } From 8a42f5420c4ba58cd8ad0b930ed042f0fb212ec7 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Thu, 4 Jun 2020 21:26:06 +0200 Subject: [PATCH 46/90] Make methode "GetInterestingRaceEvents" public to be able to call it ouside class RaceEventExtension. --- Phases/Transcoding/RaceHighlightEdits.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Phases/Transcoding/RaceHighlightEdits.cs b/Phases/Transcoding/RaceHighlightEdits.cs index e8178fd..3d66958 100644 --- a/Phases/Transcoding/RaceHighlightEdits.cs +++ b/Phases/Transcoding/RaceHighlightEdits.cs @@ -66,7 +66,7 @@ static IEnumerable _GetRaceEdits(this IEnumerable GetInterestingRaceEvents(IEnumerable raceEvents) + public static IOrderedEnumerable GetInterestingRaceEvents(IEnumerable raceEvents) { TraceInfo.WriteLine("Highlight Edits: Total Duration Target: {0}", HighlightVideoDuration); From a44bcb8d920f075c86d4df1aa15e69c7144d554a Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Thu, 4 Jun 2020 21:26:58 +0200 Subject: [PATCH 47/90] Introduce enumeration type for different iRacing replaySpeeds. --- Phases/AnalyseRace.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index 6657c5d..9579572 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -40,6 +40,14 @@ public partial class IRacingReplay int raceStartFrameNumber = 0; internal Incidents incidents; + enum replaySpeeds : int + { + pause = 0, + normal = 1, + FF2x = 2, + FF16x = 16 + }; + //create classes needed to analze race as global variables in the iRacingReplay instance internal OverlayData overlayData = new OverlayData(); internal RemovalEdits removalEdits; @@ -100,9 +108,11 @@ void AnalyseIncidents() //Analyse race situations at maximum replay speed w/o recording. void AnalyseRaceSituations(IEnumerable samples) { + replaySpeeds curReplaySpeed = replaySpeeds.normal; + //Start iRacing Replay from the beginning with maximum speed (16x) iRacing.Replay.MoveToFrame(raceStartFrameNumber); - iRacing.Replay.SetSpeed(16); + iRacing.Replay.SetSpeed((int)curReplaySpeed); //copied from iRacing.Capturing because race events in app V1.0.x.x are identified during capturing the whole video. //var overlayData = new OverlayData(); @@ -132,8 +142,8 @@ void AnalyseRaceSituations(IEnumerable samples) .WithPitStopCounts() .TakeUntil(3.Seconds()).Of(d => d.Telemetry.LeaderHasFinished && d.Telemetry.RaceCars.All(c => c.HasSeenCheckeredFlag || c.HasRetired || c.TrackSurface != TrackLocation.OnTrack)) .TakeUntil(3.Seconds()).AfterReplayPaused(); - samples = samples.AtSpeed(16); - Settings.AppliedTimingFactor = 1.0 / 16.0; + samples = samples.AtSpeed((int)curReplaySpeed); + Settings.AppliedTimingFactor = 1.0 / (int)curReplaySpeed; var startTime = DateTime.Now; From 9b9627ecca3f045c6a8bb4bf605432525a2183b7 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Thu, 4 Jun 2020 21:27:54 +0200 Subject: [PATCH 48/90] First draft of Replay / iRacing Control based on a list of raceEvents to be recorded in analysis phase. --- Phases/CaptureRace.cs | 180 ++++++++++++++++++++++++------------------ 1 file changed, 105 insertions(+), 75 deletions(-) diff --git a/Phases/CaptureRace.cs b/Phases/CaptureRace.cs index b9f4b2d..2adf846 100644 --- a/Phases/CaptureRace.cs +++ b/Phases/CaptureRace.cs @@ -19,6 +19,7 @@ using iRacingReplayOverlay.Phases.Capturing; using iRacingReplayOverlay.Phases.Direction; +using iRacingReplayOverlay.Phases.Transcoding; using iRacingReplayOverlay.Support; using iRacingSDK; using iRacingSDK.Support; @@ -56,85 +57,124 @@ void _CaptureRace(Action onComplete) internal void _CaptureRaceTest(Action onComplete, IEnumerable samples) { - //use internal class members in iRacingReplay class instead of local variables. - /* - var overlayData = new OverlayData(); - var removalEdits = new RemovalEdits(overlayData.RaceEvents); - var commentaryMessages = new CommentaryMessages(overlayData); - var videoCapture = new VideoCapture(); - var recordPitStop = new RecordPitStop(commentaryMessages); - var fastestLaps = new RecordFastestLaps(overlayData); - var replayControl = new ReplayControl(samples.First().SessionData, incidents, removalEdits, TrackCameras); - var sessionDataCapture = new SessionDataCapture(overlayData); - var captureLeaderBoardEveryHalfSecond = new SampleFilter(TimeSpan.FromSeconds(0.5), - new CaptureLeaderBoard(overlayData, commentaryMessages, removalEdits).Process); - var captureCamDriverEveryQuaterSecond = new SampleFilter(TimeSpan.FromSeconds(0.25), - new CaptureCamDriver(overlayData).Process); - - var captureCamDriverEvery4Seconds = new SampleFilter(TimeSpan.FromSeconds(4), - new LogCamDriver().Process); - - - TraceDebug.WriteLine("Cameras:"); - TraceDebug.WriteLine(TrackCameras.ToString());*/ - //identify wheather highlights video only is selected and OBS pause/resume can be used (to be implemented) if (bRecordUsingPauseResume) { - //Get race Events - } + //Retrieve list of raceEvents selected depending on the duration of the highlight video + var totalRaceEvents = RaceEventExtension.GetInterestingRaceEvents(overlayData.RaceEvents.ToList()); + + //set iRacing Replay to Race start and ensure that iRacing is playing out replay at normal speed + iRacing.Replay.MoveToStartOfRace(); //move in iRacing replay to start of Race + iRacing.Replay.SetSpeed(1); //set replay speed to normal + + //Record the selected race events into a highlight video + var highligtVideoCapture = new VideoCapture(); //create instance to control by sending hot-keys to recording software (tested with OBS) + highligtVideoCapture.Activate(workingFolder); //Start video capturing FileName will be given by recording software. + + //cycle through all raceEvents selected for the highlight video and record them (REMARK: Camera switching not implemented yet) + foreach (var raceEvent in totalRaceEvents) + { + TraceInfo.WriteLine("ADV_RECORDING: Type: {0} | Durations-Span: {1} | ".F(raceEvent.GetType(), raceEvent.ToString())); + //pause recording software before jumping to new position in iRacing Replay + highligtVideoCapture.Pause(); - var videoCapture = new VideoCapture(); + //jump to selected RaceEvent in iRacing Replay + int framePositionInRace = raceStartFrameNumber + (int)Math.Round(raceEvent.StartTime * 60.0); + iRacing.Replay.MoveToFrame(raceStartFrameNumber + (int)Math.Round(raceEvent.StartTime * 60.0)); - ApplyFirstLapCameraDirection(samples, replayControl); + highligtVideoCapture.Resume(); //resume recording + + Thread.Sleep((int)(1000*raceEvent.Duration)); //pause thread until scene is fully recorded. + } + //IOrderedEnumerable eRaceEventsOfInterest = _GetRaceEdits(this.overlayData.RaceEvents); + //foreach ( var raceEvent in removalEdits) + //{ + + //} + } else { //Code to be removed after being able to implment working solution where analysis phase and replay-capture phase are distinct processes. + //use local variables for original code instead of global variables introduced to support full analysis in analysis-phase + + var overlayData = new OverlayData(); + var removalEdits = new RemovalEdits(overlayData.RaceEvents); + var commentaryMessages = new CommentaryMessages(overlayData); + var recordPitStop = new RecordPitStop(commentaryMessages); + var fastestLaps = new RecordFastestLaps(overlayData); + var replayControl = new ReplayControl(samples.First().SessionData, incidents, removalEdits, TrackCameras); + var sessionDataCapture = new SessionDataCapture(overlayData); + var captureLeaderBoardEveryHalfSecond = new SampleFilter(TimeSpan.FromSeconds(0.5), + new CaptureLeaderBoard(overlayData, commentaryMessages, removalEdits).Process); + var captureCamDriverEveryQuaterSecond = new SampleFilter(TimeSpan.FromSeconds(0.25), + new CaptureCamDriver(overlayData).Process); + + var captureCamDriverEvery4Seconds = new SampleFilter(TimeSpan.FromSeconds(4), + new LogCamDriver().Process); + + + TraceDebug.WriteLine("Cameras:"); + TraceDebug.WriteLine(TrackCameras.ToString()); + + + + var videoCapture = new VideoCapture(); + + ApplyFirstLapCameraDirection(samples, replayControl); + + samples = samples + .VerifyReplayFrames() + .WithCorrectedPercentages() + .WithCorrectedDistances() + .WithFastestLaps() + .WithFinishingStatus() + .WithPitStopCounts() + .TakeUntil(3.Seconds()).Of(d => d.Telemetry.LeaderHasFinished && d.Telemetry.RaceCars.All(c => c.HasSeenCheckeredFlag || c.HasRetired || c.TrackSurface != TrackLocation.OnTrack)) + .TakeUntil(3.Seconds()).AfterReplayPaused(); + + if (shortTestOnly) + { + samples = samples.AtSpeed(Settings.Default.TimingFactorForShortTest); + Settings.AppliedTimingFactor = 1.0 / Settings.Default.TimingFactorForShortTest; + } - samples = samples - .VerifyReplayFrames() - .WithCorrectedPercentages() - .WithCorrectedDistances() - .WithFastestLaps() - .WithFinishingStatus() - .WithPitStopCounts() - .TakeUntil(3.Seconds()).Of(d => d.Telemetry.LeaderHasFinished && d.Telemetry.RaceCars.All(c => c.HasSeenCheckeredFlag || c.HasRetired || c.TrackSurface != TrackLocation.OnTrack)) - .TakeUntil(3.Seconds()).AfterReplayPaused(); - - if (shortTestOnly) - { - samples = samples.AtSpeed(Settings.Default.TimingFactorForShortTest); - Settings.AppliedTimingFactor = 1.0 / Settings.Default.TimingFactorForShortTest; - } + videoCapture.Activate(workingFolder); //Start video capturing FileName will be given by recording software. + var startTime = DateTime.Now; - videoCapture.Activate(workingFolder); //Start video capturing FileName will be given by recording software. - var startTime = DateTime.Now; + overlayData.CapturedVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); - overlayData.CapturedVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); + foreach (var data in samples) + { + var relativeTime = DateTime.Now - startTime; + + TraceDebug.WriteLine("Recording at time: {0}", relativeTime); + + replayControl.Process(data); + sessionDataCapture.Process(data); + captureLeaderBoardEveryHalfSecond.Process(data, relativeTime); + captureCamDriverEveryQuaterSecond.Process(data, relativeTime); + recordPitStop.Process(data, relativeTime); + fastestLaps.Process(data, relativeTime); + removalEdits.Process(data, relativeTime); + captureCamDriverEvery4Seconds.Process(data, relativeTime); + } - foreach (var data in samples) - { - var relativeTime = DateTime.Now - startTime; - - TraceDebug.WriteLine("Recording at time: {0}", relativeTime); - - replayControl.Process(data); - //sessionDataCapture.Process(data); - //captureLeaderBoardEveryHalfSecond.Process(data, relativeTime); - //captureCamDriverEveryQuaterSecond.Process(data, relativeTime); - //recordPitStop.Process(data, relativeTime); - //fastestLaps.Process(data, relativeTime); - //removalEdits.Process(data, relativeTime); - captureCamDriverEvery4Seconds.Process(data, relativeTime); - } + var files = videoCapture.Deactivate(); //Stop video capturing - returns list with "guessed" filename. Filenmae being different from replay-script due to different time stamp. + //investigate whether renaming of video file is necessary. + + removalEdits.Stop(); + + var overlayFile = SaveOverlayData(overlayData, files); - var files = videoCapture.Deactivate(); //Stop video capturing - returns list with "guessed" filename. Filenmae being different from replay-script due to different time stamp. - //investigate whether renaming of video file is necessary. + iRacing.Replay.SetSpeed(0); - removalEdits.Stop(); + AltTabBackToApp(); - var overlayFile = SaveOverlayData(overlayData, files); + if (files.Count == 0) + throw new Exception("Unable to find video files in '{0}' - possible wrong working folder".F(workingFolder)); - iRacing.Replay.SetSpeed(0); + _WithOverlayFile(overlayFile); - AltTabBackToApp(); + onComplete(overlayFile); + } + //terminate iRacing after video capture completed to free up CPU resources if (bCloseiRacingAfterRecording) @@ -150,16 +190,6 @@ internal void _CaptureRaceTest(Action onComplete, IEnumerable Date: Thu, 4 Jun 2020 22:35:34 +0200 Subject: [PATCH 49/90] set replay speed to the same value than used if "shorttestonly" is checked --- Phases/AnalyseRace.cs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index 9579572..99b0232 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -112,7 +112,15 @@ void AnalyseRaceSituations(IEnumerable samples) //Start iRacing Replay from the beginning with maximum speed (16x) iRacing.Replay.MoveToFrame(raceStartFrameNumber); - iRacing.Replay.SetSpeed((int)curReplaySpeed); + + + + //if (shortTestOnly) + //{ + // samples = samples.AtSpeed(Settings.Default.TimingFactorForShortTest); + // Settings.AppliedTimingFactor = 1.0 / Settings.Default.TimingFactorForShortTest; + //} + //copied from iRacing.Capturing because race events in app V1.0.x.x are identified during capturing the whole video. //var overlayData = new OverlayData(); @@ -142,8 +150,13 @@ void AnalyseRaceSituations(IEnumerable samples) .WithPitStopCounts() .TakeUntil(3.Seconds()).Of(d => d.Telemetry.LeaderHasFinished && d.Telemetry.RaceCars.All(c => c.HasSeenCheckeredFlag || c.HasRetired || c.TrackSurface != TrackLocation.OnTrack)) .TakeUntil(3.Seconds()).AfterReplayPaused(); - samples = samples.AtSpeed((int)curReplaySpeed); - Settings.AppliedTimingFactor = 1.0 / (int)curReplaySpeed; + + + //set speed for analysis phase (target speed is FF16x) + samples = samples.AtSpeed(Settings.Default.TimingFactorForShortTest); + Settings.AppliedTimingFactor = 1.0 / Settings.Default.TimingFactorForShortTest; + + iRacing.Replay.SetSpeed((int)curReplaySpeed); var startTime = DateTime.Now; From b0e46c12dbd1b0c693d8cdb4890f7fade1db24c0 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Thu, 4 Jun 2020 22:47:28 +0200 Subject: [PATCH 50/90] Clean-up Code - remove not used code --- Phases/CaptureRace.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Phases/CaptureRace.cs b/Phases/CaptureRace.cs index 2adf846..d64469f 100644 --- a/Phases/CaptureRace.cs +++ b/Phases/CaptureRace.cs @@ -86,11 +86,6 @@ internal void _CaptureRaceTest(Action onComplete, IEnumerable eRaceEventsOfInterest = _GetRaceEdits(this.overlayData.RaceEvents); - //foreach ( var raceEvent in removalEdits) - //{ - - //} } else { //Code to be removed after being able to implment working solution where analysis phase and replay-capture phase are distinct processes. //use local variables for original code instead of global variables introduced to support full analysis in analysis-phase From c9c0346c4b86f94cbedb340bb4b4cf21232ed582 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Fri, 5 Jun 2020 00:26:59 +0200 Subject: [PATCH 51/90] Add methodes to be able to muliple timespan with int / double value due to not available in .NET before 5.0. --- Phases/AnalyseRace.cs | 5 +++-- Support/Extensions.cs | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index 99b0232..787df2a 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -23,6 +23,7 @@ using iRacingReplayOverlay.Phases.Analysis; using iRacingReplayOverlay.Phases.Capturing; using iRacingReplayOverlay.Phases.Direction; +using iRacingReplayOverlay.Support; using iRacingSDK; using iRacingSDK.Support; using System; @@ -164,8 +165,8 @@ void AnalyseRaceSituations(IEnumerable samples) foreach (var data in samples) { - var relativeTime = DateTime.Now - startTime; - + var relativeTime = (DateTime.Now - startTime).Multiply(3.0); + replayControl.Process(data); sessionDataCapture.Process(data); captureLeaderBoardEveryHalfSecond.Process(data, relativeTime); diff --git a/Support/Extensions.cs b/Support/Extensions.cs index 55155fb..84b365c 100644 --- a/Support/Extensions.cs +++ b/Support/Extensions.cs @@ -66,4 +66,24 @@ public static int IndexOf(this IEnumerable self, Func fn) return -1; } } + + + public static class TimeSpanExtension + { + /// + /// Multiplies a timespan by an integer value + /// + public static TimeSpan Multiply(this TimeSpan multiplicand, int multiplier) + { + return TimeSpan.FromTicks(multiplicand.Ticks * multiplier); + } + + /// + /// Multiplies a timespan by a double value + /// + public static TimeSpan Multiply(this TimeSpan multiplicand, double multiplier) + { + return TimeSpan.FromTicks((long)(multiplicand.Ticks * multiplier)); + } + } } From 15eb5267c6fcd7e8c11ce12449811d18db69df90 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Fri, 5 Jun 2020 00:31:55 +0200 Subject: [PATCH 52/90] Calculate relative time taking replay speed into account --- Phases/AnalyseRace.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index 787df2a..c60c0c8 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -157,7 +157,7 @@ void AnalyseRaceSituations(IEnumerable samples) samples = samples.AtSpeed(Settings.Default.TimingFactorForShortTest); Settings.AppliedTimingFactor = 1.0 / Settings.Default.TimingFactorForShortTest; - iRacing.Replay.SetSpeed((int)curReplaySpeed); + //iRacing.Replay.SetSpeed((int)curReplaySpeed); var startTime = DateTime.Now; @@ -165,8 +165,12 @@ void AnalyseRaceSituations(IEnumerable samples) foreach (var data in samples) { - var relativeTime = (DateTime.Now - startTime).Multiply(3.0); - + var relativeTime = (DateTime.Now - startTime).Multiply(Settings.Default.TimingFactorForShortTest); + var prevRelativeTime = DateTime.Now - startTime; + + TraceDebug.WriteLine("Processing Data Sample at relative time: {0} | {1}".F(relativeTime, prevRelativeTime)); + + replayControl.Process(data); sessionDataCapture.Process(data); captureLeaderBoardEveryHalfSecond.Process(data, relativeTime); From b42b1c7ecfba7b04bddf5e130a22ed465fc78b05 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Fri, 5 Jun 2020 08:33:05 +0200 Subject: [PATCH 53/90] Improve VisualStudio Debugger Performance and enable new features. --- .../iRacingReplayOverlay.net.Tests.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj index a85e219..7617ba1 100644 --- a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj +++ b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj @@ -22,6 +22,7 @@ prompt ManagedMinimumRules.ruleset true + true bin\x64\Release\ From fa56eb1537beeda6717262763ea884128b13229d Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Fri, 5 Jun 2020 08:34:31 +0200 Subject: [PATCH 54/90] Send Key-Stroke combination to resume recording only when it has been paused before. --- Phases/Direction/VideoCapture.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Phases/Direction/VideoCapture.cs b/Phases/Direction/VideoCapture.cs index c431db5..097bbd8 100644 --- a/Phases/Direction/VideoCapture.cs +++ b/Phases/Direction/VideoCapture.cs @@ -115,7 +115,7 @@ public void Pause() //methode sending key-stroke command to resume recording software public void Resume() { - if (curVideoStatus == videoStatus.running && curVideoStatus == videoStatus.paused) + if (curVideoStatus == videoStatus.paused) { SendKeyStroke_PauseResume(); curVideoStatus = videoStatus.running; From a591f4f8eda7aedb3835b16cbbe3ea738ff2cb19 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Fri, 5 Jun 2020 08:35:40 +0200 Subject: [PATCH 55/90] Add command to set Replay-Speed to normal when playing-out raceEvents --- Phases/CaptureRace.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Phases/CaptureRace.cs b/Phases/CaptureRace.cs index 2adf846..88ef9de 100644 --- a/Phases/CaptureRace.cs +++ b/Phases/CaptureRace.cs @@ -81,6 +81,7 @@ internal void _CaptureRaceTest(Action onComplete, IEnumerable Date: Fri, 5 Jun 2020 08:47:16 +0200 Subject: [PATCH 56/90] Remove NoOverlay Directory --- plugins/NoOverlay | 1 - 1 file changed, 1 deletion(-) delete mode 160000 plugins/NoOverlay diff --git a/plugins/NoOverlay b/plugins/NoOverlay deleted file mode 160000 index 1ca876a..0000000 --- a/plugins/NoOverlay +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1ca876ad6ae80738089ad7a2180a26a5e0670c4e From 71bcdfb1af442ac9b50402268c656cd3634255e4 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Fri, 5 Jun 2020 08:47:16 +0200 Subject: [PATCH 57/90] add source code for NoOverlay Has been a submodule in the past but is no part of the solution iRacingReplayDirector --- plugins/NoOverlay/.gitignore | 21 ++++ plugins/NoOverlay/MyPlugin.DriverCamera.cs | 48 ++++++++ plugins/NoOverlay/MyPlugin.Extensions.cs | 66 +++++++++++ plugins/NoOverlay/MyPlugin.FastestLaps.cs | 38 ++++++ .../NoOverlay/MyPlugin.FlashCardHeading.cs | 42 +++++++ plugins/NoOverlay/MyPlugin.FlashCardIntro.cs | 54 +++++++++ plugins/NoOverlay/MyPlugin.FlashCardOutro.cs | 62 ++++++++++ plugins/NoOverlay/MyPlugin.Leaderboard.cs | 112 ++++++++++++++++++ plugins/NoOverlay/MyPlugin.RaceMessages.cs | 41 +++++++ plugins/NoOverlay/MyPlugin.cs | 46 +++++++ plugins/NoOverlay/NoOverlay.csproj | 112 ++++++++++++++++++ .../NoOverlay.previous.nugetreferenceswitcher | 1 + plugins/NoOverlay/Properties/AssemblyInfo.cs | 36 ++++++ plugins/NoOverlay/Settings.cs | 13 ++ plugins/NoOverlay/Styles.cs | 32 +++++ plugins/NoOverlay/packages.config | 6 + plugins/NoOverlay/tools/package.cmd | 17 +++ 17 files changed, 747 insertions(+) create mode 100644 plugins/NoOverlay/.gitignore create mode 100644 plugins/NoOverlay/MyPlugin.DriverCamera.cs create mode 100644 plugins/NoOverlay/MyPlugin.Extensions.cs create mode 100644 plugins/NoOverlay/MyPlugin.FastestLaps.cs create mode 100644 plugins/NoOverlay/MyPlugin.FlashCardHeading.cs create mode 100644 plugins/NoOverlay/MyPlugin.FlashCardIntro.cs create mode 100644 plugins/NoOverlay/MyPlugin.FlashCardOutro.cs create mode 100644 plugins/NoOverlay/MyPlugin.Leaderboard.cs create mode 100644 plugins/NoOverlay/MyPlugin.RaceMessages.cs create mode 100644 plugins/NoOverlay/MyPlugin.cs create mode 100644 plugins/NoOverlay/NoOverlay.csproj create mode 100644 plugins/NoOverlay/NoOverlay.previous.nugetreferenceswitcher create mode 100644 plugins/NoOverlay/Properties/AssemblyInfo.cs create mode 100644 plugins/NoOverlay/Settings.cs create mode 100644 plugins/NoOverlay/Styles.cs create mode 100644 plugins/NoOverlay/packages.config create mode 100644 plugins/NoOverlay/tools/package.cmd diff --git a/plugins/NoOverlay/.gitignore b/plugins/NoOverlay/.gitignore new file mode 100644 index 0000000..0df6e90 --- /dev/null +++ b/plugins/NoOverlay/.gitignore @@ -0,0 +1,21 @@ +*.suo +*.userprefs +**/bin/* +**/obj/* +**/SampleRaceStream.bin +packages/ +TestResult.xml +iRacingReplayOverlay.net.Tests.VisualState.xml +publish/ +publish-beta/ +**/*.csproj.user +**/*.log +deploy/* +!deploy/.keep +!deploy/test/.keep +Application Files +setup.exe +iRacingReplayOverlay.test.application +.vs/* +tools/encrypt.cmd +Aws/AwsKeyActual.cs diff --git a/plugins/NoOverlay/MyPlugin.DriverCamera.cs b/plugins/NoOverlay/MyPlugin.DriverCamera.cs new file mode 100644 index 0000000..78e9b6d --- /dev/null +++ b/plugins/NoOverlay/MyPlugin.DriverCamera.cs @@ -0,0 +1,48 @@ +using iRacingDirector.Plugin; +using System.Drawing; +using System.Drawing.Drawing2D; + +namespace NoOverlay +{ + public partial class MyPlugin + { + public Driver CamDriver; + + void DrawCurrentDriverRow() + { + var position = CamDriver.Position != null ? CamDriver.Position.Value.ToString() : ""; + var indicator = CamDriver.Position != null ? CamDriver.Position.Value.Ordinal() : ""; + + var offset = 5; + + Graphics.InRectangle(1920 / 2 - 440 / 2, 980, 70, 40) + .WithBrush(Styles.YellowBrush) + .WithPen(Styles.BlackPen) + .DrawRectangleWithBorder() + .WithFontSizeOf(24) + .WithBrush(Styles.BlackBrush) + .WithStringFormat(StringAlignment.Near) + .Center(cg => cg + .DrawText(position, topOffset: offset) + .AfterText(position) + .MoveRight(3) + .WithFont(Settings.FontName, 18, FontStyle.Bold) + .DrawText(indicator, topOffset: offset) + ) + + .ToRight(width: 70) + .WithLinearGradientBrush(Styles.White, Styles.WhiteSmoke, LinearGradientMode.BackwardDiagonal) + .DrawRectangleWithBorder() + .WithStringFormat(StringAlignment.Center) + .WithBrush(Styles.BlackBrush) + .DrawText(CamDriver.CarNumber, topOffset: offset) + + .ToRight(width: 300) + .WithLinearGradientBrush(Styles.White, Styles.WhiteSmoke, LinearGradientMode.BackwardDiagonal) + .DrawRectangleWithBorder() + .WithStringFormat(StringAlignment.Center) + .WithBrush(Styles.BlackBrush) + .DrawText(CamDriver.UserName, topOffset: offset); + } + } +} diff --git a/plugins/NoOverlay/MyPlugin.Extensions.cs b/plugins/NoOverlay/MyPlugin.Extensions.cs new file mode 100644 index 0000000..c10d559 --- /dev/null +++ b/plugins/NoOverlay/MyPlugin.Extensions.cs @@ -0,0 +1,66 @@ +using iRacingDirector.Plugin; +using System; +using System.Drawing; +using System.Drawing.Drawing2D; + +namespace NoOverlay +{ + public static class MyPluginExtensions + { + public static string FormattedForLeaderboard(this string shortName) + { + var length = Math.Min(4, shortName.Length); + return shortName.Substring(0, length).ToUpper(); + } + + public static GraphicRect DrawBlackBackground(this GraphicRect rr) + { + return rr + .WithBrush(Styles.TransparentLightBlack) + .WithPen(Styles.WhitePen) + .DrawRectangleWithoutBorder(); + } + + public static GraphicRect DrawGrayBackground(this GraphicRect rr) + { + return rr + .WithBrush(Styles.TransparentLightGray) + .WithPen(Styles.WhitePen) + .DrawRectangleWithoutBorder(); + } + + public static GraphicRect DrawWhiteText(this GraphicRect rr, string text, StringAlignment alignment) + { + rr.WithBrush(Styles.WhiteBrush) + .WithStringFormat(alignment) + .DrawText(text); + + return rr; + } + + public static GraphicRect WithFontSizeOf(this GraphicRect rr, int fontSize) + { + return rr + .WithFont(Settings.FontName, fontSize, FontStyle.Regular); + } + + public static GraphicRect DrawWhiteGradiantBox(this GraphicRect rr) + { + return rr + .WithLinearGradientBrush(Color.DarkGray, Color.White, LinearGradientMode.Vertical) + .WithPen(Styles.BlackPen) + .DrawRectangleWithBorder() + .WithBrush(Styles.BlackBrush); + } + + public static GraphicRect DrawRedGradiantBox(this GraphicRect rr) + { + return rr + .WithHeight(rr.Rectangle.Height + 3) + .MoveUp(3) + .WithLinearGradientBrush(Styles.RedBannerDark, Styles.RedBannerLight, LinearGradientMode.Vertical) + .DrawRoundRectangle(5) + .WithBrush(Styles.WhiteBrush); + } + } +} diff --git a/plugins/NoOverlay/MyPlugin.FastestLaps.cs b/plugins/NoOverlay/MyPlugin.FastestLaps.cs new file mode 100644 index 0000000..bd655a3 --- /dev/null +++ b/plugins/NoOverlay/MyPlugin.FastestLaps.cs @@ -0,0 +1,38 @@ +using iRacingDirector.Plugin; +using System; +using System.Drawing; + +namespace NoOverlay +{ + public partial class MyPlugin + { + public FastLap FastLap; + + void DrawFastestLap() + { + if (FastLap == null) + return; + + const int left = 1920 - 80 - 450; + const int top = 900; + + Graphics.InRectangle(left, top + 34, 400, 34) + .DrawRedGradiantBox(); + + Graphics.InRectangle(left, top + 34, 250, 34) + .WithBrush(Styles.WhiteBrush) + .WithFontSizeOf(19) + .WithStringFormat(StringAlignment.Center) + .DrawText(FastLap.Driver.UserName, topOffset: 5) + .ToRight(width: 150) + .DrawText(TimeSpan.FromSeconds(FastLap.Time).ToString(@"mm\:ss\.fff"), topOffset: 5); + + Graphics.InRectangle(left, top, 400, 34) + .DrawWhiteGradiantBox() + .WithBrush(Styles.BlackBrush) + .WithFontSizeOf(18) + .WithStringFormat(StringAlignment.Center) + .DrawText("New Fast Lap", topOffset: 5); + } + } +} diff --git a/plugins/NoOverlay/MyPlugin.FlashCardHeading.cs b/plugins/NoOverlay/MyPlugin.FlashCardHeading.cs new file mode 100644 index 0000000..45fc028 --- /dev/null +++ b/plugins/NoOverlay/MyPlugin.FlashCardHeading.cs @@ -0,0 +1,42 @@ +using iRacingDirector.Plugin; +using System.Drawing; + +namespace NoOverlay +{ + public partial class MyPlugin + { + GraphicRect DrawFlashCardHeading(string title) + { + var displayName = EventData.WeekendInfo.TrackDisplayName.ToUpper(); + + Graphics.InRectangle(FlashCardLeft, 250, FlashCardWidth, 575) + .DrawGrayBackground(); + + Graphics.InRectangle(FlashCardLeft - 10, 311 - 2, FlashCardWidth - 100, 48) + .DrawRedGradiantBox() + .MoveDown(7) + .MoveRight(20) + .WithFontSizeOf(23) + .WithStringFormat(StringAlignment.Near) + .DrawText(title, topOffset: 4); + + Graphics.InRectangle(FlashCardLeft - 10, 240, FlashCardWidth - 100, 72) + .DrawWhiteGradiantBox() + .MoveDown(7) + .MoveRight(20) + .WithFontSizeOf(23) + .WithStringFormat(StringAlignment.Near) + .DrawText(displayName) + .MoveDown(32) + .WithFontSizeOf(17) + .WithStringFormat(StringAlignment.Near) + .DrawText(EventData.WeekendInfo.TrackCity.ToUpper() + ", " + EventData.WeekendInfo.TrackCountry.ToUpper()); + + return Graphics.InRectangle(FlashCardLeft + 30, 400, 60, 40) + .WithPen(Styles.BlackPen) + .WithBrush(Styles.BlackBrush) + .WithFontSizeOf(20) + .WithStringFormat(StringAlignment.Near); + } + } +} diff --git a/plugins/NoOverlay/MyPlugin.FlashCardIntro.cs b/plugins/NoOverlay/MyPlugin.FlashCardIntro.cs new file mode 100644 index 0000000..f78c095 --- /dev/null +++ b/plugins/NoOverlay/MyPlugin.FlashCardIntro.cs @@ -0,0 +1,54 @@ +using iRacingDirector.Plugin; +using System; +using System.Drawing; +using System.Linq; + +namespace NoOverlay +{ + public partial class MyPlugin + { + void DrawIntroFlashCard(int page) + { + var r = DrawFlashCardHeading("Qualifying Results"); + + DrawFlashCardIntro(r, page); + } + + void DrawFlashCardIntro(GraphicRect r, int page) + { + var totalWidth = FlashCardWidth; + var left = FlashCardLeft; + + var thisPageOfQualifyingResults = EventData.QualifyingResults.Skip(page * DriversPerPage).Take(DriversPerPage); + + var offset = 5; + Graphics.InRectangle(left, r.Rectangle.Top, totalWidth, 10) + .WithPen(Styles.ThickBlackPen) + .DrawLine(left + 8, r.Rectangle.Top - offset, left + totalWidth - 16, r.Rectangle.Top - offset); + + foreach (var qualifier in thisPageOfQualifyingResults) + { + var driver = EventData.GetCompetingDriverByIndex(qualifier.CarIdx); + + r.Center(cg => cg + .DrawText(qualifier.Position.ToString()) + .AfterText(qualifier.Position.ToString()) + .MoveRight(1) + .WithFont(Settings.FontName, 16, FontStyle.Bold) + .DrawText(qualifier.Position.Ordinal())) + .ToRight(width: 120, left: 30) + .DrawText(TimeSpan.FromSeconds(qualifier.FastestTime).ToString("mm\\:ss\\.ff")) + .ToRight(width: 60) + .DrawText(driver.CarNumber) + .ToRight(width: 300) + .DrawText(driver.UserName); + + r = r.ToBelow(); + + Graphics.InRectangle(left, r.Rectangle.Top, totalWidth, 10) + .WithPen(Styles.ThickBlackPen) + .DrawLine(left + 8, r.Rectangle.Top - offset, left + totalWidth - 16, r.Rectangle.Top - offset); + } + } + } +} diff --git a/plugins/NoOverlay/MyPlugin.FlashCardOutro.cs b/plugins/NoOverlay/MyPlugin.FlashCardOutro.cs new file mode 100644 index 0000000..5fce406 --- /dev/null +++ b/plugins/NoOverlay/MyPlugin.FlashCardOutro.cs @@ -0,0 +1,62 @@ +using iRacingDirector.Plugin; +using System; +using System.Drawing; +using System.Linq; + +namespace NoOverlay +{ + public partial class MyPlugin + { + public Driver[] PreferredDriverNames; + + void DrawOutroFlashCard(int page) + { + var r = DrawFlashCardHeading("Race Results"); + + DrawFlashCardOutro(r, page); + } + + void DrawFlashCardOutro(GraphicRect r, int page) + { + var rsession = EventData.Race; + var results = EventData.Results; + + var offset = 5; + Graphics.InRectangle(FlashCardLeft, r.Rectangle.Top, FlashCardWidth, 10) + .WithPen(Styles.ThickBlackPen) + .DrawLine(FlashCardLeft + 8, r.Rectangle.Top - offset, FlashCardLeft + FlashCardWidth - 16, r.Rectangle.Top - offset); + + var LeaderTime = TimeSpan.FromSeconds(results[0].Time); + + foreach (var racerResult in results.Skip(DriversPerPage * page).Take(DriversPerPage)) + { + var driver = EventData.GetCompetingDriverByIndex(racerResult.CarIdx); + + var Gap = TimeSpan.FromSeconds(racerResult.Time) - LeaderTime; // Gap calculation + if (Gap == TimeSpan.Zero) //For the leader we want to display the race duration + Gap = LeaderTime; + + r.WithBrush(PreferredDriverNames.Any(d => d.UserName == driver.UserName) ? Styles.RedBrush : Styles.BlackBrush); + + r.Center(cg => cg + .DrawText(racerResult.Position.ToString()) + .AfterText(racerResult.Position.ToString()) + .MoveRight(1) + .WithFont(Settings.FontName, 16, FontStyle.Bold) + .DrawText(racerResult.Position.Ordinal())) + .ToRight(width: 190, left: 30) + .DrawText(Gap.ToString("hh\\:mm\\:ss\\.fff")) + .ToRight(width: 80, left: 20) + .DrawText(driver.CarNumber) + .ToRight(width: 350) + .DrawText(driver.UserName); + + r = r.ToBelow(); + + Graphics.InRectangle(FlashCardLeft, r.Rectangle.Top, FlashCardWidth, 10) + .WithPen(Styles.ThickBlackPen) + .DrawLine(FlashCardLeft + 8, r.Rectangle.Top - offset, FlashCardLeft + FlashCardWidth - 16, r.Rectangle.Top - offset); + } + } + } +} diff --git a/plugins/NoOverlay/MyPlugin.Leaderboard.cs b/plugins/NoOverlay/MyPlugin.Leaderboard.cs new file mode 100644 index 0000000..edff2b4 --- /dev/null +++ b/plugins/NoOverlay/MyPlugin.Leaderboard.cs @@ -0,0 +1,112 @@ +using iRacingDirector.Plugin; +using System; +using System.Drawing; +using System.Linq; + +namespace NoOverlay +{ + public partial class MyPlugin + { + public LeaderBoard LeaderBoard; + + const int fontSize = 16; + const int offset = 4; + const int positionColumnWidth = 50; + const int carNumberColumnWidth = 70; + const int nameColumnWidth = 80; + const int leaderboardWidth = positionColumnWidth + carNumberColumnWidth + nameColumnWidth; + const int maxRows = 25; + const int leaderboardLeft = 80; + const int leaderboardTop = 60; + const int rowHeight = 30; + const int counterGap = 5; + + void DrawLeaderboard(TimeSpan timeInSeconds) + { + var graphics = Graphics.With() + .WithFontSizeOf(fontSize) + .WithTextOffset(topOffset: offset); + + var showPitStopCount = timeInSeconds.Minutes % 3 == 0 && timeInSeconds.Seconds < 30 && LeaderBoard.Drivers.Take(maxRows).Any(d => d.PitStopCount > 0); + + var top = DrawLapCounterRow(graphics); + var first = true; + + foreach (var driver in LeaderBoard.Drivers.Take(maxRows)) + { + if (!first) + top = DrawDividerLine(graphics, leaderboardLeft, top); + + DrawLeaderboardRow(graphics, top, driver, leaderboardLeft); + + top += rowHeight; + first = false; + } + } + + private int DrawLapCounterRow(GraphicRect graphics) + { + var counter = GetLapCounterDescription(); + + graphics.InRectangle(leaderboardLeft, leaderboardTop, leaderboardWidth, rowHeight) + .DrawBlackBackground() + .DrawWhiteText(counter, StringAlignment.Center); + + return leaderboardTop + rowHeight + counterGap; + } + + private static void DrawLeaderboardRow(GraphicRect graphics, int top, Driver d, int left) + { + DrawPositionNumber(graphics, d, left, top); + left = DrawBackgroundForCarNumberAndDriverName(graphics, left, top); + left = DrawCarNumber(graphics, d, left, top); + DrawDriverName(graphics, d, left, top); + } + + static void DrawDriverName(GraphicRect graphics, Driver d, int left, int top) + { + graphics.InRectangle(left, top, nameColumnWidth, rowHeight) + .DrawWhiteText(d.ShortName.FormattedForLeaderboard(), StringAlignment.Near); + } + + static int DrawCarNumber(GraphicRect graphics, Driver d, int left, int top) + { + graphics.InRectangle(left, top, carNumberColumnWidth, rowHeight) + .DrawWhiteText(d.CarNumber, StringAlignment.Center); + + return left + carNumberColumnWidth; + } + + static int DrawBackgroundForCarNumberAndDriverName(GraphicRect graphics, int left, int top) + { + left += positionColumnWidth; + graphics.InRectangle(left, top, leaderboardWidth - positionColumnWidth, rowHeight) + .DrawBlackBackground(); + return left; + } + + static void DrawPositionNumber(GraphicRect graphics, Driver d, int left, int top) + { + graphics.InRectangle(left, top, positionColumnWidth, rowHeight) + .DrawGrayBackground() + .DrawWhiteText(d.Position.ToString(), StringAlignment.Center); + } + + static int DrawDividerLine(GraphicRect graphics, int left, int top) + { + graphics.InRectangle(left, top, leaderboardWidth, 4) + .WithPen(Styles.DividerLinePen) + .DrawLine(leaderboardLeft, top, leaderboardLeft + leaderboardWidth, top); + + return top + 1; + } + + string GetLapCounterDescription() + { + if (LeaderBoard.LapCounter != null) + return string.Format("{0} / {1}", LeaderBoard.LapCounter, LeaderBoard.RacePosition).ToUpper(); + + return LeaderBoard.RacePosition; + } + } +} diff --git a/plugins/NoOverlay/MyPlugin.RaceMessages.cs b/plugins/NoOverlay/MyPlugin.RaceMessages.cs new file mode 100644 index 0000000..b821b79 --- /dev/null +++ b/plugins/NoOverlay/MyPlugin.RaceMessages.cs @@ -0,0 +1,41 @@ +using iRacingDirector.Plugin; +using System; +using System.Drawing; + +namespace NoOverlay +{ + public partial class MyPlugin + { + public MessageSet MessageSet; + + void DrawRaceMessages(double timeInSeconds) + { + if (MessageSet == null) + return; + + var shiftFactor = Math.Min(timeInSeconds - MessageSet.Time, 1d); + var offset = (int)(34 * shiftFactor); + + offset = offset + (MessageSet.Messages.Length - 1) * 34; + + var row4Top = 900 + 34 * 3; + offset = row4Top - offset; + + var r = Graphics.InRectangle(80, offset, 450, 34); + + Graphics.SetClip(new Rectangle(80, 900, 450, 34 + 34 + 34)); + + foreach (var msg in MessageSet.Messages) + r = r.WithBrush(Styles.TransparentLighterGray) + .WithPen(Styles.BlackPen) + .DrawRectangleWithBorder() + .WithBrush(Styles.BlackBrush) + .WithFontSizeOf(19) + .WithStringFormat(StringAlignment.Near) + .DrawText(" " + msg, 0, 5) + .ToBelow(); + + Graphics.ResetClip(); + } + } +} diff --git a/plugins/NoOverlay/MyPlugin.cs b/plugins/NoOverlay/MyPlugin.cs new file mode 100644 index 0000000..ac0ff4d --- /dev/null +++ b/plugins/NoOverlay/MyPlugin.cs @@ -0,0 +1,46 @@ +using iRacingDirector.Plugin; +using iRacingSDK.Support; +using System.Drawing; + +namespace NoOverlay +{ + public partial class MyPlugin + { + public Graphics Graphics; + public EventData EventData; + + const int FlashCardWidth = 900; + const int FlashCardLeft = (1920 / 2) - FlashCardWidth / 2; + const int DriversPerPage = 10; + + public void IntroFlashCard(long duration, long timestamp) + { + //Do Nothing - below you can find a code example of JockeyOverlay + + /*var page = FlashCardPagingCalculator.GetPageNumber(EventData, DriversPerPage, duration, timestamp); + + DrawIntroFlashCard(page);*/ + } + + public void RaceOverlay(long timestamp) + { + //Do Nothing - below you can find a code example of JockeyOverlay + + /*var timeInSeconds = timestamp.FromNanoToSeconds(); + + DrawLeaderboard(timeInSeconds.Seconds()); + DrawCurrentDriverRow(); + DrawRaceMessages(timeInSeconds); + DrawFastestLap();*/ + } + + public void OutroFlashCard(long duration, long timestamp) + { + //Do Nothing - below you can find a code example of JockeyOverlay + + /*var page = FlashCardPagingCalculator.GetPageNumber(EventData, DriversPerPage, duration, timestamp); + + DrawOutroFlashCard(page);*/ + } + } +} diff --git a/plugins/NoOverlay/NoOverlay.csproj b/plugins/NoOverlay/NoOverlay.csproj new file mode 100644 index 0000000..16ef829 --- /dev/null +++ b/plugins/NoOverlay/NoOverlay.csproj @@ -0,0 +1,112 @@ + + + + + Debug + AnyCPU + {C4ABC83D-1801-4407-B7C2-BDF9396D28AD} + Library + Properties + NoOverlay + NoOverlay + v4.0 + 512 + Client + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + .\packages\ + + + .\..\packages\ + + + .\..\..\packages\ + + + ..\iRacingDirector.Plugin.Support\iRacingDirector.Plugin.Support.csproj + ..\iRacingDirector.Plugin.Support\iRacingDirector.Plugin.Support\iRacingDirector.Plugin.Support.csproj + + + + {cec2bb31-324d-41e3-83c8-a5c35c63129b} + iRacingDirector.Plugin.Support + + + + + $(PackagesFolder)\iRacingDirector.Plugin.Support.1.0.0.48\lib\net40-client\iRacingDirector.Plugin.Support.dll + True + + + + + + + + + + + ..\..\packages\YamlDotNet.5.3.1\lib\net35\YamlDotNet.dll + + + + + + + + + + + + + + + + + + + + + + + {5422AE20-F220-4BE1-9E61-5296981ABB5C} + iRacingSDK + + + + + + mkdir $(SolutionDir)\bin\x64\Debug\plugins\NoOverlay + copy $(TargetDir)\NoOverlay.* $(SolutionDir)\bin\x64\Debug\plugins\NoOverlay + copy $(TargetDir)\iRacingDirector.Plugin.Support.* $(SolutionDir)\bin\x64\Debug\plugins\NoOverlay + + + + rmdir /S /Q $(SolutionDir)\bin\x64\Debug\plugins\NoOverlay + + + \ No newline at end of file diff --git a/plugins/NoOverlay/NoOverlay.previous.nugetreferenceswitcher b/plugins/NoOverlay/NoOverlay.previous.nugetreferenceswitcher new file mode 100644 index 0000000..4989959 --- /dev/null +++ b/plugins/NoOverlay/NoOverlay.previous.nugetreferenceswitcher @@ -0,0 +1 @@ +iRacingSDK ../../iRacingSDK.Net/iRacingSDK.csproj ../../packages/iRacingSDK.1.0.0.40/lib/net40-client/iRacingSDK.dll diff --git a/plugins/NoOverlay/Properties/AssemblyInfo.cs b/plugins/NoOverlay/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..676b486 --- /dev/null +++ b/plugins/NoOverlay/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NoOverlay")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NoOverlay")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("5916b84c-0264-4102-9ccc-28006d84e4fa")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/plugins/NoOverlay/Settings.cs b/plugins/NoOverlay/Settings.cs new file mode 100644 index 0000000..ed71828 --- /dev/null +++ b/plugins/NoOverlay/Settings.cs @@ -0,0 +1,13 @@ +using iRacingDirector.Plugin; + +namespace NoOverlay +{ + public static class Settings + { + [Description("The font to use for all overlay text")] + public static string FontName = "Arial"; + + [Description("Check here if you want the font's bold face to be applied in the overlay.")] + public static bool BoldFont = true; + } +} diff --git a/plugins/NoOverlay/Styles.cs b/plugins/NoOverlay/Styles.cs new file mode 100644 index 0000000..c87f443 --- /dev/null +++ b/plugins/NoOverlay/Styles.cs @@ -0,0 +1,32 @@ +using iRacingDirector.Plugin; +using System.Drawing; + +namespace NoOverlay +{ + public static class Styles + { + public const int AlphaLevel = 0; + public static readonly Color White = Color.FromArgb(AlphaLevel, Color.White); + public static readonly Color WhiteSmoke = Color.FromArgb(AlphaLevel, Color.WhiteSmoke); + public static readonly Color Black = Color.FromArgb(AlphaLevel, Color.Black); + + public static readonly Color RedBannerDark = Color.DarkRed; + public static readonly Color RedBannerLight = Color.DarkRed.BrightenBy(1.4); + + public static readonly Pen BlackPen = new Pen(Black); + public static readonly Pen ThickBlackPen = new Pen(Black, 2); + public static readonly Pen WhitePen = new Pen(White); + + public static readonly Brush BlackBrush = new SolidBrush(Color.Black); + public static readonly Brush RedBrush = new SolidBrush(Color.Red); + public static readonly Brush WhiteBrush = new SolidBrush(Color.White); + public static readonly Brush YellowBrush = new SolidBrush(Color.Yellow); + + public static readonly Brush TransparentLightBlack = new SolidBrush(Color.FromArgb(200, 30, 30, 30)); + + public static readonly Brush TransparentLightGray = new SolidBrush(Color.FromArgb(200, 60, 60, 60)); + public static readonly Brush TransparentLighterGray = new SolidBrush(Color.FromArgb(40, Color.LightGray)); + + public static readonly Pen DividerLinePen = new Pen(Color.FromArgb(255, 40, 40, 40), 2); + } +} diff --git a/plugins/NoOverlay/packages.config b/plugins/NoOverlay/packages.config new file mode 100644 index 0000000..d5f6d3a --- /dev/null +++ b/plugins/NoOverlay/packages.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/plugins/NoOverlay/tools/package.cmd b/plugins/NoOverlay/tools/package.cmd new file mode 100644 index 0000000..bd194d1 --- /dev/null +++ b/plugins/NoOverlay/tools/package.cmd @@ -0,0 +1,17 @@ +@echo off +echo 'Building package' %APPVEYOR_BUILD_VERSION% + +msbuild NoOverlay.csproj -p:SolutionDir=%cd%\ ^ + -p:Configuration=Release ^ + -t:rebuild ^ + -p:ApplicationVersion=%APPVEYOR_BUILD_VERSION% ^ + -v:minimal + +cd bin\Release + +7z a release.zip NoOverlay.* iRacingDirector.Plugin.Support.* + +appveyor PushArtifact release.zip -FileName "release.zip" -DeploymentName deploy-release + +cd ..\.. + \ No newline at end of file From 99cf4f400f4d178eae90a2753c5a0ef114e0d7c1 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Fri, 5 Jun 2020 11:50:03 +0200 Subject: [PATCH 58/90] Optimize analysis-phase @FF16x --- Phases/AnalyseRace.cs | 51 +++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index c60c0c8..9dc62ba 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -46,6 +46,9 @@ enum replaySpeeds : int pause = 0, normal = 1, FF2x = 2, + FF4x = 4, + FF8x = 8, + FF12x = 12, FF16x = 16 }; @@ -109,24 +112,18 @@ void AnalyseIncidents() //Analyse race situations at maximum replay speed w/o recording. void AnalyseRaceSituations(IEnumerable samples) { - replaySpeeds curReplaySpeed = replaySpeeds.normal; - + int iReplaySpeedForAnalysis = (int)replaySpeeds.FF16x; //set speed for analysis phase to FF16x + //Start iRacing Replay from the beginning with maximum speed (16x) iRacing.Replay.MoveToFrame(raceStartFrameNumber); - - - //if (shortTestOnly) - //{ - // samples = samples.AtSpeed(Settings.Default.TimingFactorForShortTest); - // Settings.AppliedTimingFactor = 1.0 / Settings.Default.TimingFactorForShortTest; - //} - - - //copied from iRacing.Capturing because race events in app V1.0.x.x are identified during capturing the whole video. + //---------------------------- + // copied from iRacing.Capturing because race events in app V1.0.x.x are identified during capturing the whole video. + // necessity of classes in analysis phase to be reviewed + //---------------------------- //var overlayData = new OverlayData(); removalEdits = new RemovalEdits(overlayData.RaceEvents); - commentaryMessages = new CommentaryMessages(overlayData); + commentaryMessages = new CommentaryMessages(overlayData); recordPitStop = new RecordPitStop(commentaryMessages); fastestLaps = new RecordFastestLaps(overlayData); replayControl = new ReplayControl(samples.First().SessionData, incidents, removalEdits, TrackCameras); @@ -139,6 +136,9 @@ void AnalyseRaceSituations(IEnumerable samples) captureCamDriverEvery4Seconds = new SampleFilter(TimeSpan.FromSeconds(4), new LogCamDriver().Process); + //---------------------------- + //end copy / end review + //---------------------------- ApplyFirstLapCameraDirection(samples, replayControl); @@ -151,26 +151,19 @@ void AnalyseRaceSituations(IEnumerable samples) .WithPitStopCounts() .TakeUntil(3.Seconds()).Of(d => d.Telemetry.LeaderHasFinished && d.Telemetry.RaceCars.All(c => c.HasSeenCheckeredFlag || c.HasRetired || c.TrackSurface != TrackLocation.OnTrack)) .TakeUntil(3.Seconds()).AfterReplayPaused(); + + samples = samples.AtSpeed(iReplaySpeedForAnalysis); + Settings.AppliedTimingFactor = 1.0 / iReplaySpeedForAnalysis; + overlayData.CapturedVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); - //set speed for analysis phase (target speed is FF16x) - samples = samples.AtSpeed(Settings.Default.TimingFactorForShortTest); - Settings.AppliedTimingFactor = 1.0 / Settings.Default.TimingFactorForShortTest; - - //iRacing.Replay.SetSpeed((int)curReplaySpeed); - + ulong numberOfDataProcessed = 0; var startTime = DateTime.Now; - overlayData.CapturedVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); - foreach (var data in samples) { - var relativeTime = (DateTime.Now - startTime).Multiply(Settings.Default.TimingFactorForShortTest); - var prevRelativeTime = DateTime.Now - startTime; - - TraceDebug.WriteLine("Processing Data Sample at relative time: {0} | {1}".F(relativeTime, prevRelativeTime)); - - + var relativeTime = (DateTime.Now - startTime).Multiply(iReplaySpeedForAnalysis); //calculate relative time in Replay taking into account replay speed (FF) + replayControl.Process(data); sessionDataCapture.Process(data); captureLeaderBoardEveryHalfSecond.Process(data, relativeTime); @@ -179,11 +172,13 @@ void AnalyseRaceSituations(IEnumerable samples) fastestLaps.Process(data, relativeTime); removalEdits.Process(data, relativeTime); captureCamDriverEvery4Seconds.Process(data, relativeTime); + + numberOfDataProcessed += 1; } removalEdits.Stop(); - TraceDebug.WriteLine("Race analysis phase completed"); + TraceDebug.WriteLine("Race analysis phase completed. {0} data samples processed with replay speed {1}".F(numberOfDataProcessed, iReplaySpeedForAnalysis)); //save OverlayData into target folder for video ("working folder") SaveReplayScript(overlayData); From d80da29faafe4d98a15eedb1193819d986cd937d Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Fri, 5 Jun 2020 11:51:30 +0200 Subject: [PATCH 59/90] Use enumeration type to set replay-speed --- Phases/CaptureRace.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Phases/CaptureRace.cs b/Phases/CaptureRace.cs index 88ef9de..61e865f 100644 --- a/Phases/CaptureRace.cs +++ b/Phases/CaptureRace.cs @@ -64,8 +64,8 @@ internal void _CaptureRaceTest(Action onComplete, IEnumerable onComplete, IEnumerable Date: Fri, 5 Jun 2020 19:26:00 +0200 Subject: [PATCH 60/90] Verify status of recording software before sending keystroke commands to start/stop recording --- Phases/Direction/VideoCapture.cs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Phases/Direction/VideoCapture.cs b/Phases/Direction/VideoCapture.cs index 097bbd8..da7d0b4 100644 --- a/Phases/Direction/VideoCapture.cs +++ b/Phases/Direction/VideoCapture.cs @@ -29,7 +29,7 @@ namespace iRacingReplayOverlay.Phases.Direction { enum videoStatus { stopped, running, paused }; - public class VideoCapture + public class VideoCapture { string workingFolder; DateTime started; @@ -46,9 +46,12 @@ public void Activate(string workingFolder) timer.Elapsed += CaptureNewFileNames; ; timer.AutoReset = false; timer.Enabled = true; - curVideoStatus = videoStatus.running; - - SendKeyStroke_StartStopp(); //Send hot-key to start recording + + if (curVideoStatus != videoStatus.running) + { + SendKeyStroke_StartStopp(); //Send hot-key to start recording + curVideoStatus = videoStatus.running; + } } private void CaptureNewFileNames(object sender, ElapsedEventArgs e) @@ -88,10 +91,15 @@ public List Deactivate() timer = null; t.Stop(); t.Dispose(); - curVideoStatus = videoStatus.stopped; + } - SendKeyStroke_StartStopp(); + if( curVideoStatus != videoStatus.stopped) + { + SendKeyStroke_StartStopp(); + curVideoStatus = videoStatus.stopped; + } + System.Threading.Thread.Sleep(2000); From 15f4b14022bd9413f452f59002f6434631b64ac9 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Fri, 5 Jun 2020 21:51:12 +0200 Subject: [PATCH 61/90] Allow activation of video-capture w/o starting the recording at the same time. --- Phases/CaptureRace.cs | 17 ++++++++++++----- Phases/Direction/VideoCapture.cs | 4 ++-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Phases/CaptureRace.cs b/Phases/CaptureRace.cs index 48315d5..72ca0a5 100644 --- a/Phases/CaptureRace.cs +++ b/Phases/CaptureRace.cs @@ -63,9 +63,11 @@ internal void _CaptureRaceTest(Action onComplete, IEnumerable onComplete, IEnumerable captureFileNames = new List(); videoStatus curVideoStatus = videoStatus.stopped; - public void Activate(string workingFolder) + public void Activate(string workingFolder, bool bStartRecording = true) { this.workingFolder = workingFolder; this.started = DateTime.Now; @@ -47,7 +47,7 @@ public void Activate(string workingFolder) timer.AutoReset = false; timer.Enabled = true; - if (curVideoStatus != videoStatus.running) + if (bStartRecording & (curVideoStatus != videoStatus.running)) { SendKeyStroke_StartStopp(); //Send hot-key to start recording curVideoStatus = videoStatus.running; From 39ae01c56b3e706226627dc4c6cf1111534a1568 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Fri, 5 Jun 2020 23:15:49 +0200 Subject: [PATCH 62/90] Optimize video-status control - Bugfix wrong usage of logical operators --- Phases/Direction/VideoCapture.cs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Phases/Direction/VideoCapture.cs b/Phases/Direction/VideoCapture.cs index c56af67..def1182 100644 --- a/Phases/Direction/VideoCapture.cs +++ b/Phases/Direction/VideoCapture.cs @@ -36,6 +36,12 @@ public class VideoCapture Timer timer; List captureFileNames = new List(); videoStatus curVideoStatus = videoStatus.stopped; + + ~VideoCapture() + { + if(curVideoStatus != videoStatus.stopped) + SendKeyStroke_StartStopp(); + } public void Activate(string workingFolder, bool bStartRecording = true) { @@ -43,11 +49,11 @@ public void Activate(string workingFolder, bool bStartRecording = true) this.started = DateTime.Now; timer = new Timer(500); - timer.Elapsed += CaptureNewFileNames; ; + timer.Elapsed += CaptureNewFileNames; timer.AutoReset = false; timer.Enabled = true; - if (bStartRecording & (curVideoStatus != videoStatus.running)) + if (bStartRecording && (curVideoStatus != videoStatus.running)) { SendKeyStroke_StartStopp(); //Send hot-key to start recording curVideoStatus = videoStatus.running; @@ -130,6 +136,16 @@ public void Resume() } } + public void Stop() + { + if(curVideoStatus == videoStatus.running || curVideoStatus == videoStatus.paused) + { + SendKeyStroke_StartStopp(); + curVideoStatus = videoStatus.stopped; + } + } + + private static void SendKeyStroke_StartStopp() { TraceInfo.WriteLine("Sending key event to start/stopp recording ALT+F9"); From cde6db0a92fd72f3d10a0a7163ef8384de18e022 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sat, 6 Jun 2020 11:53:49 +0200 Subject: [PATCH 63/90] First implemenation of Video capturing of race-events with Pause/Resume. No Camera control implemented yet. --- ClassDiagram3.cd | 2 ++ Phases/CaptureOpeningScenes.cs | 12 +++++++++--- Phases/CaptureRace.cs | 27 +++++++++++++++------------ Phases/Direction/VideoCapture.cs | 13 +++++++++---- iRacingReplayDirector.csproj | 1 + 5 files changed, 36 insertions(+), 19 deletions(-) create mode 100644 ClassDiagram3.cd diff --git a/ClassDiagram3.cd b/ClassDiagram3.cd new file mode 100644 index 0000000..7b89419 --- /dev/null +++ b/ClassDiagram3.cd @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/Phases/CaptureOpeningScenes.cs b/Phases/CaptureOpeningScenes.cs index 2abd1ae..6aa79f9 100644 --- a/Phases/CaptureOpeningScenes.cs +++ b/Phases/CaptureOpeningScenes.cs @@ -28,8 +28,14 @@ namespace iRacingReplayOverlay.Phases { public partial class IRacingReplay { + static private VideoCapture raceVideo = new VideoCapture(); + void _CaptureOpeningScenes(Action onComplete) { + if (bRecordUsingPauseResume) + { + + } var data = iRacing.GetDataFeed().First(); var session = data.SessionData.SessionInfo.Sessions.Qualifying(); if (session == null || session.ResultsPositions == null) @@ -57,13 +63,13 @@ void _CaptureOpeningScenes(Action onComplete) var aCar = data.SessionData.DriverInfo.CompetingDrivers[1].CarNumberRaw; iRacing.Replay.CameraOnDriver((short)aCar, (short)scenicCameras); - var videoCapture = new VideoCapture(); + //var videoCapture = new VideoCapture(); - videoCapture.Activate(workingFolder); + raceVideo.Activate(workingFolder); Thread.Sleep(shortTestOnly ? 5000 : 20000); - var fileNames = videoCapture.Deactivate(); + var fileNames = raceVideo.Deactivate(bRecordUsingPauseResume); if( fileNames.Count == 0) return; diff --git a/Phases/CaptureRace.cs b/Phases/CaptureRace.cs index 72ca0a5..aca5299 100644 --- a/Phases/CaptureRace.cs +++ b/Phases/CaptureRace.cs @@ -40,6 +40,7 @@ public partial class IRacingReplay string workingFolder; string introVideo; + void _WithWorkingFolder(string workingFolder) { this.workingFolder = workingFolder; @@ -70,30 +71,32 @@ internal void _CaptureRaceTest(Action onComplete, IEnumerable Deactivate() + public List Deactivate(bool bRecordUsingPauseResume=false) { if (timer != null) { @@ -100,12 +102,15 @@ public List Deactivate() } - if( curVideoStatus != videoStatus.stopped) + if (bRecordUsingPauseResume && curVideoStatus != videoStatus.paused) + { + Pause(); + curVideoStatus = videoStatus.paused; + } else { SendKeyStroke_StartStopp(); curVideoStatus = videoStatus.stopped; } - System.Threading.Thread.Sleep(2000); diff --git a/iRacingReplayDirector.csproj b/iRacingReplayDirector.csproj index 187ce8f..71fe8a6 100644 --- a/iRacingReplayDirector.csproj +++ b/iRacingReplayDirector.csproj @@ -251,6 +251,7 @@ + From 8893c6a67441c6f73f8132f98671b5e6ba25f539 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sat, 6 Jun 2020 14:08:45 +0200 Subject: [PATCH 64/90] commit changes to project file --- ClassDiagram3.cd | 2 ++ .../iRacingDirector.Plugin.Tester.csproj | 10 ++++------ ...RacingDirector.Plugin.Tester.nugetreferenceswitcher | 1 + plugins/iRacingDirector.Plugin.Tester/packages.config | 1 + 4 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 ClassDiagram3.cd create mode 100644 plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.nugetreferenceswitcher diff --git a/ClassDiagram3.cd b/ClassDiagram3.cd new file mode 100644 index 0000000..7b89419 --- /dev/null +++ b/ClassDiagram3.cd @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj index 8fc01af..17333a9 100644 --- a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj +++ b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj @@ -45,17 +45,15 @@ .\..\..\packages\ - - - {5422ae20-f220-4be1-9e61-5296981abb5c} - iRacingSDK - - {0e523573-2972-4dc0-aecb-c4cf746854bb} iRacingReplayOverlay + + {5422AE20-F220-4BE1-9E61-5296981ABB5C} + iRacingSDK + diff --git a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.nugetreferenceswitcher b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.nugetreferenceswitcher new file mode 100644 index 0000000..d4a4044 --- /dev/null +++ b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.nugetreferenceswitcher @@ -0,0 +1 @@ +iRacingSDK ../../iRacingSDK.Net/iRacingSDK.csproj ../../packages/iRacingSDK.1.0.0.42/lib/net40-client/iRacingSDK.dll diff --git a/plugins/iRacingDirector.Plugin.Tester/packages.config b/plugins/iRacingDirector.Plugin.Tester/packages.config index f6dd63f..91375be 100644 --- a/plugins/iRacingDirector.Plugin.Tester/packages.config +++ b/plugins/iRacingDirector.Plugin.Tester/packages.config @@ -1,4 +1,5 @@  + \ No newline at end of file From c4d87d547e2447fd248bd2d9800a23be825ed180 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sat, 6 Jun 2020 14:11:37 +0200 Subject: [PATCH 65/90] Upgrade to iRacingSDK Nuget to V1.0.0.42 --- iRacingReplayDirector.nugetreferenceswitcher | 1 + .../iRacingReplayOverlay.net.Tests.csproj | 5 ++++- .../iRacingReplayOverlay.net.Tests.nugetreferenceswitcher | 1 + iRacingReplayOverlay.net.Tests/packages.config | 2 +- packages.config | 2 +- 5 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 iRacingReplayDirector.nugetreferenceswitcher create mode 100644 iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.nugetreferenceswitcher diff --git a/iRacingReplayDirector.nugetreferenceswitcher b/iRacingReplayDirector.nugetreferenceswitcher new file mode 100644 index 0000000..4818f43 --- /dev/null +++ b/iRacingReplayDirector.nugetreferenceswitcher @@ -0,0 +1 @@ +iRacingSDK iRacingSDK.Net/iRacingSDK.csproj packages/iRacingSDK.1.0.0.42/lib/net40-client/iRacingSDK.dll diff --git a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj index 7617ba1..33c76bb 100644 --- a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj +++ b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj @@ -35,7 +35,6 @@ DEBUG;TRACE - ..\packages\Moq.4.2.1409.1722\lib\net40\Moq.dll @@ -72,6 +71,10 @@ {0E523573-2972-4DC0-AECB-C4CF746854BB} iRacingReplayOverlay.net + + {5422AE20-F220-4BE1-9E61-5296981ABB5C} + iRacingSDK + diff --git a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.nugetreferenceswitcher b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.nugetreferenceswitcher new file mode 100644 index 0000000..cc59777 --- /dev/null +++ b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.nugetreferenceswitcher @@ -0,0 +1 @@ +iRacingSDK ../iRacingSDK.Net/iRacingSDK.csproj ../packages/iRacingSDK.1.0.0.42/lib/net40-client/iRacingSDK.dll diff --git a/iRacingReplayOverlay.net.Tests/packages.config b/iRacingReplayOverlay.net.Tests/packages.config index f1e6c79..fd83368 100644 --- a/iRacingReplayOverlay.net.Tests/packages.config +++ b/iRacingReplayOverlay.net.Tests/packages.config @@ -1,6 +1,6 @@  - + diff --git a/packages.config b/packages.config index 9b254f5..cb1c056 100644 --- a/packages.config +++ b/packages.config @@ -4,7 +4,7 @@ - + From e10d366677d9ed3132d183451301ea9d0a4eda3a Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sat, 6 Jun 2020 18:48:47 +0200 Subject: [PATCH 66/90] Keep AppliedTimingFactor unchanged in Analysis phase to avoid wrong adapation of total highlight-time. --- Phases/AnalyseRace.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index 9dc62ba..27a8813 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -153,7 +153,7 @@ void AnalyseRaceSituations(IEnumerable samples) .TakeUntil(3.Seconds()).AfterReplayPaused(); samples = samples.AtSpeed(iReplaySpeedForAnalysis); - Settings.AppliedTimingFactor = 1.0 / iReplaySpeedForAnalysis; + //Settings.AppliedTimingFactor = 1.0 / iReplaySpeedForAnalysis; overlayData.CapturedVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); From 65a7201b15671607a89d4e2a43e7a5e7969db97c Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sat, 6 Jun 2020 18:54:53 +0200 Subject: [PATCH 67/90] Remove commented code no longer needed --- Phases/AnalyseRace.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index 27a8813..9116ae7 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -153,7 +153,6 @@ void AnalyseRaceSituations(IEnumerable samples) .TakeUntil(3.Seconds()).AfterReplayPaused(); samples = samples.AtSpeed(iReplaySpeedForAnalysis); - //Settings.AppliedTimingFactor = 1.0 / iReplaySpeedForAnalysis; overlayData.CapturedVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); From cde5c48e5a9f2e8f53df5fee6d113ec23735fbba Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sat, 6 Jun 2020 19:35:46 +0200 Subject: [PATCH 68/90] Add remarks / Anotations where to add code to start CameraControl Thread --- Phases/AnalyseRace.cs | 2 ++ Phases/CaptureRace.cs | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index 9116ae7..5a7eb0d 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -128,6 +128,8 @@ void AnalyseRaceSituations(IEnumerable samples) fastestLaps = new RecordFastestLaps(overlayData); replayControl = new ReplayControl(samples.First().SessionData, incidents, removalEdits, TrackCameras); sessionDataCapture = new SessionDataCapture(overlayData); + + //CAPTURING LEADERBOARD, CAMERAS will be done at FF16x. TO BE DETERMINED WHETHER STANDARD INTERVALS HAVE TO BE REDUCED BY FACTOR OF 16?! captureLeaderBoardEveryHalfSecond = new SampleFilter(TimeSpan.FromSeconds(0.5), new CaptureLeaderBoard(overlayData, commentaryMessages, removalEdits).Process); captureCamDriverEveryQuaterSecond = new SampleFilter(TimeSpan.FromSeconds(0.25), diff --git a/Phases/CaptureRace.cs b/Phases/CaptureRace.cs index aca5299..79720e5 100644 --- a/Phases/CaptureRace.cs +++ b/Phases/CaptureRace.cs @@ -83,15 +83,17 @@ internal void _CaptureRaceTest(Action onComplete, IEnumerable Date: Sat, 6 Jun 2020 19:46:27 +0200 Subject: [PATCH 69/90] Do not set "AppliedTimingFactor" during Fast-Forward-Race Analysis --- Phases/AnalyseRace.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index 9dc62ba..9116ae7 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -153,7 +153,6 @@ void AnalyseRaceSituations(IEnumerable samples) .TakeUntil(3.Seconds()).AfterReplayPaused(); samples = samples.AtSpeed(iReplaySpeedForAnalysis); - Settings.AppliedTimingFactor = 1.0 / iReplaySpeedForAnalysis; overlayData.CapturedVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); From 31eadbd5771d3cd23a81970c519bbf43133fd240 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sun, 7 Jun 2020 15:19:44 +0200 Subject: [PATCH 70/90] Update iRacingSDK.NET submodule to V1.0.0.42 --- iRacingSDK.Net | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iRacingSDK.Net b/iRacingSDK.Net index 60fecf3..925bdf7 160000 --- a/iRacingSDK.Net +++ b/iRacingSDK.Net @@ -1 +1 @@ -Subproject commit 60fecf3ba43d9f596224fd5cfe732ec4280932ce +Subproject commit 925bdf751a27a6c9a7049bf231783c9010a5d0d4 From 8f2c76ac4506a428c732b4ca492db9c71d700054 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sun, 7 Jun 2020 15:30:53 +0200 Subject: [PATCH 71/90] Revert "Update iRacingSDK.NET submodule to V1.0.0.42" This reverts commit 31eadbd5771d3cd23a81970c519bbf43133fd240. --- iRacingSDK.Net | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iRacingSDK.Net b/iRacingSDK.Net index 925bdf7..60fecf3 160000 --- a/iRacingSDK.Net +++ b/iRacingSDK.Net @@ -1 +1 @@ -Subproject commit 925bdf751a27a6c9a7049bf231783c9010a5d0d4 +Subproject commit 60fecf3ba43d9f596224fd5cfe732ec4280932ce From 545470646934055becc9260ce21bd6dece8c281f Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sun, 7 Jun 2020 15:39:18 +0200 Subject: [PATCH 72/90] Revert "Revert "Update iRacingSDK.NET submodule to V1.0.0.42"" This reverts commit 8f2c76ac4506a428c732b4ca492db9c71d700054. --- iRacingSDK.Net | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iRacingSDK.Net b/iRacingSDK.Net index 60fecf3..925bdf7 160000 --- a/iRacingSDK.Net +++ b/iRacingSDK.Net @@ -1 +1 @@ -Subproject commit 60fecf3ba43d9f596224fd5cfe732ec4280932ce +Subproject commit 925bdf751a27a6c9a7049bf231783c9010a5d0d4 From 94d33b96024fe7df559c4cd753088bbdd76354b7 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sun, 7 Jun 2020 15:49:56 +0200 Subject: [PATCH 73/90] roll back to working solution file --- ClassDiagram3.cd | 2 - Phases/AnalyseRace.cs | 3 +- Phases/CaptureOpeningScenes.cs | 12 ++--- Phases/CaptureRace.cs | 34 +++++--------- Phases/Direction/VideoCapture.cs | 47 ++++--------------- iRacingReplayDirector.csproj | 1 - iRacingReplayDirector.nugetreferenceswitcher | 1 - .../iRacingReplayOverlay.net.Tests.csproj | 5 +- ...ayOverlay.net.Tests.nugetreferenceswitcher | 1 - .../packages.config | 2 +- packages.config | 2 +- .../iRacingDirector.Plugin.Tester.csproj | 10 ++-- ...ector.Plugin.Tester.nugetreferenceswitcher | 1 - .../packages.config | 1 - 14 files changed, 33 insertions(+), 89 deletions(-) delete mode 100644 ClassDiagram3.cd delete mode 100644 iRacingReplayDirector.nugetreferenceswitcher delete mode 100644 iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.nugetreferenceswitcher delete mode 100644 plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.nugetreferenceswitcher diff --git a/ClassDiagram3.cd b/ClassDiagram3.cd deleted file mode 100644 index 7b89419..0000000 --- a/ClassDiagram3.cd +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index 5a7eb0d..9dc62ba 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -128,8 +128,6 @@ void AnalyseRaceSituations(IEnumerable samples) fastestLaps = new RecordFastestLaps(overlayData); replayControl = new ReplayControl(samples.First().SessionData, incidents, removalEdits, TrackCameras); sessionDataCapture = new SessionDataCapture(overlayData); - - //CAPTURING LEADERBOARD, CAMERAS will be done at FF16x. TO BE DETERMINED WHETHER STANDARD INTERVALS HAVE TO BE REDUCED BY FACTOR OF 16?! captureLeaderBoardEveryHalfSecond = new SampleFilter(TimeSpan.FromSeconds(0.5), new CaptureLeaderBoard(overlayData, commentaryMessages, removalEdits).Process); captureCamDriverEveryQuaterSecond = new SampleFilter(TimeSpan.FromSeconds(0.25), @@ -155,6 +153,7 @@ void AnalyseRaceSituations(IEnumerable samples) .TakeUntil(3.Seconds()).AfterReplayPaused(); samples = samples.AtSpeed(iReplaySpeedForAnalysis); + Settings.AppliedTimingFactor = 1.0 / iReplaySpeedForAnalysis; overlayData.CapturedVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); diff --git a/Phases/CaptureOpeningScenes.cs b/Phases/CaptureOpeningScenes.cs index 6aa79f9..2abd1ae 100644 --- a/Phases/CaptureOpeningScenes.cs +++ b/Phases/CaptureOpeningScenes.cs @@ -28,14 +28,8 @@ namespace iRacingReplayOverlay.Phases { public partial class IRacingReplay { - static private VideoCapture raceVideo = new VideoCapture(); - void _CaptureOpeningScenes(Action onComplete) { - if (bRecordUsingPauseResume) - { - - } var data = iRacing.GetDataFeed().First(); var session = data.SessionData.SessionInfo.Sessions.Qualifying(); if (session == null || session.ResultsPositions == null) @@ -63,13 +57,13 @@ void _CaptureOpeningScenes(Action onComplete) var aCar = data.SessionData.DriverInfo.CompetingDrivers[1].CarNumberRaw; iRacing.Replay.CameraOnDriver((short)aCar, (short)scenicCameras); - //var videoCapture = new VideoCapture(); + var videoCapture = new VideoCapture(); - raceVideo.Activate(workingFolder); + videoCapture.Activate(workingFolder); Thread.Sleep(shortTestOnly ? 5000 : 20000); - var fileNames = raceVideo.Deactivate(bRecordUsingPauseResume); + var fileNames = videoCapture.Deactivate(); if( fileNames.Count == 0) return; diff --git a/Phases/CaptureRace.cs b/Phases/CaptureRace.cs index 79720e5..48315d5 100644 --- a/Phases/CaptureRace.cs +++ b/Phases/CaptureRace.cs @@ -40,7 +40,6 @@ public partial class IRacingReplay string workingFolder; string introVideo; - void _WithWorkingFolder(string workingFolder) { this.workingFolder = workingFolder; @@ -64,41 +63,30 @@ internal void _CaptureRaceTest(Action onComplete, IEnumerable captureFileNames = new List(); videoStatus curVideoStatus = videoStatus.stopped; - - ~VideoCapture() - { - if(curVideoStatus != videoStatus.stopped) - SendKeyStroke_StartStopp(); - } - public void Activate(string workingFolder, bool bStartRecording = true) + public void Activate(string workingFolder) { this.workingFolder = workingFolder; this.started = DateTime.Now; timer = new Timer(500); - timer.Elapsed += CaptureNewFileNames; + timer.Elapsed += CaptureNewFileNames; ; timer.AutoReset = false; timer.Enabled = true; - - if (bStartRecording && (curVideoStatus == videoStatus.stopped)) - { - SendKeyStroke_StartStopp(); //Send hot-key to start recording - curVideoStatus = videoStatus.running; - }else if( curVideoStatus == videoStatus.paused){ - Resume(); - } + curVideoStatus = videoStatus.running; + + SendKeyStroke_StartStopp(); //Send hot-key to start recording } private void CaptureNewFileNames(object sender, ElapsedEventArgs e) @@ -91,7 +80,7 @@ private void CaptureNewFileNames(object sender, ElapsedEventArgs e) } } - public List Deactivate(bool bRecordUsingPauseResume=false) + public List Deactivate() { if (timer != null) { @@ -99,19 +88,11 @@ public List Deactivate(bool bRecordUsingPauseResume=false) timer = null; t.Stop(); t.Dispose(); - - } - - if (bRecordUsingPauseResume && curVideoStatus != videoStatus.paused) - { - Pause(); - curVideoStatus = videoStatus.paused; - } else - { - SendKeyStroke_StartStopp(); curVideoStatus = videoStatus.stopped; } + SendKeyStroke_StartStopp(); + System.Threading.Thread.Sleep(2000); CaptureNewFileNames(null, null); @@ -141,16 +122,6 @@ public void Resume() } } - public void Stop() - { - if(curVideoStatus == videoStatus.running || curVideoStatus == videoStatus.paused) - { - SendKeyStroke_StartStopp(); - curVideoStatus = videoStatus.stopped; - } - } - - private static void SendKeyStroke_StartStopp() { TraceInfo.WriteLine("Sending key event to start/stopp recording ALT+F9"); diff --git a/iRacingReplayDirector.csproj b/iRacingReplayDirector.csproj index 71fe8a6..187ce8f 100644 --- a/iRacingReplayDirector.csproj +++ b/iRacingReplayDirector.csproj @@ -251,7 +251,6 @@ - diff --git a/iRacingReplayDirector.nugetreferenceswitcher b/iRacingReplayDirector.nugetreferenceswitcher deleted file mode 100644 index 4818f43..0000000 --- a/iRacingReplayDirector.nugetreferenceswitcher +++ /dev/null @@ -1 +0,0 @@ -iRacingSDK iRacingSDK.Net/iRacingSDK.csproj packages/iRacingSDK.1.0.0.42/lib/net40-client/iRacingSDK.dll diff --git a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj index 33c76bb..7617ba1 100644 --- a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj +++ b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj @@ -35,6 +35,7 @@ DEBUG;TRACE + ..\packages\Moq.4.2.1409.1722\lib\net40\Moq.dll @@ -71,10 +72,6 @@ {0E523573-2972-4DC0-AECB-C4CF746854BB} iRacingReplayOverlay.net - - {5422AE20-F220-4BE1-9E61-5296981ABB5C} - iRacingSDK - diff --git a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.nugetreferenceswitcher b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.nugetreferenceswitcher deleted file mode 100644 index cc59777..0000000 --- a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.nugetreferenceswitcher +++ /dev/null @@ -1 +0,0 @@ -iRacingSDK ../iRacingSDK.Net/iRacingSDK.csproj ../packages/iRacingSDK.1.0.0.42/lib/net40-client/iRacingSDK.dll diff --git a/iRacingReplayOverlay.net.Tests/packages.config b/iRacingReplayOverlay.net.Tests/packages.config index fd83368..f1e6c79 100644 --- a/iRacingReplayOverlay.net.Tests/packages.config +++ b/iRacingReplayOverlay.net.Tests/packages.config @@ -1,6 +1,6 @@  - + diff --git a/packages.config b/packages.config index cb1c056..9b254f5 100644 --- a/packages.config +++ b/packages.config @@ -4,7 +4,7 @@ - + diff --git a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj index 17333a9..8fc01af 100644 --- a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj +++ b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj @@ -45,15 +45,17 @@ .\..\..\packages\ + + + {5422ae20-f220-4be1-9e61-5296981abb5c} + iRacingSDK + + {0e523573-2972-4dc0-aecb-c4cf746854bb} iRacingReplayOverlay - - {5422AE20-F220-4BE1-9E61-5296981ABB5C} - iRacingSDK - diff --git a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.nugetreferenceswitcher b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.nugetreferenceswitcher deleted file mode 100644 index d4a4044..0000000 --- a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.nugetreferenceswitcher +++ /dev/null @@ -1 +0,0 @@ -iRacingSDK ../../iRacingSDK.Net/iRacingSDK.csproj ../../packages/iRacingSDK.1.0.0.42/lib/net40-client/iRacingSDK.dll diff --git a/plugins/iRacingDirector.Plugin.Tester/packages.config b/plugins/iRacingDirector.Plugin.Tester/packages.config index 91375be..f6dd63f 100644 --- a/plugins/iRacingDirector.Plugin.Tester/packages.config +++ b/plugins/iRacingDirector.Plugin.Tester/packages.config @@ -1,5 +1,4 @@  - \ No newline at end of file From 4ed64b0eab7f0c59118e9b4cd3b65a5de5c89d51 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sun, 7 Jun 2020 15:53:37 +0200 Subject: [PATCH 74/90] add nuget-reference switcher to iRacingDirector.Plugin.Tester --- .../iRacingDirector.Plugin.Tester.csproj | 10 ++++------ ...RacingDirector.Plugin.Tester.nugetreferenceswitcher | 1 + plugins/iRacingDirector.Plugin.Tester/packages.config | 1 + 3 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.nugetreferenceswitcher diff --git a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj index 8fc01af..17333a9 100644 --- a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj +++ b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj @@ -45,17 +45,15 @@ .\..\..\packages\ - - - {5422ae20-f220-4be1-9e61-5296981abb5c} - iRacingSDK - - {0e523573-2972-4dc0-aecb-c4cf746854bb} iRacingReplayOverlay + + {5422AE20-F220-4BE1-9E61-5296981ABB5C} + iRacingSDK + diff --git a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.nugetreferenceswitcher b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.nugetreferenceswitcher new file mode 100644 index 0000000..d4a4044 --- /dev/null +++ b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.nugetreferenceswitcher @@ -0,0 +1 @@ +iRacingSDK ../../iRacingSDK.Net/iRacingSDK.csproj ../../packages/iRacingSDK.1.0.0.42/lib/net40-client/iRacingSDK.dll diff --git a/plugins/iRacingDirector.Plugin.Tester/packages.config b/plugins/iRacingDirector.Plugin.Tester/packages.config index f6dd63f..91375be 100644 --- a/plugins/iRacingDirector.Plugin.Tester/packages.config +++ b/plugins/iRacingDirector.Plugin.Tester/packages.config @@ -1,4 +1,5 @@  + \ No newline at end of file From 7432ae1a7dd8953a5cfacb323d876f0da2055641 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sun, 7 Jun 2020 15:59:16 +0200 Subject: [PATCH 75/90] Revert "roll back to working solution file" This reverts commit 94d33b96024fe7df559c4cd753088bbdd76354b7. --- ClassDiagram3.cd | 2 + Phases/AnalyseRace.cs | 3 +- Phases/CaptureOpeningScenes.cs | 12 +++-- Phases/CaptureRace.cs | 34 +++++++++----- Phases/Direction/VideoCapture.cs | 47 +++++++++++++++---- iRacingReplayDirector.csproj | 1 + iRacingReplayDirector.nugetreferenceswitcher | 1 + .../iRacingReplayOverlay.net.Tests.csproj | 5 +- ...ayOverlay.net.Tests.nugetreferenceswitcher | 1 + .../packages.config | 2 +- packages.config | 2 +- 11 files changed, 83 insertions(+), 27 deletions(-) create mode 100644 ClassDiagram3.cd create mode 100644 iRacingReplayDirector.nugetreferenceswitcher create mode 100644 iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.nugetreferenceswitcher diff --git a/ClassDiagram3.cd b/ClassDiagram3.cd new file mode 100644 index 0000000..7b89419 --- /dev/null +++ b/ClassDiagram3.cd @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/Phases/AnalyseRace.cs b/Phases/AnalyseRace.cs index 9dc62ba..5a7eb0d 100644 --- a/Phases/AnalyseRace.cs +++ b/Phases/AnalyseRace.cs @@ -128,6 +128,8 @@ void AnalyseRaceSituations(IEnumerable samples) fastestLaps = new RecordFastestLaps(overlayData); replayControl = new ReplayControl(samples.First().SessionData, incidents, removalEdits, TrackCameras); sessionDataCapture = new SessionDataCapture(overlayData); + + //CAPTURING LEADERBOARD, CAMERAS will be done at FF16x. TO BE DETERMINED WHETHER STANDARD INTERVALS HAVE TO BE REDUCED BY FACTOR OF 16?! captureLeaderBoardEveryHalfSecond = new SampleFilter(TimeSpan.FromSeconds(0.5), new CaptureLeaderBoard(overlayData, commentaryMessages, removalEdits).Process); captureCamDriverEveryQuaterSecond = new SampleFilter(TimeSpan.FromSeconds(0.25), @@ -153,7 +155,6 @@ void AnalyseRaceSituations(IEnumerable samples) .TakeUntil(3.Seconds()).AfterReplayPaused(); samples = samples.AtSpeed(iReplaySpeedForAnalysis); - Settings.AppliedTimingFactor = 1.0 / iReplaySpeedForAnalysis; overlayData.CapturedVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); diff --git a/Phases/CaptureOpeningScenes.cs b/Phases/CaptureOpeningScenes.cs index 2abd1ae..6aa79f9 100644 --- a/Phases/CaptureOpeningScenes.cs +++ b/Phases/CaptureOpeningScenes.cs @@ -28,8 +28,14 @@ namespace iRacingReplayOverlay.Phases { public partial class IRacingReplay { + static private VideoCapture raceVideo = new VideoCapture(); + void _CaptureOpeningScenes(Action onComplete) { + if (bRecordUsingPauseResume) + { + + } var data = iRacing.GetDataFeed().First(); var session = data.SessionData.SessionInfo.Sessions.Qualifying(); if (session == null || session.ResultsPositions == null) @@ -57,13 +63,13 @@ void _CaptureOpeningScenes(Action onComplete) var aCar = data.SessionData.DriverInfo.CompetingDrivers[1].CarNumberRaw; iRacing.Replay.CameraOnDriver((short)aCar, (short)scenicCameras); - var videoCapture = new VideoCapture(); + //var videoCapture = new VideoCapture(); - videoCapture.Activate(workingFolder); + raceVideo.Activate(workingFolder); Thread.Sleep(shortTestOnly ? 5000 : 20000); - var fileNames = videoCapture.Deactivate(); + var fileNames = raceVideo.Deactivate(bRecordUsingPauseResume); if( fileNames.Count == 0) return; diff --git a/Phases/CaptureRace.cs b/Phases/CaptureRace.cs index 48315d5..79720e5 100644 --- a/Phases/CaptureRace.cs +++ b/Phases/CaptureRace.cs @@ -40,6 +40,7 @@ public partial class IRacingReplay string workingFolder; string introVideo; + void _WithWorkingFolder(string workingFolder) { this.workingFolder = workingFolder; @@ -63,30 +64,41 @@ internal void _CaptureRaceTest(Action onComplete, IEnumerable captureFileNames = new List(); videoStatus curVideoStatus = videoStatus.stopped; + + ~VideoCapture() + { + if(curVideoStatus != videoStatus.stopped) + SendKeyStroke_StartStopp(); + } - public void Activate(string workingFolder) + public void Activate(string workingFolder, bool bStartRecording = true) { this.workingFolder = workingFolder; this.started = DateTime.Now; timer = new Timer(500); - timer.Elapsed += CaptureNewFileNames; ; + timer.Elapsed += CaptureNewFileNames; timer.AutoReset = false; timer.Enabled = true; - curVideoStatus = videoStatus.running; - - SendKeyStroke_StartStopp(); //Send hot-key to start recording + + if (bStartRecording && (curVideoStatus == videoStatus.stopped)) + { + SendKeyStroke_StartStopp(); //Send hot-key to start recording + curVideoStatus = videoStatus.running; + }else if( curVideoStatus == videoStatus.paused){ + Resume(); + } } private void CaptureNewFileNames(object sender, ElapsedEventArgs e) @@ -80,7 +91,7 @@ private void CaptureNewFileNames(object sender, ElapsedEventArgs e) } } - public List Deactivate() + public List Deactivate(bool bRecordUsingPauseResume=false) { if (timer != null) { @@ -88,10 +99,18 @@ public List Deactivate() timer = null; t.Stop(); t.Dispose(); - curVideoStatus = videoStatus.stopped; + } - SendKeyStroke_StartStopp(); + if (bRecordUsingPauseResume && curVideoStatus != videoStatus.paused) + { + Pause(); + curVideoStatus = videoStatus.paused; + } else + { + SendKeyStroke_StartStopp(); + curVideoStatus = videoStatus.stopped; + } System.Threading.Thread.Sleep(2000); @@ -122,6 +141,16 @@ public void Resume() } } + public void Stop() + { + if(curVideoStatus == videoStatus.running || curVideoStatus == videoStatus.paused) + { + SendKeyStroke_StartStopp(); + curVideoStatus = videoStatus.stopped; + } + } + + private static void SendKeyStroke_StartStopp() { TraceInfo.WriteLine("Sending key event to start/stopp recording ALT+F9"); diff --git a/iRacingReplayDirector.csproj b/iRacingReplayDirector.csproj index 187ce8f..71fe8a6 100644 --- a/iRacingReplayDirector.csproj +++ b/iRacingReplayDirector.csproj @@ -251,6 +251,7 @@ + diff --git a/iRacingReplayDirector.nugetreferenceswitcher b/iRacingReplayDirector.nugetreferenceswitcher new file mode 100644 index 0000000..4818f43 --- /dev/null +++ b/iRacingReplayDirector.nugetreferenceswitcher @@ -0,0 +1 @@ +iRacingSDK iRacingSDK.Net/iRacingSDK.csproj packages/iRacingSDK.1.0.0.42/lib/net40-client/iRacingSDK.dll diff --git a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj index 7617ba1..33c76bb 100644 --- a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj +++ b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj @@ -35,7 +35,6 @@ DEBUG;TRACE - ..\packages\Moq.4.2.1409.1722\lib\net40\Moq.dll @@ -72,6 +71,10 @@ {0E523573-2972-4DC0-AECB-C4CF746854BB} iRacingReplayOverlay.net + + {5422AE20-F220-4BE1-9E61-5296981ABB5C} + iRacingSDK + diff --git a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.nugetreferenceswitcher b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.nugetreferenceswitcher new file mode 100644 index 0000000..cc59777 --- /dev/null +++ b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.nugetreferenceswitcher @@ -0,0 +1 @@ +iRacingSDK ../iRacingSDK.Net/iRacingSDK.csproj ../packages/iRacingSDK.1.0.0.42/lib/net40-client/iRacingSDK.dll diff --git a/iRacingReplayOverlay.net.Tests/packages.config b/iRacingReplayOverlay.net.Tests/packages.config index f1e6c79..fd83368 100644 --- a/iRacingReplayOverlay.net.Tests/packages.config +++ b/iRacingReplayOverlay.net.Tests/packages.config @@ -1,6 +1,6 @@  - + diff --git a/packages.config b/packages.config index 9b254f5..cb1c056 100644 --- a/packages.config +++ b/packages.config @@ -4,7 +4,7 @@ - + From 9afd14e39211bad40ff011adc0cc89e8177afb05 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Sun, 7 Jun 2020 22:57:18 +0200 Subject: [PATCH 76/90] Modify iRacingReplayDirector project file to compile --- iRacingReplayDirector.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/iRacingReplayDirector.csproj b/iRacingReplayDirector.csproj index 71fe8a6..af610b4 100644 --- a/iRacingReplayDirector.csproj +++ b/iRacingReplayDirector.csproj @@ -252,6 +252,7 @@ + From 8e10e4aa24ac810105765f6a8f1b2dd773c6a004 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Mon, 8 Jun 2020 21:40:57 +0200 Subject: [PATCH 77/90] Store number of camera group (camGroupNumber) in camDriver class and only add an instance of the camDriver class to the list of camera change events when the tuple camGroupNumber/currentDriver.Position changes. Remark: Using the CurrentDriver.Position might have to be exchanged with CarIDX - because camera stays on driver independent of position. --- Phases/Capturing/CaptureCamDriver.cs | 4 +++- Phases/Capturing/OverlayData.cs | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Phases/Capturing/CaptureCamDriver.cs b/Phases/Capturing/CaptureCamDriver.cs index 4ee5dcd..2b3f9ce 100644 --- a/Phases/Capturing/CaptureCamDriver.cs +++ b/Phases/Capturing/CaptureCamDriver.cs @@ -55,8 +55,9 @@ public void Process(DataSample data, TimeSpan relativeTime) position, indicator); lastCamDriver = camDriver.CurrentDriver; + //add camDriver to list only if either drivername or position has changed + overlayData.CamDrivers.Add(camDriver); } - overlayData.CamDrivers.Add(camDriver); } } @@ -71,6 +72,7 @@ OverlayData.CamDriver CreateCamDriver(DataSample data, TimeSpan relativeTime) { StartTime = relativeTime.TotalSeconds, CurrentDriver = driver, + camGroupNumber = data.Telemetry.CamGroupNumber //get current, active camera group from telemetry data }; } diff --git a/Phases/Capturing/OverlayData.cs b/Phases/Capturing/OverlayData.cs index f618710..532a0f4 100644 --- a/Phases/Capturing/OverlayData.cs +++ b/Phases/Capturing/OverlayData.cs @@ -98,6 +98,7 @@ public class MessageState public class CamDriver { public double StartTime; + public int camGroupNumber; public Driver CurrentDriver; } From 2f292213449dfddb606413f268c8b3e9648b9e43 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Mon, 8 Jun 2020 21:41:53 +0200 Subject: [PATCH 78/90] Add TraceDebug Messages in methodes used to set cameras. --- Phases/Direction/CameraControl.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Phases/Direction/CameraControl.cs b/Phases/Direction/CameraControl.cs index 6af423a..732b4f9 100644 --- a/Phases/Direction/CameraControl.cs +++ b/Phases/Direction/CameraControl.cs @@ -101,11 +101,13 @@ public TrackCamera FindACamera(IEnumerable cameraAngles, TrackCamer public void CameraOnDriver(short carNumber, short group, short camera = 0) { iRacing.Replay.CameraOnDriver(carNumber, group, camera); + TraceDebug.WriteLine("CameraOnDriver called for carNumber: {0} cameraGroup: {1} camera: {2}".F(carNumber, group, camera)); } public void CameraOnPositon(short carPosition, short group, short camera = 0) { iRacing.Replay.CameraOnPositon(carPosition, group, camera); + TraceDebug.WriteLine("CameraOnPositon called for carNumber: {0} cameraGroup: {1} camera: {2}".F(carPosition, group, camera)); } } } From 71bacf07e47f5050d45e17c115590d0f2804120b Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Tue, 9 Jun 2020 23:22:39 +0200 Subject: [PATCH 79/90] Updates to successfuly buidl solution --- iRacingReplayOverlay.net.nugetreferenceswitcher | 2 ++ iRacingSDK.Net | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 iRacingReplayOverlay.net.nugetreferenceswitcher diff --git a/iRacingReplayOverlay.net.nugetreferenceswitcher b/iRacingReplayOverlay.net.nugetreferenceswitcher new file mode 100644 index 0000000..1e9fba6 --- /dev/null +++ b/iRacingReplayOverlay.net.nugetreferenceswitcher @@ -0,0 +1,2 @@ +iRacingSDK iRacingSDK.Net/iRacingSDK.csproj packages/iRacingSDK.1.0.0.40/lib/net40-client/iRacingSDK.dll +iRacingSDK iRacingSDK.Net/iRacingSDK.csproj packages/iRacingSDK.1.0.0.40/lib/net40-client/iRacingSDK.dll diff --git a/iRacingSDK.Net b/iRacingSDK.Net index 925bdf7..60fecf3 160000 --- a/iRacingSDK.Net +++ b/iRacingSDK.Net @@ -1 +1 @@ -Subproject commit 925bdf751a27a6c9a7049bf231783c9010a5d0d4 +Subproject commit 60fecf3ba43d9f596224fd5cfe732ec4280932ce From 004c08ff838da58d636c6a3a2b8535be7a094566 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Tue, 9 Jun 2020 23:39:16 +0200 Subject: [PATCH 80/90] Update submodule iRacingSDK.NET --- iRacingSDK.Net | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iRacingSDK.Net b/iRacingSDK.Net index 60fecf3..925bdf7 160000 --- a/iRacingSDK.Net +++ b/iRacingSDK.Net @@ -1 +1 @@ -Subproject commit 60fecf3ba43d9f596224fd5cfe732ec4280932ce +Subproject commit 925bdf751a27a6c9a7049bf231783c9010a5d0d4 From 86f2ee4283cb872cd67af69b0541b9bd71d60d09 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Wed, 10 Jun 2020 00:02:18 +0200 Subject: [PATCH 81/90] solution file optimization --- App.config | 16 +++++++------- Tester/App.config | 2 +- Tester/Tester.csproj | 2 +- iRacingReplayDirector.csproj | 13 +++++++++-- iRacingReplayOverlay.net.Tests/app.config | 8 +++---- .../iRacingReplayOverlay.net.Tests.csproj | 3 ++- .../packages.config | 2 +- iRacingReplayOverlay.net.csproj | 4 ++-- iRacingReplayOverlay.net.sln | 8 ------- packages.config | 4 ++-- plugins/NoOverlay/NoOverlay.csproj | 14 ++++++++---- plugins/NoOverlay/packages.config | 4 ++-- .../iRacingDirector.Plugin.Tester/App.config | 22 +++++++++---------- .../Properties/Resources.Designer.cs | 2 +- .../Properties/Settings.Designer.cs | 2 +- .../iRacingDirector.Plugin.Tester.csproj | 2 +- .../packages.config | 2 +- 17 files changed, 59 insertions(+), 51 deletions(-) diff --git a/App.config b/App.config index 5225846..c1d84b7 100644 --- a/App.config +++ b/App.config @@ -8,11 +8,11 @@ - + - + 15 @@ -21,16 +21,16 @@ 48000 - + - + 00:00:20 - + 00:00:01 @@ -63,7 +63,7 @@ False - + 3 @@ -81,10 +81,10 @@ False - + - + diff --git a/Tester/App.config b/Tester/App.config index d0feca6..ecdcf8a 100644 --- a/Tester/App.config +++ b/Tester/App.config @@ -1,6 +1,6 @@ - + diff --git a/Tester/Tester.csproj b/Tester/Tester.csproj index 464fe34..a048811 100644 --- a/Tester/Tester.csproj +++ b/Tester/Tester.csproj @@ -13,7 +13,7 @@ 8.0.30703 2.0 - v4.5.1 + v4.7.2 false diff --git a/iRacingReplayDirector.csproj b/iRacingReplayDirector.csproj index af610b4..89cd876 100644 --- a/iRacingReplayDirector.csproj +++ b/iRacingReplayDirector.csproj @@ -1,5 +1,6 @@  - + + iRacingReplayOverlay @@ -15,12 +16,14 @@ 2.0 - v4.5 + v4.7.2 iRacing Replay Director Dean Netherton iRacing Apps 34 1.0.0.34 + + false @@ -324,4 +327,10 @@ iRacingSDK + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + \ No newline at end of file diff --git a/iRacingReplayOverlay.net.Tests/app.config b/iRacingReplayOverlay.net.Tests/app.config index f0f1284..d1fe401 100644 --- a/iRacingReplayOverlay.net.Tests/app.config +++ b/iRacingReplayOverlay.net.Tests/app.config @@ -1,11 +1,11 @@ - + - - + + - \ No newline at end of file + diff --git a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj index 33c76bb..679b113 100644 --- a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj +++ b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj @@ -11,7 +11,8 @@ iRacingReplayOverlay.net.Tests - v4.5.1 + v4.7.2 + true diff --git a/iRacingReplayOverlay.net.Tests/packages.config b/iRacingReplayOverlay.net.Tests/packages.config index fd83368..d576b1b 100644 --- a/iRacingReplayOverlay.net.Tests/packages.config +++ b/iRacingReplayOverlay.net.Tests/packages.config @@ -4,5 +4,5 @@ - + \ No newline at end of file diff --git a/iRacingReplayOverlay.net.csproj b/iRacingReplayOverlay.net.csproj index 6f79c89..e2f98ec 100644 --- a/iRacingReplayOverlay.net.csproj +++ b/iRacingReplayOverlay.net.csproj @@ -1,5 +1,5 @@  - + iRacingReplayOverlay @@ -15,7 +15,7 @@ 2.0 - v4.5 + v4.7.2 publish\ true Disk diff --git a/iRacingReplayOverlay.net.sln b/iRacingReplayOverlay.net.sln index cab6711..5b0ea15 100644 --- a/iRacingReplayOverlay.net.sln +++ b/iRacingReplayOverlay.net.sln @@ -18,8 +18,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tester", "Tester\Tester.csp {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18} = {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iRacingReplayOverlay.net.Tests", "iRacingReplayOverlay.net.Tests\iRacingReplayOverlay.net.Tests.csproj", "{E4D21BA6-6275-4D46-A1D6-E7D16BF0E5EC}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iRacingSDK", "iRacingSDK.Net\iRacingSDK.csproj", "{5422AE20-F220-4BE1-9E61-5296981ABB5C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iRacingSDK.Net.Tests", "iRacingSDK.Net\iRacingSDK.Net.Tests\iRacingSDK.Net.Tests.csproj", "{947BD2B6-FFF4-4762-8C0E-718112CDA72E}" @@ -92,12 +90,6 @@ Global {7D205FCC-6CE6-49B3-8012-DC14ED9924D1}.Release|Any CPU.ActiveCfg = Release|x64 {7D205FCC-6CE6-49B3-8012-DC14ED9924D1}.Release|Any CPU.Build.0 = Release|x64 {7D205FCC-6CE6-49B3-8012-DC14ED9924D1}.Release|x64.ActiveCfg = Release|x64 - {E4D21BA6-6275-4D46-A1D6-E7D16BF0E5EC}.Debug|Any CPU.ActiveCfg = Debug|x64 - {E4D21BA6-6275-4D46-A1D6-E7D16BF0E5EC}.Debug|Any CPU.Build.0 = Debug|x64 - {E4D21BA6-6275-4D46-A1D6-E7D16BF0E5EC}.Debug|x64.ActiveCfg = Debug|x64 - {E4D21BA6-6275-4D46-A1D6-E7D16BF0E5EC}.Debug|x64.Build.0 = Debug|x64 - {E4D21BA6-6275-4D46-A1D6-E7D16BF0E5EC}.Release|Any CPU.ActiveCfg = Release|x64 - {E4D21BA6-6275-4D46-A1D6-E7D16BF0E5EC}.Release|x64.ActiveCfg = Release|x64 {5422AE20-F220-4BE1-9E61-5296981ABB5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5422AE20-F220-4BE1-9E61-5296981ABB5C}.Debug|Any CPU.Build.0 = Debug|Any CPU {5422AE20-F220-4BE1-9E61-5296981ABB5C}.Debug|x64.ActiveCfg = Debug|Any CPU diff --git a/packages.config b/packages.config index cb1c056..d83d23e 100644 --- a/packages.config +++ b/packages.config @@ -2,12 +2,12 @@ - + - + \ No newline at end of file diff --git a/plugins/NoOverlay/NoOverlay.csproj b/plugins/NoOverlay/NoOverlay.csproj index 16ef829..75e242b 100644 --- a/plugins/NoOverlay/NoOverlay.csproj +++ b/plugins/NoOverlay/NoOverlay.csproj @@ -9,9 +9,10 @@ Properties NoOverlay NoOverlay - v4.0 + v4.7.2 512 - Client + + true @@ -22,6 +23,7 @@ prompt 4 true + false pdbonly @@ -30,6 +32,7 @@ TRACE prompt 4 + false .\packages\ @@ -57,14 +60,17 @@ - + + ..\..\packages\iRacingSDK.1.0.0.42\lib\net40-client\iRacingSDK.dll + True + - ..\..\packages\YamlDotNet.5.3.1\lib\net35\YamlDotNet.dll + ..\..\packages\YamlDotNet.5.3.1\lib\net45\YamlDotNet.dll diff --git a/plugins/NoOverlay/packages.config b/plugins/NoOverlay/packages.config index d5f6d3a..9b36bab 100644 --- a/plugins/NoOverlay/packages.config +++ b/plugins/NoOverlay/packages.config @@ -1,6 +1,6 @@  - - + + \ No newline at end of file diff --git a/plugins/iRacingDirector.Plugin.Tester/App.config b/plugins/iRacingDirector.Plugin.Tester/App.config index 79fa9f8..dd5e97a 100644 --- a/plugins/iRacingDirector.Plugin.Tester/App.config +++ b/plugins/iRacingDirector.Plugin.Tester/App.config @@ -1,40 +1,40 @@ - + -
-
+
+
- + - + - + - + - + - + - - + + diff --git a/plugins/iRacingDirector.Plugin.Tester/Properties/Resources.Designer.cs b/plugins/iRacingDirector.Plugin.Tester/Properties/Resources.Designer.cs index ffa1650..e29b18b 100644 --- a/plugins/iRacingDirector.Plugin.Tester/Properties/Resources.Designer.cs +++ b/plugins/iRacingDirector.Plugin.Tester/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace iRacingDirector.Plugin.Tester.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { diff --git a/plugins/iRacingDirector.Plugin.Tester/Properties/Settings.Designer.cs b/plugins/iRacingDirector.Plugin.Tester/Properties/Settings.Designer.cs index d7eafe0..e1bb050 100644 --- a/plugins/iRacingDirector.Plugin.Tester/Properties/Settings.Designer.cs +++ b/plugins/iRacingDirector.Plugin.Tester/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace iRacingDirector.Plugin.Tester.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj index 17333a9..dcd50ce 100644 --- a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj +++ b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj @@ -9,7 +9,7 @@ Properties iRacingDirector.Plugin.Tester iRacingDirector.Plugin.Tester - v4.5 + v4.7.2 512 true diff --git a/plugins/iRacingDirector.Plugin.Tester/packages.config b/plugins/iRacingDirector.Plugin.Tester/packages.config index 91375be..4d74c4a 100644 --- a/plugins/iRacingDirector.Plugin.Tester/packages.config +++ b/plugins/iRacingDirector.Plugin.Tester/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file From 25837d90b28f7228c43f3e68da77727945e375fa Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Wed, 10 Jun 2020 00:21:43 +0200 Subject: [PATCH 82/90] commit changes to successfully compile --- App.config | 16 +++++++------- Tester/App.config | 2 +- Tester/Tester.csproj | 2 +- iRacingReplayDirector.csproj | 13 ++--------- iRacingReplayOverlay.net.Tests/app.config | 8 +++---- .../iRacingReplayOverlay.net.Tests.csproj | 3 +-- .../packages.config | 2 +- iRacingReplayOverlay.net.csproj | 4 ++-- iRacingReplayOverlay.net.sln | 8 +++++++ packages.config | 4 ++-- plugins/NoOverlay/NoOverlay.csproj | 14 ++++-------- plugins/NoOverlay/packages.config | 4 ++-- .../iRacingDirector.Plugin.Tester/App.config | 22 +++++++++---------- .../Properties/Resources.Designer.cs | 2 +- .../Properties/Settings.Designer.cs | 2 +- .../iRacingDirector.Plugin.Tester.csproj | 2 +- ...gin.Tester.previous.nugetreferenceswitcher | 1 + .../packages.config | 2 +- 18 files changed, 52 insertions(+), 59 deletions(-) create mode 100644 plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.previous.nugetreferenceswitcher diff --git a/App.config b/App.config index c1d84b7..5225846 100644 --- a/App.config +++ b/App.config @@ -8,11 +8,11 @@ - + - + 15 @@ -21,16 +21,16 @@ 48000 - + - + 00:00:20 - + 00:00:01 @@ -63,7 +63,7 @@ False - + 3 @@ -81,10 +81,10 @@ False - + - + diff --git a/Tester/App.config b/Tester/App.config index ecdcf8a..d0feca6 100644 --- a/Tester/App.config +++ b/Tester/App.config @@ -1,6 +1,6 @@ - + diff --git a/Tester/Tester.csproj b/Tester/Tester.csproj index a048811..464fe34 100644 --- a/Tester/Tester.csproj +++ b/Tester/Tester.csproj @@ -13,7 +13,7 @@ 8.0.30703 2.0 - v4.7.2 + v4.5.1 false diff --git a/iRacingReplayDirector.csproj b/iRacingReplayDirector.csproj index 89cd876..af610b4 100644 --- a/iRacingReplayDirector.csproj +++ b/iRacingReplayDirector.csproj @@ -1,6 +1,5 @@  - - + iRacingReplayOverlay @@ -16,14 +15,12 @@ 2.0 - v4.7.2 + v4.5 iRacing Replay Director Dean Netherton iRacing Apps 34 1.0.0.34 - - false @@ -327,10 +324,4 @@ iRacingSDK - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - \ No newline at end of file diff --git a/iRacingReplayOverlay.net.Tests/app.config b/iRacingReplayOverlay.net.Tests/app.config index d1fe401..f0f1284 100644 --- a/iRacingReplayOverlay.net.Tests/app.config +++ b/iRacingReplayOverlay.net.Tests/app.config @@ -1,11 +1,11 @@ - + - - + + - + \ No newline at end of file diff --git a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj index 679b113..33c76bb 100644 --- a/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj +++ b/iRacingReplayOverlay.net.Tests/iRacingReplayOverlay.net.Tests.csproj @@ -11,8 +11,7 @@ iRacingReplayOverlay.net.Tests - v4.7.2 - + v4.5.1 true diff --git a/iRacingReplayOverlay.net.Tests/packages.config b/iRacingReplayOverlay.net.Tests/packages.config index d576b1b..fd83368 100644 --- a/iRacingReplayOverlay.net.Tests/packages.config +++ b/iRacingReplayOverlay.net.Tests/packages.config @@ -4,5 +4,5 @@ - + \ No newline at end of file diff --git a/iRacingReplayOverlay.net.csproj b/iRacingReplayOverlay.net.csproj index e2f98ec..6f79c89 100644 --- a/iRacingReplayOverlay.net.csproj +++ b/iRacingReplayOverlay.net.csproj @@ -1,5 +1,5 @@  - + iRacingReplayOverlay @@ -15,7 +15,7 @@ 2.0 - v4.7.2 + v4.5 publish\ true Disk diff --git a/iRacingReplayOverlay.net.sln b/iRacingReplayOverlay.net.sln index 5b0ea15..cab6711 100644 --- a/iRacingReplayOverlay.net.sln +++ b/iRacingReplayOverlay.net.sln @@ -18,6 +18,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tester", "Tester\Tester.csp {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18} = {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18} EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iRacingReplayOverlay.net.Tests", "iRacingReplayOverlay.net.Tests\iRacingReplayOverlay.net.Tests.csproj", "{E4D21BA6-6275-4D46-A1D6-E7D16BF0E5EC}" +EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iRacingSDK", "iRacingSDK.Net\iRacingSDK.csproj", "{5422AE20-F220-4BE1-9E61-5296981ABB5C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "iRacingSDK.Net.Tests", "iRacingSDK.Net\iRacingSDK.Net.Tests\iRacingSDK.Net.Tests.csproj", "{947BD2B6-FFF4-4762-8C0E-718112CDA72E}" @@ -90,6 +92,12 @@ Global {7D205FCC-6CE6-49B3-8012-DC14ED9924D1}.Release|Any CPU.ActiveCfg = Release|x64 {7D205FCC-6CE6-49B3-8012-DC14ED9924D1}.Release|Any CPU.Build.0 = Release|x64 {7D205FCC-6CE6-49B3-8012-DC14ED9924D1}.Release|x64.ActiveCfg = Release|x64 + {E4D21BA6-6275-4D46-A1D6-E7D16BF0E5EC}.Debug|Any CPU.ActiveCfg = Debug|x64 + {E4D21BA6-6275-4D46-A1D6-E7D16BF0E5EC}.Debug|Any CPU.Build.0 = Debug|x64 + {E4D21BA6-6275-4D46-A1D6-E7D16BF0E5EC}.Debug|x64.ActiveCfg = Debug|x64 + {E4D21BA6-6275-4D46-A1D6-E7D16BF0E5EC}.Debug|x64.Build.0 = Debug|x64 + {E4D21BA6-6275-4D46-A1D6-E7D16BF0E5EC}.Release|Any CPU.ActiveCfg = Release|x64 + {E4D21BA6-6275-4D46-A1D6-E7D16BF0E5EC}.Release|x64.ActiveCfg = Release|x64 {5422AE20-F220-4BE1-9E61-5296981ABB5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5422AE20-F220-4BE1-9E61-5296981ABB5C}.Debug|Any CPU.Build.0 = Debug|Any CPU {5422AE20-F220-4BE1-9E61-5296981ABB5C}.Debug|x64.ActiveCfg = Debug|Any CPU diff --git a/packages.config b/packages.config index d83d23e..cb1c056 100644 --- a/packages.config +++ b/packages.config @@ -2,12 +2,12 @@ - + - + \ No newline at end of file diff --git a/plugins/NoOverlay/NoOverlay.csproj b/plugins/NoOverlay/NoOverlay.csproj index 75e242b..16ef829 100644 --- a/plugins/NoOverlay/NoOverlay.csproj +++ b/plugins/NoOverlay/NoOverlay.csproj @@ -9,10 +9,9 @@ Properties NoOverlay NoOverlay - v4.7.2 + v4.0 512 - - + Client true @@ -23,7 +22,6 @@ prompt 4 true - false pdbonly @@ -32,7 +30,6 @@ TRACE prompt 4 - false .\packages\ @@ -60,17 +57,14 @@ - - ..\..\packages\iRacingSDK.1.0.0.42\lib\net40-client\iRacingSDK.dll - True - + - ..\..\packages\YamlDotNet.5.3.1\lib\net45\YamlDotNet.dll + ..\..\packages\YamlDotNet.5.3.1\lib\net35\YamlDotNet.dll diff --git a/plugins/NoOverlay/packages.config b/plugins/NoOverlay/packages.config index 9b36bab..d5f6d3a 100644 --- a/plugins/NoOverlay/packages.config +++ b/plugins/NoOverlay/packages.config @@ -1,6 +1,6 @@  - - + + \ No newline at end of file diff --git a/plugins/iRacingDirector.Plugin.Tester/App.config b/plugins/iRacingDirector.Plugin.Tester/App.config index dd5e97a..79fa9f8 100644 --- a/plugins/iRacingDirector.Plugin.Tester/App.config +++ b/plugins/iRacingDirector.Plugin.Tester/App.config @@ -1,40 +1,40 @@ - + -
-
+
+
- + - + - + - + - + - + - - + + diff --git a/plugins/iRacingDirector.Plugin.Tester/Properties/Resources.Designer.cs b/plugins/iRacingDirector.Plugin.Tester/Properties/Resources.Designer.cs index e29b18b..ffa1650 100644 --- a/plugins/iRacingDirector.Plugin.Tester/Properties/Resources.Designer.cs +++ b/plugins/iRacingDirector.Plugin.Tester/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace iRacingDirector.Plugin.Tester.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { diff --git a/plugins/iRacingDirector.Plugin.Tester/Properties/Settings.Designer.cs b/plugins/iRacingDirector.Plugin.Tester/Properties/Settings.Designer.cs index e1bb050..d7eafe0 100644 --- a/plugins/iRacingDirector.Plugin.Tester/Properties/Settings.Designer.cs +++ b/plugins/iRacingDirector.Plugin.Tester/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace iRacingDirector.Plugin.Tester.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj index dcd50ce..17333a9 100644 --- a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj +++ b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.csproj @@ -9,7 +9,7 @@ Properties iRacingDirector.Plugin.Tester iRacingDirector.Plugin.Tester - v4.7.2 + v4.5 512 true diff --git a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.previous.nugetreferenceswitcher b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.previous.nugetreferenceswitcher new file mode 100644 index 0000000..d4a4044 --- /dev/null +++ b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.previous.nugetreferenceswitcher @@ -0,0 +1 @@ +iRacingSDK ../../iRacingSDK.Net/iRacingSDK.csproj ../../packages/iRacingSDK.1.0.0.42/lib/net40-client/iRacingSDK.dll diff --git a/plugins/iRacingDirector.Plugin.Tester/packages.config b/plugins/iRacingDirector.Plugin.Tester/packages.config index 4d74c4a..91375be 100644 --- a/plugins/iRacingDirector.Plugin.Tester/packages.config +++ b/plugins/iRacingDirector.Plugin.Tester/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file From bf759620c88fcb44c7c282911f104f6ecac666b3 Mon Sep 17 00:00:00 2001 From: Merlin Cooper Date: Thu, 11 Jun 2020 23:15:15 +0200 Subject: [PATCH 83/90] worker thread to switch iRacing camera while recording using pause/resume implemented --- Phases/CaptureRace.cs | 25 +++++++++--------- Phases/Direction/CameraControl.cs | 42 +++++++++++++++++++++++++++++-- Phases/Direction/ReplayControl.cs | 4 ++- 3 files changed, 56 insertions(+), 15 deletions(-) diff --git a/Phases/CaptureRace.cs b/Phases/CaptureRace.cs index 79720e5..81da498 100644 --- a/Phases/CaptureRace.cs +++ b/Phases/CaptureRace.cs @@ -26,6 +26,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.Threading.Tasks; using System.ComponentModel; using System.IO; using System.Linq; @@ -66,13 +67,16 @@ internal void _CaptureRaceTest(Action onComplete, IEnumerable onComplete, IEnumerable cameraAngles, TrackCamer return camera; } + //Start worker thread to switch cameras as stored in camDriversList during race analyis when FastRecording is used. + public async Task ReplayCameraControlTask(OverlayData overlayData) + { + this.overlayData = overlayData; + await Task.Run(() => CameraSwitcherWorkerTask()); + } + + //worker thread to switch cameras. + private void CameraSwitcherWorkerTask() + { + for(var iCamDriverIndex = 0; iCamDriverIndex < overlayData.CamDrivers.Count; iCamDriverIndex++) + { + //get object of current CamDriver + var curCamDriver = overlayData.CamDrivers[iCamDriverIndex]; + //Set camera to current camDriver Object + ReplayControl.cameraControl.CameraOnDriver(short.Parse(curCamDriver.CurrentDriver.CarNumber), (short)curCamDriver.camGroupNumber); + //remember start-time of current camers + double startTimeCurCamera = curCamDriver.StartTime; + try + { + double startTimeNextCamera = overlayData.CamDrivers[iCamDriverIndex+1].StartTime; + int camDuration = (int)(1000 * (startTimeNextCamera - startTimeCurCamera)); + TraceDebug.WriteLine("Camera switched to driver {0} using camera-group {1}. Remaining Time: {2}".F(curCamDriver.CurrentDriver.UserName, curCamDriver.camGroupNumber, camDuration)); + Thread.Sleep(camDuration); + } + catch + { + TraceDebug.Write("No more entries in list of CamDriver -> no more camera switches"); + } + } + } + public void CameraOnDriver(short carNumber, short group, short camera = 0) { iRacing.Replay.CameraOnDriver(carNumber, group, camera); - TraceDebug.WriteLine("CameraOnDriver called for carNumber: {0} cameraGroup: {1} camera: {2}".F(carNumber, group, camera)); + //TraceDebug.WriteLine("CameraOnDriver called for carNumber: {0} cameraGroup: {1} camera: {2}".F(carNumber, group, camera)); } public void CameraOnPositon(short carPosition, short group, short camera = 0) { iRacing.Replay.CameraOnPositon(carPosition, group, camera); - TraceDebug.WriteLine("CameraOnPositon called for carNumber: {0} cameraGroup: {1} camera: {2}".F(carPosition, group, camera)); + //TraceDebug.WriteLine("CameraOnPositon called for carPosition: {0} cameraGroup: {1} camera: {2}".F(carPosition, group, camera)); } } } diff --git a/Phases/Direction/ReplayControl.cs b/Phases/Direction/ReplayControl.cs index 0ba8e1f..158064f 100644 --- a/Phases/Direction/ReplayControl.cs +++ b/Phases/Direction/ReplayControl.cs @@ -30,6 +30,7 @@ public class ReplayControl readonly IDirectionRule[] directionRules; readonly IVetoRule ruleRandom; IDirectionRule currentRule; + public static CameraControl cameraControl; public ReplayControl(SessionData sessionData, Incidents incidents, RemovalEdits removalEdits, TrackCameras trackCameras) { @@ -43,7 +44,8 @@ public ReplayControl(SessionData sessionData, Incidents incidents, RemovalEdits var camera = cameras.First(tc => tc.IsRaceStart); - var cameraControl = new CameraControl(cameras); + //var cameraControl = new CameraControl(cameras); + cameraControl = new CameraControl(cameras); cameraControl.CameraOnPositon(1, camera.CameraNumber); var battleMarker = removalEdits.For(InterestState.Battle); From fd8ecfa343ae021af09b611d5df62eee3171ed1a Mon Sep 17 00:00:00 2001 From: MerlinCooper Date: Sun, 21 Jun 2020 17:04:38 +0200 Subject: [PATCH 84/90] Class Diagram not needed --- ClassDiagram1.cd | 123 ----------------------------------------------- 1 file changed, 123 deletions(-) delete mode 100644 ClassDiagram1.cd diff --git a/ClassDiagram1.cd b/ClassDiagram1.cd deleted file mode 100644 index 046ede0..0000000 --- a/ClassDiagram1.cd +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - AEAAAAAAAAAAAgAAAgAAAAAAAAAAAAAAAQAAAAAAAAA= - Phases\Capturing\LeaderBoard\CaptureLeaderBoardFirstLap.cs - - - - - - AEIAAAAAAAAAAgAAAgAAAAAAAAAAAAIAAIAACAAAAAA= - Phases\Capturing\LeaderBoard\CaptureLeaderBoardLastLap.cs - - - - - - AEAAAAIAAAAAAgAAAgAAAAEAAAAAAAAAAAAACAABAAA= - Phases\Capturing\LeaderBoard\CaptureLeaderBoardMiddleLaps.cs - - - - - - AAAAAAAAAAAAAhAABgAAAAABAAAAAAAAAAAAAAIAAAA= - Phases\Capturing\CaptureCamDriver.cs - - - - - - gAAAAAAAAAAAEgCEAwACAAAAAAAAAAAICAAAAAAAAAI= - Phases\Capturing\CaptureLeaderBoard.cs - - - - - - AAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAQAAAAA= - Phases\Capturing\CommentaryMessages.cs - - - - - - AAAAAAAAACAAAAAAAAAAAIEAAAAgAAAAIQAAAAAIAAA= - Phases\Capturing\EditMarker.cs - - - - - - AAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAA= - Phases\Capturing\LogCamDriver.cs - - - - - - AAAAAAAAAAAARgAAAgAAIAAAAAAAAAAAAAAAAAAAAAQ= - Phases\Capturing\RecordFastestLaps.cs - - - - - - AAAAAAAAAAAAAAAAAgAAAAAABAAAAAAAAAAACAAAAAA= - Phases\Capturing\RecordPitStops.cs - - - - - - AACAAAAAAAAAgABAAgAAIAAAIAABIAIgIQAAACAAAAA= - Phases\Capturing\RemovalEdits.cs - - - - - - AAQAAAAAAAAAAAAAAgAAAgAAAAAAAAAAAAAAAgAAAAA= - Phases\Capturing\SampleFilter.cs - - - - - - AAAAAAAAAAAAAgAAAgAAAAAAAAAAAAAAAAAAAAAAAAA= - Phases\Capturing\SessionDataCapture.cs - - - - - - BAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAABAAAA= - Phases\Capturing\OverlayData.cs - - - - - - AEAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAA= - Phases\Capturing\OverlayData.cs - - - - - - AAAAAAiAAAAAAoAkAAAAAAAAgAAAAAAEAAAAACgEAAA= - Phases\Capturing\OverlayData.cs - - - - - - EAAAAAAAAACAQAAAAAAACAAAIAAAAAAAAAAAAAEAABA= - Phases\Capturing\RemovalEdits.cs - - - - \ No newline at end of file From c4cc034486931aa8aced148be4044bc67ce16e66 Mon Sep 17 00:00:00 2001 From: MerlinCooper Date: Sun, 21 Jun 2020 17:04:56 +0200 Subject: [PATCH 85/90] Class Diagram not needed --- ClassDiagram2.cd | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 ClassDiagram2.cd diff --git a/ClassDiagram2.cd b/ClassDiagram2.cd deleted file mode 100644 index 889ba35..0000000 --- a/ClassDiagram2.cd +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - IAuqIAEACgCUKiICgEAAGhgkDAQEEAAEMAEQAIAACoA= - Phases\AnalyseRace.cs - - - - \ No newline at end of file From abec1e6038d80d21ae4921cd77d8ae6ec01288f7 Mon Sep 17 00:00:00 2001 From: MerlinCooper Date: Sun, 21 Jun 2020 17:05:16 +0200 Subject: [PATCH 86/90] Class Diagram not needed --- ClassDiagram3.cd | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 ClassDiagram3.cd diff --git a/ClassDiagram3.cd b/ClassDiagram3.cd deleted file mode 100644 index 7b89419..0000000 --- a/ClassDiagram3.cd +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file From 87ed648f875fd2f6842290b8da580ef562fefc49 Mon Sep 17 00:00:00 2001 From: MerlinCooper Date: Sun, 21 Jun 2020 17:06:45 +0200 Subject: [PATCH 87/90] No update on project files --- iRacingReplayDirector.csproj | 327 ----------------------------------- 1 file changed, 327 deletions(-) delete mode 100644 iRacingReplayDirector.csproj diff --git a/iRacingReplayDirector.csproj b/iRacingReplayDirector.csproj deleted file mode 100644 index af610b4..0000000 --- a/iRacingReplayDirector.csproj +++ /dev/null @@ -1,327 +0,0 @@ - - - - - iRacingReplayOverlay - $(OverrideAssemblyName) - Debug - x64 - {E9EB76FC-CB86-47EA-A1F3-01570C1BBC18} - WinExe - Properties - iRacingReplayDirector - 512 - 8.0.30703 - 2.0 - - - v4.5 - iRacing Replay Director - Dean Netherton - iRacing Apps - 34 - 1.0.0.34 - - - false - bin\x64\Debug - 4 - x64 - TRACE;DEBUG - 5 - true - pdbonly - true - false - - - false - bin\x64\Release - 4 - x64 - 5 - true - pdbonly - true - Off - TRACE - false - - - Properties\app.manifest - - - iRacingReplayDirector - - - - packages\MediaFoundation.Net.2.0.0.32\lib\net35-client\MediaFoundation.Net.dll - True - - - - - {b78c0f3b-071a-4fd2-829d-7a67e0f7bd1c} - MediaFoundation - - - {59d2b4b5-2852-4396-a0d9-9ca546ac3c09} - SuperMFLib - - - - - packages\AWSSDK.CloudWatchLogs.3.1.2.2\lib\net35\AWSSDK.CloudWatchLogs.dll - True - - - packages\AWSSDK.Core.3.1.4.0\lib\net35\AWSSDK.Core.dll - True - - - packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - - - packages\Octokit.0.17.0\lib\net45\Octokit.dll - - - - - - - - - - - - - - - - - - - - - - packages\YamlDotNet.5.3.1\lib\net45\YamlDotNet.dll - - - - - Form - - - AboutBox1.cs - - - Form - - - AdvancedGeneralSettingsDlg.cs - - - - - - - Form - - - PluginSettings.cs - - - - - - Form - - - ConfigureGeneralSettings.cs - - - Form - - - ConfigurePlugins.cs - - - - - - - - - - - - - - - Form - - - LogMessages.cs - - - - - - - - - - - - - - - - - - - - - - - - - True - True - - - - - - - - - - Form - - - TestVideoConversion.cs - - - Form - - - TestVideoCapture.cs - - - - - Form - - - Main.cs - - - - - - - - - - True - True - Resources.resx - - - - - - - - - Form - - - ConfigureTrackCameras.cs - - - Form - - - UsageDataRequest.cs - - - - - - - - - - - - - - - - - - - - - - - - AboutBox1.cs - - - AdvancedGeneralSettingsDlg.cs - - - ConfigureGeneralSettings.cs - - - ConfigurePlugins.cs - - - LogMessages.cs - - - Main.cs - - - PluginSettings.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - - - ConfigureTrackCameras.cs - - - TestVideoConversion.cs - Designer - - - TestVideoCapture.cs - - - UsageDataRequest.cs - Designer - - - - - - - - - - - - {5422AE20-F220-4BE1-9E61-5296981ABB5C} - iRacingSDK - - - \ No newline at end of file From 9eaab896b2ece49d3f3ed7708962bb03df9b8f62 Mon Sep 17 00:00:00 2001 From: MerlinCooper Date: Sun, 21 Jun 2020 17:07:18 +0200 Subject: [PATCH 88/90] not needed --- iRacingReplayDirector.nugetreferenceswitcher | 1 - 1 file changed, 1 deletion(-) delete mode 100644 iRacingReplayDirector.nugetreferenceswitcher diff --git a/iRacingReplayDirector.nugetreferenceswitcher b/iRacingReplayDirector.nugetreferenceswitcher deleted file mode 100644 index 4818f43..0000000 --- a/iRacingReplayDirector.nugetreferenceswitcher +++ /dev/null @@ -1 +0,0 @@ -iRacingSDK iRacingSDK.Net/iRacingSDK.csproj packages/iRacingSDK.1.0.0.42/lib/net40-client/iRacingSDK.dll From 3b732004aa045f1f84fa4dc9c288e77ae73d821d Mon Sep 17 00:00:00 2001 From: MerlinCooper Date: Sun, 21 Jun 2020 17:08:05 +0200 Subject: [PATCH 89/90] No update on project files --- .gitmodules | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 7c9a28f..0000000 --- a/.gitmodules +++ /dev/null @@ -1,18 +0,0 @@ -[submodule "SuperMFLib"] - path = SuperMFLib - url = git://github.com/vipoo/SuperMFLib.git -[submodule "plugins/iRacingDirector.Plugin.StandardOverlays"] - path = plugins/iRacingDirector.Plugin.StandardOverlays - url = git://github.com/vipoo/iRacingDirector.Plugin.StandardOverlays.git -[submodule "GitHubReleases"] - path = GitHubReleases - url = git://github.com/vipoo/GitHubReleases.git -[submodule "plugins/iRacingDirector.Plugin.Support"] - path = plugins/iRacingDirector.Plugin.Support - url = git://github.com/vipoo/iRacingDirector.Plugin.Support.git -[submodule "plugins/JockeOverlays"] - path = plugins/JockeOverlays - url = git://github.com/vipoo/JockeOverlays.git -[submodule "iRacingSDK.Net"] - path = iRacingSDK.Net - url = https://github.com/MerlinCooper/iRacingSDK.Net.git From 28271107a2eb2eed7e74b789cff879001d2d615f Mon Sep 17 00:00:00 2001 From: MerlinCooper Date: Sun, 21 Jun 2020 17:09:56 +0200 Subject: [PATCH 90/90] File not needed --- .../iRacingDirector.Plugin.Tester.nugetreferenceswitcher | 1 - 1 file changed, 1 deletion(-) delete mode 100644 plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.nugetreferenceswitcher diff --git a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.nugetreferenceswitcher b/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.nugetreferenceswitcher deleted file mode 100644 index d4a4044..0000000 --- a/plugins/iRacingDirector.Plugin.Tester/iRacingDirector.Plugin.Tester.nugetreferenceswitcher +++ /dev/null @@ -1 +0,0 @@ -iRacingSDK ../../iRacingSDK.Net/iRacingSDK.csproj ../../packages/iRacingSDK.1.0.0.42/lib/net40-client/iRacingSDK.dll