MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / screencap

Method screencap

source/MaaAdbControlUnit/Screencap/Minicap/MinicapStream.cpp:50–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50std::optional<cv::Mat> MinicapStream::screencap()
51{
52 std::unique_lock locker(mutex_);
53 if (quit_) {
54 return std::nullopt;
55 }
56
57 using namespace std::chrono_literals;
58 cond_.wait_for(locker, 2s); // 等下一帧
59
60 return image_.empty() ? std::nullopt : std::make_optional(image_.clone());
61}
62
63std::optional<std::string> MinicapStream::read(size_t count)
64{

Callers

nothing calls this directly

Calls 2

emptyMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected