| 788 | } |
| 789 | |
| 790 | bool ControllerAgent::handle_screencap() |
| 791 | { |
| 792 | if (!control_unit_) { |
| 793 | LogError << "control_unit_ is nullptr"; |
| 794 | return false; |
| 795 | } |
| 796 | |
| 797 | cv::Mat raw_image; |
| 798 | bool screencaped = control_unit_->screencap(raw_image); |
| 799 | if (!screencaped) { |
| 800 | LogError << "controller screencap failed"; |
| 801 | return false; |
| 802 | } |
| 803 | |
| 804 | bool ret = postproc_screenshot(raw_image); |
| 805 | |
| 806 | return ret; |
| 807 | } |
| 808 | |
| 809 | bool ControllerAgent::handle_start_app(const AppParam& param) |
| 810 | { |