Skip to content

Commit

Permalink
Add remarks / Anotations where to add code to start CameraControl Thread
Browse files Browse the repository at this point in the history
  • Loading branch information
MerlinCooper committed Jun 6, 2020
1 parent 65a7201 commit cde5c48
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Phases/AnalyseRace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ void AnalyseRaceSituations(IEnumerable<DataSample> 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),
Expand Down
12 changes: 7 additions & 5 deletions Phases/CaptureRace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,17 @@ internal void _CaptureRaceTest(Action<string> onComplete, IEnumerable<DataSample
int framePositionInRace = raceStartFrameNumber + (int)Math.Round(raceEvent.StartTime * 60.0);
iRacing.Replay.MoveToFrame(raceStartFrameNumber + (int)Math.Round(raceEvent.StartTime * 60.0));

iRacing.Replay.SetSpeed((int)replaySpeeds.normal); //start iRacing Replay at selected position
//TODO: SET CAMERA TO DRIVER


raceVideo.Resume(); //resume recording
iRacing.Replay.SetSpeed((int)replaySpeeds.normal); //start iRacing Replay at selected position

raceVideo.Resume(); //resume recording
TraceDebug.WriteLine("Recording Race-Event. Frame-Position: {0} | Duration: {1} ms".F(framePositionInRace, 1000 * raceEvent.Duration));

//TODO: START THREAD TO SWITCH / CONTROL CAMERA WHILE RECORDING SCENE
Thread.Sleep((int)(1000 * raceEvent.Duration)); //pause thread until scene is fully recorded.

raceVideo.Pause(); //pause recording software before jumping to new position in iRacing Replay
//TODO: TERMINATE THREAD CAMERA CONTROL
raceVideo.Pause(); //pause recording software before jumping to new position in iRacing Replay
}

TraceDebug.WriteLine("Video Capture of Race-Events completed");
Expand Down

0 comments on commit cde5c48

Please sign in to comment.