| 14 | } |
| 15 | |
| 16 | std::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 | |
| 31 | MAA_CTRL_UNIT_NS_END |
nothing calls this directly
no test coverage detected