MCPcopy Create free account
hub / github.com/ElectroZybr/LatticeLab / start

Method start

App/capture/CaptureController.cpp:53–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53void CaptureController::start() {
54 if (!available_ || isRecording()) {
55 return;
56 }
57
58 lastRenderTime_ = std::chrono::steady_clock::now();
59 renderFrameCount_ = 0;
60 renderFpsAccum_ = 0.0;
61 measuredRenderFps_ = 0;
62
63 std::error_code fsError;
64 std::filesystem::create_directories(outputDirectory_, fsError);
65 if (fsError) {
66 std::cerr << "Failed to create capture directory '" << outputDirectory_.string() << "': " << fsError.message() << "\n";
67 return;
68 }
69 const std::filesystem::path outputPath = makeCaptureOutputPath();
70 const char* pixFmt = capture_utils::toInputPixelFormat(activeFormat_);
71
72 if (!streamer_.start(activeWidth_, activeHeight_, pixFmt, settings_, outputPath)) {
73 return;
74 }
75
76 producer_.startVideoCapture(&streamer_, settings_);
77 resetSessionStats();
78}
79
80void CaptureController::stop() {
81 if (!isRecording()) {

Callers

nothing calls this directly

Calls 2

toInputPixelFormatFunction · 0.85
startVideoCaptureMethod · 0.80

Tested by

no test coverage detected