Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2019 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 11 | #include "video/frame_encode_metadata_writer.h" |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 12 | |
| 13 | #include <algorithm> |
Zhaoliang Ma | 528e489 | 2021-11-12 05:05:07 | [diff] [blame] | 14 | #include <memory> |
Niels Möller | 4d504c7 | 2019-06-18 13:56:56 | [diff] [blame] | 15 | #include <utility> |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 16 | |
Mirta Dvornicic | 28f0eb2 | 2019-05-28 14:30:16 | [diff] [blame] | 17 | #include "common_video/h264/sps_vui_rewriter.h" |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 18 | #include "modules/include/module_common_types_public.h" |
| 19 | #include "modules/video_coding/include/video_coding_defines.h" |
Zhaoliang Ma | 528e489 | 2021-11-12 05:05:07 | [diff] [blame] | 20 | #include "modules/video_coding/svc/create_scalability_structure.h" |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 21 | #include "rtc_base/logging.h" |
| 22 | #include "rtc_base/time_utils.h" |
| 23 | |
| 24 | namespace webrtc { |
| 25 | namespace { |
| 26 | const int kMessagesThrottlingThreshold = 2; |
| 27 | const int kThrottleRatio = 100000; |
Niels Möller | 4d504c7 | 2019-06-18 13:56:56 | [diff] [blame] | 28 | |
| 29 | class EncodedImageBufferWrapper : public EncodedImageBufferInterface { |
| 30 | public: |
| 31 | explicit EncodedImageBufferWrapper(rtc::Buffer&& buffer) |
| 32 | : buffer_(std::move(buffer)) {} |
| 33 | |
| 34 | const uint8_t* data() const override { return buffer_.data(); } |
| 35 | uint8_t* data() override { return buffer_.data(); } |
| 36 | size_t size() const override { return buffer_.size(); } |
| 37 | |
Niels Möller | 4d504c7 | 2019-06-18 13:56:56 | [diff] [blame] | 38 | private: |
| 39 | rtc::Buffer buffer_; |
| 40 | }; |
| 41 | |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 42 | } // namespace |
| 43 | |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 44 | FrameEncodeMetadataWriter::TimingFramesLayerInfo::TimingFramesLayerInfo() = |
| 45 | default; |
| 46 | FrameEncodeMetadataWriter::TimingFramesLayerInfo::~TimingFramesLayerInfo() = |
| 47 | default; |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 48 | |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 49 | FrameEncodeMetadataWriter::FrameEncodeMetadataWriter( |
| 50 | EncodedImageCallback* frame_drop_callback) |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 51 | : frame_drop_callback_(frame_drop_callback), |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 52 | framerate_fps_(0), |
| 53 | last_timing_frame_time_ms_(-1), |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 54 | reordered_frames_logged_messages_(0), |
| 55 | stalled_encoder_logged_messages_(0) { |
| 56 | codec_settings_.timing_frame_thresholds = {-1, 0}; |
| 57 | } |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 58 | FrameEncodeMetadataWriter::~FrameEncodeMetadataWriter() {} |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 59 | |
Niels Möller | 13d1636 | 2021-11-16 10:39:27 | [diff] [blame] | 60 | void FrameEncodeMetadataWriter::OnEncoderInit(const VideoCodec& codec) { |
Markus Handell | a376518 | 2020-07-08 11:13:32 | [diff] [blame] | 61 | MutexLock lock(&lock_); |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 62 | codec_settings_ = codec; |
Zhaoliang Ma | 528e489 | 2021-11-12 05:05:07 | [diff] [blame] | 63 | size_t num_spatial_layers = codec_settings_.numberOfSimulcastStreams; |
| 64 | if (codec_settings_.codecType == kVideoCodecVP9) { |
| 65 | num_spatial_layers = std::max( |
| 66 | num_spatial_layers, |
| 67 | static_cast<size_t>(codec_settings_.VP9()->numberOfSpatialLayers)); |
| 68 | } else if (codec_settings_.codecType == kVideoCodecAV1 && |
Niels Möller | 79d566b | 2022-04-29 09:03:13 | [diff] [blame] | 69 | codec_settings_.GetScalabilityMode().has_value()) { |
Zhaoliang Ma | 528e489 | 2021-11-12 05:05:07 | [diff] [blame] | 70 | std::unique_ptr<ScalableVideoController> structure = |
Niels Möller | 79d566b | 2022-04-29 09:03:13 | [diff] [blame] | 71 | CreateScalabilityStructure(*codec_settings_.GetScalabilityMode()); |
Zhaoliang Ma | ea8dfd5 | 2022-02-11 04:54:06 | [diff] [blame] | 72 | if (structure) { |
| 73 | num_spatial_layers = structure->StreamConfig().num_spatial_layers; |
| 74 | } else { |
| 75 | // |structure| maybe nullptr if the scalability mode is invalid. |
| 76 | RTC_LOG(LS_WARNING) << "Cannot create ScalabilityStructure, since the " |
| 77 | "scalability mode is invalid"; |
| 78 | } |
Zhaoliang Ma | 528e489 | 2021-11-12 05:05:07 | [diff] [blame] | 79 | } |
| 80 | num_spatial_layers_ = std::max(num_spatial_layers, size_t{1}); |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 81 | } |
| 82 | |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 83 | void FrameEncodeMetadataWriter::OnSetRates( |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 84 | const VideoBitrateAllocation& bitrate_allocation, |
| 85 | uint32_t framerate_fps) { |
Markus Handell | a376518 | 2020-07-08 11:13:32 | [diff] [blame] | 86 | MutexLock lock(&lock_); |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 87 | framerate_fps_ = framerate_fps; |
Zhaoliang Ma | 528e489 | 2021-11-12 05:05:07 | [diff] [blame] | 88 | if (timing_frames_info_.size() < num_spatial_layers_) { |
| 89 | timing_frames_info_.resize(num_spatial_layers_); |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 90 | } |
Zhaoliang Ma | 528e489 | 2021-11-12 05:05:07 | [diff] [blame] | 91 | for (size_t i = 0; i < num_spatial_layers_; ++i) { |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 92 | timing_frames_info_[i].target_bitrate_bytes_per_sec = |
| 93 | bitrate_allocation.GetSpatialLayerSum(i) / 8; |
| 94 | } |
| 95 | } |
| 96 | |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 97 | void FrameEncodeMetadataWriter::OnEncodeStarted(const VideoFrame& frame) { |
Markus Handell | a376518 | 2020-07-08 11:13:32 | [diff] [blame] | 98 | MutexLock lock(&lock_); |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 99 | |
Zhaoliang Ma | 528e489 | 2021-11-12 05:05:07 | [diff] [blame] | 100 | timing_frames_info_.resize(num_spatial_layers_); |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 101 | FrameMetadata metadata; |
| 102 | metadata.rtp_timestamp = frame.timestamp(); |
| 103 | metadata.encode_start_time_ms = rtc::TimeMillis(); |
| 104 | metadata.ntp_time_ms = frame.ntp_time_ms(); |
| 105 | metadata.timestamp_us = frame.timestamp_us(); |
| 106 | metadata.rotation = frame.rotation(); |
| 107 | metadata.color_space = frame.color_space(); |
Chen Xing | f00bf42 | 2019-06-20 08:05:55 | [diff] [blame] | 108 | metadata.packet_infos = frame.packet_infos(); |
Zhaoliang Ma | 528e489 | 2021-11-12 05:05:07 | [diff] [blame] | 109 | for (size_t si = 0; si < num_spatial_layers_; ++si) { |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 110 | RTC_DCHECK(timing_frames_info_[si].frames.empty() || |
| 111 | rtc::TimeDiff( |
| 112 | frame.render_time_ms(), |
| 113 | timing_frames_info_[si].frames.back().timestamp_us / 1000) >= |
| 114 | 0); |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 115 | // If stream is disabled due to low bandwidth OnEncodeStarted still will be |
| 116 | // called and have to be ignored. |
| 117 | if (timing_frames_info_[si].target_bitrate_bytes_per_sec == 0) |
Ilya Nikolaevskiy | 9b540cb | 2019-12-17 09:16:53 | [diff] [blame] | 118 | continue; |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 119 | if (timing_frames_info_[si].frames.size() == kMaxEncodeStartTimeListSize) { |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 120 | ++stalled_encoder_logged_messages_; |
| 121 | if (stalled_encoder_logged_messages_ <= kMessagesThrottlingThreshold || |
| 122 | stalled_encoder_logged_messages_ % kThrottleRatio == 0) { |
| 123 | RTC_LOG(LS_WARNING) << "Too many frames in the encode_start_list." |
| 124 | " Did encoder stall?"; |
| 125 | if (stalled_encoder_logged_messages_ == kMessagesThrottlingThreshold) { |
| 126 | RTC_LOG(LS_WARNING) |
| 127 | << "Too many log messages. Further stalled encoder" |
| 128 | "warnings will be throttled."; |
| 129 | } |
| 130 | } |
| 131 | frame_drop_callback_->OnDroppedFrame( |
| 132 | EncodedImageCallback::DropReason::kDroppedByEncoder); |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 133 | timing_frames_info_[si].frames.pop_front(); |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 134 | } |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 135 | timing_frames_info_[si].frames.emplace_back(metadata); |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 136 | } |
| 137 | } |
| 138 | |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 139 | void FrameEncodeMetadataWriter::FillTimingInfo(size_t simulcast_svc_idx, |
| 140 | EncodedImage* encoded_image) { |
Markus Handell | a376518 | 2020-07-08 11:13:32 | [diff] [blame] | 141 | MutexLock lock(&lock_); |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 142 | absl::optional<size_t> outlier_frame_size; |
| 143 | absl::optional<int64_t> encode_start_ms; |
| 144 | uint8_t timing_flags = VideoSendTiming::kNotTriggered; |
| 145 | |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 146 | int64_t encode_done_ms = rtc::TimeMillis(); |
| 147 | |
Niels Möller | 13d1636 | 2021-11-16 10:39:27 | [diff] [blame] | 148 | encode_start_ms = |
| 149 | ExtractEncodeStartTimeAndFillMetadata(simulcast_svc_idx, encoded_image); |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 150 | |
| 151 | if (timing_frames_info_.size() > simulcast_svc_idx) { |
| 152 | size_t target_bitrate = |
| 153 | timing_frames_info_[simulcast_svc_idx].target_bitrate_bytes_per_sec; |
| 154 | if (framerate_fps_ > 0 && target_bitrate > 0) { |
| 155 | // framerate and target bitrate were reported by encoder. |
| 156 | size_t average_frame_size = target_bitrate / framerate_fps_; |
| 157 | outlier_frame_size.emplace( |
| 158 | average_frame_size * |
| 159 | codec_settings_.timing_frame_thresholds.outlier_ratio_percent / 100); |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | // Outliers trigger timing frames, but do not affect scheduled timing |
| 164 | // frames. |
| 165 | if (outlier_frame_size && encoded_image->size() >= *outlier_frame_size) { |
| 166 | timing_flags |= VideoSendTiming::kTriggeredBySize; |
| 167 | } |
| 168 | |
| 169 | // Check if it's time to send a timing frame. |
| 170 | int64_t timing_frame_delay_ms = |
| 171 | encoded_image->capture_time_ms_ - last_timing_frame_time_ms_; |
| 172 | // Trigger threshold if it's a first frame, too long passed since the last |
| 173 | // timing frame, or we already sent timing frame on a different simulcast |
| 174 | // stream with the same capture time. |
| 175 | if (last_timing_frame_time_ms_ == -1 || |
| 176 | timing_frame_delay_ms >= |
| 177 | codec_settings_.timing_frame_thresholds.delay_ms || |
| 178 | timing_frame_delay_ms == 0) { |
| 179 | timing_flags |= VideoSendTiming::kTriggeredByTimer; |
| 180 | last_timing_frame_time_ms_ = encoded_image->capture_time_ms_; |
| 181 | } |
| 182 | |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 183 | // If encode start is not available that means that encoder uses internal |
| 184 | // source. In that case capture timestamp may be from a different clock with a |
| 185 | // drift relative to rtc::TimeMillis(). We can't use it for Timing frames, |
| 186 | // because to being sent in the network capture time required to be less than |
| 187 | // all the other timestamps. |
| 188 | if (encode_start_ms) { |
| 189 | encoded_image->SetEncodeTime(*encode_start_ms, encode_done_ms); |
| 190 | encoded_image->timing_.flags = timing_flags; |
| 191 | } else { |
| 192 | encoded_image->timing_.flags = VideoSendTiming::kInvalid; |
| 193 | } |
| 194 | } |
| 195 | |
Danil Chapovalov | 6d008a8 | 2020-07-22 17:49:36 | [diff] [blame] | 196 | void FrameEncodeMetadataWriter::UpdateBitstream( |
Mirta Dvornicic | 28f0eb2 | 2019-05-28 14:30:16 | [diff] [blame] | 197 | const CodecSpecificInfo* codec_specific_info, |
Mirta Dvornicic | 28f0eb2 | 2019-05-28 14:30:16 | [diff] [blame] | 198 | EncodedImage* encoded_image) { |
| 199 | if (!codec_specific_info || |
Danil Chapovalov | 6d008a8 | 2020-07-22 17:49:36 | [diff] [blame] | 200 | codec_specific_info->codecType != kVideoCodecH264 || |
Mirta Dvornicic | 28f0eb2 | 2019-05-28 14:30:16 | [diff] [blame] | 201 | encoded_image->_frameType != VideoFrameType::kVideoFrameKey) { |
Danil Chapovalov | 6d008a8 | 2020-07-22 17:49:36 | [diff] [blame] | 202 | return; |
Mirta Dvornicic | 28f0eb2 | 2019-05-28 14:30:16 | [diff] [blame] | 203 | } |
| 204 | |
Mirta Dvornicic | 28f0eb2 | 2019-05-28 14:30:16 | [diff] [blame] | 205 | // Make sure that the data is not copied if owned by EncodedImage. |
| 206 | const EncodedImage& buffer = *encoded_image; |
Danil Chapovalov | 6d008a8 | 2020-07-22 17:49:36 | [diff] [blame] | 207 | rtc::Buffer modified_buffer = |
Hua, Chunbo | 9345dcf | 2020-09-22 02:34:56 | [diff] [blame] | 208 | SpsVuiRewriter::ParseOutgoingBitstreamAndRewrite( |
Danil Chapovalov | 6d008a8 | 2020-07-22 17:49:36 | [diff] [blame] | 209 | buffer, encoded_image->ColorSpace()); |
Mirta Dvornicic | 28f0eb2 | 2019-05-28 14:30:16 | [diff] [blame] | 210 | |
Niels Möller | 4d504c7 | 2019-06-18 13:56:56 | [diff] [blame] | 211 | encoded_image->SetEncodedData( |
Tomas Gunnarsson | c1d5891 | 2021-04-22 17:21:43 | [diff] [blame] | 212 | rtc::make_ref_counted<EncodedImageBufferWrapper>( |
Niels Möller | 4d504c7 | 2019-06-18 13:56:56 | [diff] [blame] | 213 | std::move(modified_buffer))); |
Mirta Dvornicic | 28f0eb2 | 2019-05-28 14:30:16 | [diff] [blame] | 214 | } |
| 215 | |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 216 | void FrameEncodeMetadataWriter::Reset() { |
Markus Handell | a376518 | 2020-07-08 11:13:32 | [diff] [blame] | 217 | MutexLock lock(&lock_); |
Ilya Nikolaevskiy | ba96e2f | 2019-06-04 13:15:14 | [diff] [blame] | 218 | for (auto& info : timing_frames_info_) { |
| 219 | info.frames.clear(); |
| 220 | } |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 221 | last_timing_frame_time_ms_ = -1; |
| 222 | reordered_frames_logged_messages_ = 0; |
| 223 | stalled_encoder_logged_messages_ = 0; |
| 224 | } |
| 225 | |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 226 | absl::optional<int64_t> |
| 227 | FrameEncodeMetadataWriter::ExtractEncodeStartTimeAndFillMetadata( |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 228 | size_t simulcast_svc_idx, |
| 229 | EncodedImage* encoded_image) { |
| 230 | absl::optional<int64_t> result; |
| 231 | size_t num_simulcast_svc_streams = timing_frames_info_.size(); |
| 232 | if (simulcast_svc_idx < num_simulcast_svc_streams) { |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 233 | auto metadata_list = &timing_frames_info_[simulcast_svc_idx].frames; |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 234 | // Skip frames for which there was OnEncodeStarted but no OnEncodedImage |
| 235 | // call. These are dropped by encoder internally. |
| 236 | // Because some hardware encoders don't preserve capture timestamp we |
| 237 | // use RTP timestamps here. |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 238 | while (!metadata_list->empty() && |
Danil Chapovalov | 9c58483 | 2023-09-18 13:48:49 | [diff] [blame] | 239 | IsNewerTimestamp(encoded_image->RtpTimestamp(), |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 240 | metadata_list->front().rtp_timestamp)) { |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 241 | frame_drop_callback_->OnDroppedFrame( |
| 242 | EncodedImageCallback::DropReason::kDroppedByEncoder); |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 243 | metadata_list->pop_front(); |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 244 | } |
Ilya Nikolaevskiy | ba96e2f | 2019-06-04 13:15:14 | [diff] [blame] | 245 | |
| 246 | encoded_image->content_type_ = |
| 247 | (codec_settings_.mode == VideoCodecMode::kScreensharing) |
| 248 | ? VideoContentType::SCREENSHARE |
| 249 | : VideoContentType::UNSPECIFIED; |
| 250 | |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 251 | if (!metadata_list->empty() && |
Danil Chapovalov | 9c58483 | 2023-09-18 13:48:49 | [diff] [blame] | 252 | metadata_list->front().rtp_timestamp == encoded_image->RtpTimestamp()) { |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 253 | result.emplace(metadata_list->front().encode_start_time_ms); |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 254 | encoded_image->capture_time_ms_ = |
| 255 | metadata_list->front().timestamp_us / 1000; |
| 256 | encoded_image->ntp_time_ms_ = metadata_list->front().ntp_time_ms; |
| 257 | encoded_image->rotation_ = metadata_list->front().rotation; |
| 258 | encoded_image->SetColorSpace(metadata_list->front().color_space); |
Chen Xing | f00bf42 | 2019-06-20 08:05:55 | [diff] [blame] | 259 | encoded_image->SetPacketInfos(metadata_list->front().packet_infos); |
Ilya Nikolaevskiy | 2ebf523 | 2019-05-13 14:13:36 | [diff] [blame] | 260 | metadata_list->pop_front(); |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 261 | } else { |
| 262 | ++reordered_frames_logged_messages_; |
| 263 | if (reordered_frames_logged_messages_ <= kMessagesThrottlingThreshold || |
| 264 | reordered_frames_logged_messages_ % kThrottleRatio == 0) { |
| 265 | RTC_LOG(LS_WARNING) << "Frame with no encode started time recordings. " |
| 266 | "Encoder may be reordering frames " |
| 267 | "or not preserving RTP timestamps."; |
| 268 | if (reordered_frames_logged_messages_ == kMessagesThrottlingThreshold) { |
| 269 | RTC_LOG(LS_WARNING) << "Too many log messages. Further frames " |
| 270 | "reordering warnings will be throttled."; |
| 271 | } |
| 272 | } |
| 273 | } |
| 274 | } |
| 275 | return result; |
| 276 | } |
| 277 | |
Erik Språng | 6a7baa7 | 2019-02-26 17:31:00 | [diff] [blame] | 278 | } // namespace webrtc |