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

Method parse

source/MaaAdbControlUnit/Screencap/EncodeToFile.cpp:8–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#include "MaaUtils/Time.hpp"
7
8MAA_CTRL_UNIT_NS_BEGIN
9
10bool ScreencapEncodeToFileAndPull::parse(const json::value& config)
11{
12 static const json::array kDefaultScreencapEncodeToFileArgv = {
13 "{ADB}", "-s", "{ADB_SERIAL}", "shell", "screencap -p > \"/data/local/tmp/{TEMP_FILE}\"",
14 };
15 static const json::array kDefaultPullFileArgv = { "{ADB}", "-s", "{ADB_SERIAL}", "pull", "/data/local/tmp/{TEMP_FILE}", "{DST_PATH}" };
16
17 return parse_command("ScreencapEncodeToFile", config, kDefaultScreencapEncodeToFileArgv, screencap_encode_to_file_argv_)
18 && parse_command("PullFile", config, kDefaultPullFileArgv, pull_file_argv_);
19}
20
21bool ScreencapEncodeToFileAndPull::init()
22{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected