/external/webrtc/webrtc/modules/remote_bitrate_estimator/ |
D | rate_statistics_unittest.cc | 25 int64_t now_ms = 0; in TEST_F() local 27 EXPECT_EQ(0u, stats_.Rate(now_ms)); in TEST_F() 28 stats_.Update(1500, now_ms); in TEST_F() 30 EXPECT_EQ(24000u, stats_.Rate(now_ms)); in TEST_F() 33 EXPECT_EQ(0u, stats_.Rate(now_ms)); in TEST_F() 35 if (now_ms % 10 == 0) { in TEST_F() 36 stats_.Update(1500, now_ms); in TEST_F() 40 if (now_ms > 0 && now_ms % 500 == 0) { in TEST_F() 41 EXPECT_NEAR(1200000u, stats_.Rate(now_ms), 24000u); in TEST_F() 43 now_ms += 1; in TEST_F() [all …]
|
D | remote_bitrate_estimator_abs_send_time_unittest.cc | 108 int64_t now_ms = clock_.TimeInMilliseconds(); in TEST_F() local 112 now_ms = clock_.TimeInMilliseconds(); in TEST_F() 113 IncomingPacket(0, 1000, now_ms, 90 * now_ms, AbsSendTime(now_ms, 1000), in TEST_F() 120 now_ms = clock_.TimeInMilliseconds(); in TEST_F() 121 IncomingPacket(0, 1000, now_ms, 90 * now_ms, AbsSendTime(now_ms, 1000), in TEST_F() 133 int64_t now_ms = clock_.TimeInMilliseconds(); in TEST_F() local 138 now_ms = clock_.TimeInMilliseconds(); in TEST_F() 139 IncomingPacket(0, 1000, now_ms, 90 * now_ms, AbsSendTime(now_ms, 1000), in TEST_F() 143 IncomingPacket(0, 100, now_ms, 90 * now_ms, AbsSendTime(now_ms, 1000), in TEST_F() 157 int64_t now_ms = clock_.TimeInMilliseconds(); in TEST_F() local [all …]
|
D | aimd_rate_control.cc | 89 uint32_t AimdRateControl::UpdateBandwidthEstimate(int64_t now_ms) { in UpdateBandwidthEstimate() argument 91 current_input_.incoming_bitrate, now_ms); in UpdateBandwidthEstimate() 92 if (now_ms - time_of_last_log_ > kLogIntervalMs) { in UpdateBandwidthEstimate() 93 time_of_last_log_ = now_ms; in UpdateBandwidthEstimate() 102 void AimdRateControl::Update(const RateControlInput* input, int64_t now_ms) { in Update() argument 112 time_first_incoming_estimate_ = now_ms; in Update() 114 } else if (now_ms - time_first_incoming_estimate_ > kInitializationTimeMs && in Update() 132 void AimdRateControl::SetEstimate(int bitrate_bps, int64_t now_ms) { in SetEstimate() argument 135 current_bitrate_bps_ = ChangeBitrate(bitrate_bps, bitrate_bps, now_ms); in SetEstimate() 140 int64_t now_ms) { in ChangeBitrate() argument [all …]
|
D | rate_statistics.cc | 38 void RateStatistics::Update(size_t count, int64_t now_ms) { in Update() argument 39 if (now_ms < oldest_time_) { in Update() 44 EraseOld(now_ms); in Update() 46 int now_offset = static_cast<int>(now_ms - oldest_time_); in Update() 56 uint32_t RateStatistics::Rate(int64_t now_ms) { in Rate() argument 57 EraseOld(now_ms); in Rate() 61 void RateStatistics::EraseOld(int64_t now_ms) { in EraseOld() argument 62 int64_t new_oldest_time = now_ms - num_buckets_ + 1; in EraseOld()
|
D | aimd_rate_control.h | 41 uint32_t UpdateBandwidthEstimate(int64_t now_ms); 43 void Update(const RateControlInput* input, int64_t now_ms); 44 void SetEstimate(int bitrate_bps, int64_t now_ms); 56 int64_t now_ms); 57 uint32_t MultiplicativeRateIncrease(int64_t now_ms, int64_t last_ms, 59 uint32_t AdditiveRateIncrease(int64_t now_ms, int64_t last_ms, 61 void UpdateChangePeriod(int64_t now_ms); 63 void ChangeState(const RateControlInput& input, int64_t now_ms);
|
D | overuse_detector.cc | 80 int64_t now_ms) { in Detect() argument 87 BWE_TEST_LOGGING_PLOT(1, "offset", now_ms, T); in Detect() 88 BWE_TEST_LOGGING_PLOT(1, "threshold", now_ms, threshold_); in Detect() 117 UpdateThreshold(T, now_ms); in Detect() 122 void OveruseDetector::UpdateThreshold(double modified_offset, int64_t now_ms) { in UpdateThreshold() argument 127 last_update_ms_ = now_ms; in UpdateThreshold() 132 last_update_ms_ = now_ms; in UpdateThreshold() 138 k * (fabs(modified_offset) - threshold_) * (now_ms - last_update_ms_); in UpdateThreshold() 144 last_update_ms_ = now_ms; in UpdateThreshold()
|
D | remote_bitrate_estimator_abs_send_time.cc | 186 void RemoteBitrateEstimatorAbsSendTime::ProcessClusters(int64_t now_ms) { in ProcessClusters() argument 204 probe_bitrate_bps > static_cast<int>(incoming_bitrate_.Rate(now_ms))) { in ProcessClusters() 211 remote_rate_.SetEstimate(probe_bitrate_bps, now_ms); in ProcessClusters() 265 int64_t now_ms = clock_->TimeInMilliseconds(); in IncomingPacketInfo() local 268 ssrcs_[ssrc] = now_ms; in IncomingPacketInfo() 269 incoming_bitrate_.Update(payload_size, now_ms); in IncomingPacketInfo() 284 now_ms - first_packet_time_ms_ < kInitialProbingIntervalMs)) { in IncomingPacketInfo() 300 ProcessClusters(now_ms); in IncomingPacketInfo() 313 UpdateStats(static_cast<int>(t_delta - ts_delta_ms), now_ms); in IncomingPacketInfo() 316 uint32_t incoming_bitrate_bps = incoming_bitrate_.Rate(now_ms); in IncomingPacketInfo() [all …]
|
D | remote_bitrate_estimator_single_stream.cc | 77 int64_t now_ms = clock_->TimeInMilliseconds(); in IncomingPacket() local 89 ssrc, new Detector(now_ms, OverUseDetectorOptions(), true))); in IncomingPacket() 93 estimator->last_packet_time_ms = now_ms; in IncomingPacket() 94 incoming_bitrate_.Update(payload_size, now_ms); in IncomingPacket() 107 estimator->estimator.num_of_deltas(), now_ms); in IncomingPacket() 110 uint32_t incoming_bitrate_bps = incoming_bitrate_.Rate(now_ms); in IncomingPacket() 112 remote_rate_->TimeToReduceFurther(now_ms, incoming_bitrate_bps)) { in IncomingPacket() 116 UpdateEstimate(now_ms); in IncomingPacket() 144 void RemoteBitrateEstimatorSingleStream::UpdateEstimate(int64_t now_ms) { in UpdateEstimate() argument 152 now_ms - time_of_last_received_packet > kStreamTimeOutMs) { in UpdateEstimate() [all …]
|
D | overuse_detector_unittest.cc | 665 int64_t now_ms = 0; in TEST_F() local 673 overuse_detector_->Detect(kOffset, kTsDelta, num_deltas, now_ms); in TEST_F() 678 now_ms += 5; in TEST_F() 686 overuse_detector_->Detect(1.1 * kOffset, kTsDelta, num_deltas, now_ms); in TEST_F() 691 now_ms += 5; in TEST_F() 699 overuse_detector_->Detect(kOffset, kTsDelta, num_deltas, now_ms); in TEST_F() 704 now_ms += 5; in TEST_F() 711 overuse_detector_->Detect(0.7 * kOffset, kTsDelta, num_deltas, now_ms); in TEST_F() 716 now_ms += 5; in TEST_F() 723 overuse_detector_->Detect(kOffset, kTsDelta, num_deltas, now_ms); in TEST_F() [all …]
|
D | rate_statistics.h | 28 void Update(size_t count, int64_t now_ms); 29 uint32_t Rate(int64_t now_ms); 32 void EraseOld(int64_t now_ms);
|
/external/webrtc/webrtc/modules/bitrate_controller/ |
D | send_side_bandwidth_estimation.cc | 102 int64_t now_ms, uint32_t bandwidth) { in UpdateReceiverEstimate() argument 104 bitrate_ = CapBitrateToThresholds(now_ms, bitrate_); in UpdateReceiverEstimate() 110 int64_t now_ms) { in UpdateReceiverBlock() argument 112 first_report_time_ms_ = now_ms; in UpdateReceiverBlock() 137 time_last_receiver_block_ms_ = now_ms; in UpdateReceiverBlock() 138 UpdateEstimate(now_ms); in UpdateReceiverBlock() 139 UpdateUmaStats(now_ms, rtt, (fraction_loss * number_of_packets) >> 8); in UpdateReceiverBlock() 142 void SendSideBandwidthEstimation::UpdateUmaStats(int64_t now_ms, in UpdateUmaStats() argument 150 now_ms - first_report_time_ms_); in UpdateUmaStats() 154 if (IsInStartPhase(now_ms)) { in UpdateUmaStats() [all …]
|
D | send_side_bandwidth_estimation_unittest.cc | 26 int64_t now_ms = 0; in TEST() local 28 bwe.UpdateReceiverBlock(0, 50, 1, now_ms); in TEST() 31 bwe.UpdateReceiverEstimate(now_ms, kRembBps); in TEST() 32 bwe.UpdateEstimate(now_ms); in TEST() 40 now_ms += 2001; in TEST() 41 bwe.UpdateReceiverEstimate(now_ms, kSecondRembBps); in TEST() 42 bwe.UpdateEstimate(now_ms); in TEST() 58 int64_t now_ms = 0; in TEST() local 68 bwe.UpdateReceiverBlock(kFractionLoss, kRttMs, 100, now_ms); in TEST() 70 now_ms += 2000; in TEST() [all …]
|
D | send_side_bandwidth_estimation.h | 33 void UpdateEstimate(int64_t now_ms); 36 void UpdateReceiverEstimate(int64_t now_ms, uint32_t bandwidth); 42 int64_t now_ms); 53 bool IsInStartPhase(int64_t now_ms) const; 55 void UpdateUmaStats(int64_t now_ms, int64_t rtt, int lost_packets); 59 uint32_t CapBitrateToThresholds(int64_t now_ms, uint32_t bitrate); 64 void UpdateMinHistory(int64_t now_ms);
|
/external/webrtc/webrtc/modules/pacing/ |
D | bitrate_prober_unittest.cc | 21 int64_t now_ms = 0; in TEST() local 22 EXPECT_EQ(-1, prober.TimeUntilNextProbe(now_ms)); in TEST() 30 EXPECT_EQ(0, prober.TimeUntilNextProbe(now_ms)); in TEST() 31 prober.PacketSent(now_ms, 1000); in TEST() 34 EXPECT_EQ(8, prober.TimeUntilNextProbe(now_ms)); in TEST() 35 now_ms += 4; in TEST() 36 EXPECT_EQ(4, prober.TimeUntilNextProbe(now_ms)); in TEST() 37 now_ms += 4; in TEST() 38 EXPECT_EQ(0, prober.TimeUntilNextProbe(now_ms)); in TEST() 39 prober.PacketSent(now_ms, 1000); in TEST() [all …]
|
D | bitrate_prober.cc | 80 int BitrateProber::TimeUntilNextProbe(int64_t now_ms) { in TimeUntilNextProbe() argument 88 int64_t elapsed_time_ms = now_ms - time_last_send_ms_; in TimeUntilNextProbe() 120 void BitrateProber::PacketSent(int64_t now_ms, size_t packet_size) { in PacketSent() argument 123 time_last_send_ms_ = now_ms; in PacketSent()
|
/external/webrtc/webrtc/modules/video_coding/ |
D | timing.cc | 173 int64_t now_ms, in StopDecodeTimer() argument 176 codec_timer_.MaxFilter(decode_time_ms, now_ms); in StopDecodeTimer() 183 first_decoded_frame_ms_ = now_ms; in StopDecodeTimer() 185 int time_until_rendering_ms = render_time_ms - render_delay_ms_ - now_ms; in StopDecodeTimer() 193 void VCMTiming::IncomingTimestamp(uint32_t time_stamp, int64_t now_ms) { in IncomingTimestamp() argument 195 ts_extrapolator_->Update(now_ms, time_stamp); in IncomingTimestamp() 199 int64_t now_ms) const { in RenderTimeMs() 201 const int64_t render_time_ms = RenderTimeMsInternal(frame_timestamp, now_ms); in RenderTimeMs() 206 int64_t now_ms) const { in RenderTimeMsInternal() 210 estimated_complete_time_ms = now_ms; in RenderTimeMsInternal() [all …]
|
D | media_optimization.cc | 330 const int64_t now_ms = clock_->TimeInMilliseconds(); in SentBitRate() local 331 PurgeOldFrameSamples(now_ms); in SentBitRate() 332 UpdateSentBitrate(now_ms); in SentBitRate() 341 const int64_t now_ms = clock_->TimeInMilliseconds(); in UpdateWithEncodedData() local 342 PurgeOldFrameSamples(now_ms); in UpdateWithEncodedData() 349 encoded_frame_samples_.back().time_complete_ms = now_ms; in UpdateWithEncodedData() 352 EncodedFrameSample(encoded_length, timestamp, now_ms)); in UpdateWithEncodedData() 354 UpdateSentBitrate(now_ms); in UpdateWithEncodedData() 484 void MediaOptimization::PurgeOldFrameSamples(int64_t now_ms) { in PurgeOldFrameSamples() argument 486 if (now_ms - encoded_frame_samples_.front().time_complete_ms > in PurgeOldFrameSamples() [all …]
|
D | receiver.cc | 116 const int64_t now_ms = clock_->TimeInMilliseconds(); in FrameForDecoding() local 118 *next_render_time_ms = timing_->RenderTimeMs(frame_timestamp, now_ms); in FrameForDecoding() 124 } else if (std::abs(*next_render_time_ms - now_ms) > max_video_delay_ms_) { in FrameForDecoding() 125 int frame_delay = static_cast<int>(std::abs(*next_render_time_ms - now_ms)); in FrameForDecoding() 256 const int64_t now_ms = clock_->TimeInMilliseconds(); in RenderBufferSizeMs() local 259 uint32_t render_start = timing_->RenderTimeMs(timestamp_start, now_ms); in RenderBufferSizeMs() 260 uint32_t render_end = timing_->RenderTimeMs(timestamp_end, now_ms); in RenderBufferSizeMs()
|
D | timing.h | 61 int64_t now_ms, 70 int64_t RenderTimeMs(uint32_t frame_timestamp, int64_t now_ms) const; 74 uint32_t MaxWaitingTime(int64_t render_time_ms, int64_t now_ms) const; 99 int64_t RenderTimeMsInternal(uint32_t frame_timestamp, int64_t now_ms) const
|
/external/webrtc/webrtc/modules/remote_bitrate_estimator/test/estimators/ |
D | nada.cc | 92 FeedbackPacket* NadaBweReceiver::GetFeedback(int64_t now_ms) { in GetFeedback() argument 95 if (now_ms - last_feedback_ms_ < 100) { in GetFeedback() 108 static_cast<float>(now_ms - last_feedback_ms_); in GetFeedback() 110 last_feedback_ms_ = now_ms; in GetFeedback() 118 latest->send_time_ms + now_ms - latest->arrival_time_ms; in GetFeedback() 123 return new NadaFeedback(flow_id_, now_ms * 1000, exp_smoothed_delay_ms_, in GetFeedback() 186 int64_t now_ms = clock_->TimeInMilliseconds(); in GiveFeedback() local 187 float delta_s = now_ms - last_feedback_ms_; in GiveFeedback() 188 last_feedback_ms_ = now_ms; in GiveFeedback() 194 int64_t rtt_ms = now_ms - fb.latest_send_time_ms(); in GiveFeedback()
|
D | tcp.cc | 43 FeedbackPacket* TcpBweReceiver::GetFeedback(int64_t now_ms) { in GetFeedback() argument 44 int64_t corrected_send_time_ms = now_ms - latest_owd_ms_; in GetFeedback() 46 new TcpFeedback(flow_id_, now_ms * 1000, corrected_send_time_ms, acks_); in GetFeedback() 47 last_feedback_ms_ = now_ms; in GetFeedback()
|
D | send_side.cc | 136 FeedbackPacket* SendSideBweReceiver::GetFeedback(int64_t now_ms) { in GetFeedback() argument 137 if (now_ms - last_feedback_ms_ < kFeedbackIntervalMs) in GetFeedback() 139 last_feedback_ms_ = now_ms; in GetFeedback() 141 packet_feedback_vector_.back().send_time_ms + now_ms - in GetFeedback() 144 flow_id_, now_ms * 1000, corrected_send_time_ms, packet_feedback_vector_); in GetFeedback()
|
/external/webrtc/webrtc/voice_engine/ |
D | network_predictor.cc | 29 int64_t now_ms = clock_->TimeInMilliseconds(); in UpdatePacketLossRate() local 32 static_cast<float>(now_ms - last_loss_rate_update_time_ms_), in UpdatePacketLossRate() 34 last_loss_rate_update_time_ms_ = now_ms; in UpdatePacketLossRate()
|
/external/grpc-grpc/src/core/lib/gpr/ |
D | sync_windows.cc | 77 int64_t now_ms = (int64_t)now.tv_sec * 1000 + now.tv_nsec / 1000000; in gpr_cv_wait() local 80 if (now_ms >= deadline_ms) { in gpr_cv_wait() 83 if ((deadline_ms - now_ms) >= INFINITE) { in gpr_cv_wait() 86 timeout_max_ms = (DWORD)(deadline_ms - now_ms); in gpr_cv_wait()
|
/external/webrtc/webrtc/modules/rtp_rtcp/source/ |
D | remote_ntp_time_estimator.cc | 68 int64_t now_ms = clock_->TimeInMilliseconds(); in Estimate() local 69 if (now_ms - last_timing_log_ms_ > kTimingLogIntervalMs) { in Estimate() 74 last_timing_log_ms_ = now_ms; in Estimate()
|