public static async Task <Session> Start(CameraObject cameraObject, string name, string fileOutput = null) { if (sourcesOpen.Any(i => i.Equals(cameraObject.Name))) { return(null); } var session = new Session() { IsSourceFromCamera = true, Source = cameraObject.ToString(), FileOutput = fileOutput, Name = name }; session.Datastore = await Datastore.Initialize(session); session.FrameSource = await FrameSource.Initialize(session); session.GridProjection = await GridProjection.Initialize(session); session.Logger = await Logger.Initialize(session); session.HumanDetector = await HumanDetector.Initialize(session); sourcesOpen.Add(cameraObject.ToString()); return(session); }
public void Stop() { FrameSource.Stop(); sourcesOpen.RemoveAll(i => i.Equals(Source)); }