| 1071 | } |
| 1072 | |
| 1073 | bool RuntimeManager::SetRemoteVideoPixelFormat(const std::string& vm_id, PixelFormat format) { |
| 1074 | if (format != PixelFormat::kYuv420p && format != PixelFormat::kYuv444p) return false; |
| 1075 | auto session = FindSession(vm_id); |
| 1076 | if (!session) return false; |
| 1077 | std::lock_guard<std::mutex> lock(session->frame_mutex); |
| 1078 | if (session->remote_video_format == format) return true; |
| 1079 | session->remote_video_format = format; |
| 1080 | session->remote_frame = RemoteVideoFrame{}; |
| 1081 | session->remote_frame.format = format; |
| 1082 | session->remote_frame_force_full = true; |
| 1083 | session->remote_frame_cv.notify_all(); |
| 1084 | return true; |
| 1085 | } |
| 1086 | |
| 1087 | nlohmann::json RuntimeManager::RemoteRuntimeSnapshot(const std::string& vm_id, |
| 1088 | SnapshotScope scope) const { |
no outgoing calls
no test coverage detected