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

Method init

source/MaaAdbControlUnit/Screencap/RawByNetcat.cpp:22–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22bool ScreencapRawByNetcat::init()
23{
24 LogFunc;
25
26 auto addr_opt = request_netcat_address();
27 if (!addr_opt) {
28 return false;
29 }
30 netcat_address_ = std::move(*addr_opt);
31
32 auto serial_host = argv_replace_["{ADB_SERIAL}"];
33 auto shp = serial_host.find(':');
34 std::string local = "127.0.0.1";
35 if (shp != std::string::npos) {
36 local = serial_host.substr(0, shp);
37 }
38
39 io_factory_ = std::make_shared<ServerSockIOFactory>(local, 0);
40
41 return true;
42}
43
44std::optional<cv::Mat> ScreencapRawByNetcat::screencap()
45{

Callers

nothing calls this directly

Calls 2

moveFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected