| Index: webrtc/modules/remote_bitrate_estimator/inter_arrival.cc
|
| diff --git a/webrtc/modules/remote_bitrate_estimator/inter_arrival.cc b/webrtc/modules/remote_bitrate_estimator/inter_arrival.cc
|
| index a9d0f8860d26256b917cb03fa2f92254f981f450..961d6bfb8e90d29faf25561249de2393a13e7a69 100644
|
| --- a/webrtc/modules/remote_bitrate_estimator/inter_arrival.cc
|
| +++ b/webrtc/modules/remote_bitrate_estimator/inter_arrival.cc
|
| @@ -31,10 +31,13 @@
|
|
|
| bool InterArrival::ComputeDeltas(uint32_t timestamp,
|
| int64_t arrival_time_ms,
|
| + size_t packet_size,
|
| uint32_t* timestamp_delta,
|
| - int64_t* arrival_time_delta_ms) {
|
| + int64_t* arrival_time_delta_ms,
|
| + int* packet_size_delta) {
|
| assert(timestamp_delta != NULL);
|
| assert(arrival_time_delta_ms != NULL);
|
| + assert(packet_size_delta != NULL);
|
| bool calculated_deltas = false;
|
| if (current_timestamp_group_.IsFirstPacket()) {
|
| // We don't have enough data to update the filter, so we store it until we
|
| @@ -59,19 +62,23 @@
|
| return false;
|
| }
|
| assert(*arrival_time_delta_ms >= 0);
|
| + *packet_size_delta = static_cast<int>(current_timestamp_group_.size) -
|
| + static_cast<int>(prev_timestamp_group_.size);
|
| calculated_deltas = true;
|
| }
|
| prev_timestamp_group_ = current_timestamp_group_;
|
| // The new timestamp is now the current frame.
|
| current_timestamp_group_.first_timestamp = timestamp;
|
| current_timestamp_group_.timestamp = timestamp;
|
| + current_timestamp_group_.size = 0;
|
| }
|
| else {
|
| current_timestamp_group_.timestamp = LatestTimestamp(
|
| current_timestamp_group_.timestamp, timestamp);
|
| }
|
| - current_timestamp_group_.complete_time_ms =
|
| - std::max(current_timestamp_group_.complete_time_ms, arrival_time_ms);
|
| + // Accumulate the frame size.
|
| + current_timestamp_group_.size += packet_size;
|
| + current_timestamp_group_.complete_time_ms = arrival_time_ms;
|
|
|
| return calculated_deltas;
|
| }
|
|
|