| 28 | } |
| 29 | |
| 30 | void GrStatistics::ProcessCaptureStatistics(const MsgCaptureStatistics& msg) { |
| 31 | // this->audio_frame_gaps_.Clear(); |
| 32 | // for (auto& v : msg.statistics_->audio_frame_gaps()) { |
| 33 | // this->audio_frame_gaps_.PushBack(v); |
| 34 | // } |
| 35 | this->audio_frame_gaps_.CopyFrom<>(msg.statistics_->audio_frame_gaps()); |
| 36 | |
| 37 | // from inner server |
| 38 | this->app_running_time = msg.statistics_->app_running_time(); |
| 39 | // from inner server |
| 40 | this->server_send_media_bytes = msg.statistics_->server_send_media_data(); |
| 41 | |
| 42 | // captures information |
| 43 | this->encode_durations_.Clear(); |
| 44 | this->video_capture_gaps_.Clear(); |
| 45 | this->copy_texture_durations_.Clear(); |
| 46 | this->map_cvt_texture_durations_.Clear(); |
| 47 | { |
| 48 | captures_info_.Clear(); |
| 49 | int size = msg.statistics_->working_captures_info_size(); |
| 50 | for (int i = 0; i < size; i++) { |
| 51 | auto info = msg.statistics_->working_captures_info(i); |
| 52 | auto cpy_info = std::make_shared<tcrp::RpMsgWorkingCaptureInfo>(); |
| 53 | cpy_info->CopyFrom(info); |
| 54 | captures_info_.PushBack(cpy_info); |
| 55 | |
| 56 | if (video_capture_type_ != info.capture_type()) { |
| 57 | video_capture_type_ = info.capture_type(); |
| 58 | } |
| 59 | |
| 60 | // encode durations |
| 61 | std::vector<int32_t> encode_durations; |
| 62 | for (const auto& v : info.encode_durations()) { |
| 63 | encode_durations.push_back(v); |
| 64 | } |
| 65 | encode_durations_.Insert(info.target_name(), encode_durations); |
| 66 | |
| 67 | // video capture gaps |
| 68 | std::vector<int32_t> video_capture_gaps; |
| 69 | for (const auto& v : info.video_capture_gaps()) { |
| 70 | video_capture_gaps.push_back(v); |
| 71 | } |
| 72 | video_capture_gaps_.Insert(info.target_name(), video_capture_gaps); |
| 73 | |
| 74 | // copy texture durations |
| 75 | std::vector<int32_t> copy_texture_durations; |
| 76 | for (const auto& v : info.copy_texture_durations()) { |
| 77 | copy_texture_durations.push_back(v); |
| 78 | } |
| 79 | copy_texture_durations_.Insert(info.target_name(), copy_texture_durations); |
| 80 | |
| 81 | // map cvt texture durations |
| 82 | std::vector<int32_t> map_cvt_texture_durations; |
| 83 | for (const auto& v : info.map_cvt_texture_durations()) { |
| 84 | map_cvt_texture_durations.push_back(v); |
| 85 | } |
| 86 | map_cvt_texture_durations_.Insert(info.target_name(), map_cvt_texture_durations); |
| 87 | } |
nothing calls this directly
no test coverage detected