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

Method screencap

source/MaaAdbControlUnit/Screencap/Encode.cpp:16–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14}
15
16std::optional<cv::Mat> ScreencapEncode::screencap()
17{
18 auto argv_opt = screencap_encode_argv_.gen(argv_replace_);
19 if (!argv_opt) {
20 return std::nullopt;
21 }
22
23 auto output_opt = startup_and_read_pipe(*argv_opt);
24 if (!output_opt) {
25 return std::nullopt;
26 }
27
28 return screencap_helper_.process_data(*output_opt, ScreencapHelper::decode_png);
29}
30
31MAA_CTRL_UNIT_NS_END

Callers

nothing calls this directly

Calls 2

genMethod · 0.80
process_dataMethod · 0.80

Tested by

no test coverage detected