Merge third_party/webrtc from https://chromium.googlesource.com/external/webrtc/trunk/webrtc.git at b831a9e3d5f9f0563d249b726cffa8a070e58aee

This commit was generated by merge_from_chromium.py.

Change-Id: I6d6255972e3c34e7797e9b46fbc3c0fe7e552d43
diff --git a/call.h b/call.h
index f21425f..c6596f8 100644
--- a/call.h
+++ b/call.h
@@ -88,6 +88,14 @@
     int stream_start_bitrate_bps;
   };
 
+  struct Stats {
+    Stats() : send_bandwidth_bps(0), recv_bandwidth_bps(0), pacer_delay_ms(0) {}
+
+    int send_bandwidth_bps;
+    int recv_bandwidth_bps;
+    int pacer_delay_ms;
+  };
+
   static Call* Create(const Call::Config& config);
 
   static Call* Create(const Call::Config& config,
@@ -109,13 +117,9 @@
   // Call instance exists.
   virtual PacketReceiver* Receiver() = 0;
 
-  // Returns the estimated total send bandwidth. Note: this can differ from the
-  // actual encoded bitrate.
-  virtual uint32_t SendBitrateEstimate() = 0;
-
-  // Returns the total estimated receive bandwidth for the call. Note: this can
-  // differ from the actual receive bitrate.
-  virtual uint32_t ReceiveBitrateEstimate() = 0;
+  // Returns the call statistics, such as estimated send and receive bandwidth,
+  // pacing delay, etc.
+  virtual Stats GetStats() const = 0;
 
   virtual void SignalNetworkState(NetworkState state) = 0;
 
diff --git a/common_types.h b/common_types.h
index 7bcfd6d..0b4af26 100644
--- a/common_types.h
+++ b/common_types.h
@@ -271,7 +271,9 @@
  public:
   virtual ~BitrateStatisticsObserver() {}
 
-  virtual void Notify(const BitrateStatistics& stats, uint32_t ssrc) = 0;
+  virtual void Notify(const BitrateStatistics& total_stats,
+                      const BitrateStatistics& retransmit_stats,
+                      uint32_t ssrc) = 0;
 };
 
 // Callback, used to notify an observer whenever frame counts have been updated
diff --git a/config.h b/config.h
index 8ea2828..ee1097f 100644
--- a/config.h
+++ b/config.h
@@ -33,16 +33,19 @@
   int extended_max_sequence_number;
 };
 
-struct StreamStats {
-  StreamStats()
+struct SsrcStats {
+  SsrcStats()
       : key_frames(0),
         delta_frames(0),
-        bitrate_bps(0),
+        total_bitrate_bps(0),
+        retransmit_bitrate_bps(0),
         avg_delay_ms(0),
         max_delay_ms(0) {}
   uint32_t key_frames;
   uint32_t delta_frames;
-  int32_t bitrate_bps;
+  // TODO(holmer): Move bitrate_bps out to the webrtc::Call layer.
+  int total_bitrate_bps;
+  int retransmit_bitrate_bps;
   int avg_delay_ms;
   int max_delay_ms;
   StreamDataCounters rtp_stats;
diff --git a/modules/bitrate_controller/send_side_bandwidth_estimation.cc b/modules/bitrate_controller/send_side_bandwidth_estimation.cc
index 47a79ad..9b55dad 100644
--- a/modules/bitrate_controller/send_side_bandwidth_estimation.cc
+++ b/modules/bitrate_controller/send_side_bandwidth_estimation.cc
@@ -22,6 +22,7 @@
 enum { kLimitNumPackets = 20 };
 enum { kAvgPacketSizeBytes = 1000 };
 enum { kStartPhaseMs = 2000 };
+enum { kBweConverganceTimeMs = 20000 };
 
 // Calculate the rate that TCP-Friendly Rate Control (TFRC) would apply.
 // The formula in RFC 3448, Section 3.1, is used.
@@ -61,7 +62,8 @@
       time_last_decrease_ms_(0),
       first_report_time_ms_(-1),
       initially_lost_packets_(0),
-      uma_updated_(false) {
+      bitrate_at_2_seconds_kbps_(0),
+      uma_update_state_(kNoUpdate) {
 }
 
 SendSideBandwidthEstimation::~SendSideBandwidthEstimation() {}
@@ -130,18 +132,35 @@
 
   if (first_report_time_ms_ == -1) {
     first_report_time_ms_ = now_ms;
-  } else if (IsInStartPhase(now_ms)) {
-    initially_lost_packets_ += (fraction_loss * number_of_packets) >> 8;
-  } else if (!uma_updated_) {
-    uma_updated_ = true;
+  } else {
+    UpdateUmaStats(now_ms, rtt, (fraction_loss * number_of_packets) >> 8);
+  }
+}
+
+void SendSideBandwidthEstimation::UpdateUmaStats(int64_t now_ms,
+                                                 int rtt,
+                                                 int lost_packets) {
+  if (IsInStartPhase(now_ms)) {
+    initially_lost_packets_ += lost_packets;
+  } else if (uma_update_state_ == kNoUpdate) {
+    uma_update_state_ = kFirstDone;
+    bitrate_at_2_seconds_kbps_ = (bitrate_ + 500) / 1000;
     RTC_HISTOGRAM_COUNTS(
         "WebRTC.BWE.InitiallyLostPackets", initially_lost_packets_, 0, 100, 50);
     RTC_HISTOGRAM_COUNTS("WebRTC.BWE.InitialRtt", rtt, 0, 2000, 50);
     RTC_HISTOGRAM_COUNTS("WebRTC.BWE.InitialBandwidthEstimate",
-                         (bitrate_ + 500) / 1000,
+                         bitrate_at_2_seconds_kbps_,
                          0,
                          2000,
                          50);
+  } else if (uma_update_state_ == kFirstDone &&
+             now_ms - first_report_time_ms_ >= kBweConverganceTimeMs) {
+    uma_update_state_ = kDone;
+    int bitrate_diff_kbps = std::max(
+        bitrate_at_2_seconds_kbps_ - static_cast<int>((bitrate_ + 500) / 1000),
+        0);
+    RTC_HISTOGRAM_COUNTS(
+        "WebRTC.BWE.InitialVsConvergedDiff", bitrate_diff_kbps, 0, 2000, 50);
   }
 }
 
diff --git a/modules/bitrate_controller/send_side_bandwidth_estimation.h b/modules/bitrate_controller/send_side_bandwidth_estimation.h
index 0fe3ae6..3361904 100644
--- a/modules/bitrate_controller/send_side_bandwidth_estimation.h
+++ b/modules/bitrate_controller/send_side_bandwidth_estimation.h
@@ -43,8 +43,12 @@
   void SetMinBitrate(uint32_t min_bitrate);
 
  private:
+  enum UmaState { kNoUpdate, kFirstDone, kDone };
+
   bool IsInStartPhase(int64_t now_ms) const;
 
+  void UpdateUmaStats(int64_t now_ms, int rtt, int lost_packets);
+
   // Returns the input bitrate capped to the thresholds defined by the max,
   // min and incoming bandwidth.
   uint32_t CapBitrateToThresholds(uint32_t bitrate);
@@ -72,7 +76,8 @@
   uint32_t time_last_decrease_ms_;
   int64_t first_report_time_ms_;
   int initially_lost_packets_;
-  bool uma_updated_;
+  int bitrate_at_2_seconds_kbps_;
+  UmaState uma_update_state_;
 };
 }  // namespace webrtc
 #endif  // WEBRTC_MODULES_BITRATE_CONTROLLER_SEND_SIDE_BANDWIDTH_ESTIMATION_H_
diff --git a/modules/pacing/bitrate_prober.cc b/modules/pacing/bitrate_prober.cc
index 04e71c5..51c87fb 100644
--- a/modules/pacing/bitrate_prober.cc
+++ b/modules/pacing/bitrate_prober.cc
@@ -55,16 +55,18 @@
     return;
   probe_bitrates_.clear();
   // Max number of packets used for probing.
-  const int kMaxProbeLength = 15;
-  const int kMaxNumProbes = 3;
-  const int kPacketsPerProbe = kMaxProbeLength / kMaxNumProbes;
-  const float kProbeBitrateMultipliers[kMaxNumProbes] = {2.5, 4, 6};
+  const int kMaxNumProbes = 2;
+  const int kPacketsPerProbe = 5;
+  const float kProbeBitrateMultipliers[kMaxNumProbes] = {3, 6};
   int bitrates_bps[kMaxNumProbes];
   std::stringstream bitrate_log;
   bitrate_log << "Start probing for bandwidth, bitrates:";
   for (int i = 0; i < kMaxNumProbes; ++i) {
     bitrates_bps[i] = kProbeBitrateMultipliers[i] * bitrate_bps;
     bitrate_log << " " << bitrates_bps[i];
+    // We need one extra to get 5 deltas for the first probe.
+    if (i == 0)
+      probe_bitrates_.push_back(bitrates_bps[i]);
     for (int j = 0; j < kPacketsPerProbe; ++j)
       probe_bitrates_.push_back(bitrates_bps[i]);
   }
diff --git a/modules/pacing/bitrate_prober_unittest.cc b/modules/pacing/bitrate_prober_unittest.cc
index 15b1cc5..fac6a72 100644
--- a/modules/pacing/bitrate_prober_unittest.cc
+++ b/modules/pacing/bitrate_prober_unittest.cc
@@ -30,17 +30,11 @@
   EXPECT_EQ(0, prober.TimeUntilNextProbe(now_ms));
   prober.PacketSent(now_ms, 1000);
 
-  for (int i = 0; i < 4; ++i) {
-    EXPECT_EQ(10, prober.TimeUntilNextProbe(now_ms));
-    now_ms += 5;
-    EXPECT_EQ(5, prober.TimeUntilNextProbe(now_ms));
-    now_ms += 5;
-    EXPECT_EQ(0, prober.TimeUntilNextProbe(now_ms));
-    prober.PacketSent(now_ms, 1000);
-  }
   for (int i = 0; i < 5; ++i) {
-    EXPECT_EQ(6, prober.TimeUntilNextProbe(now_ms));
-    now_ms += 6;
+    EXPECT_EQ(8, prober.TimeUntilNextProbe(now_ms));
+    now_ms += 4;
+    EXPECT_EQ(4, prober.TimeUntilNextProbe(now_ms));
+    now_ms += 4;
     EXPECT_EQ(0, prober.TimeUntilNextProbe(now_ms));
     prober.PacketSent(now_ms, 1000);
   }
diff --git a/modules/pacing/paced_sender_unittest.cc b/modules/pacing/paced_sender_unittest.cc
index 34787d1..fe16008 100644
--- a/modules/pacing/paced_sender_unittest.cc
+++ b/modules/pacing/paced_sender_unittest.cc
@@ -711,13 +711,14 @@
 };
 
 TEST_F(PacedSenderTest, ProbingWithInitialFrame) {
-  const int kNumPackets = 15;
+  const int kNumPackets = 11;
+  const int kNumDeltas = kNumPackets - 1;
   const int kPacketSize = 1200;
   const int kInitialBitrateKbps = 300;
   uint32_t ssrc = 12346;
   uint16_t sequence_number = 1234;
-  const int expected_deltas[kNumPackets - 1] = {
-      12, 12, 12, 12, 8, 8, 8, 8, 8, 5, 5, 5, 5, 5};
+  const int expected_deltas[kNumDeltas] = {
+      10, 10, 10, 10, 10, 5, 5, 5, 5, 5};
   std::list<int> expected_deltas_list(expected_deltas,
                                       expected_deltas + kNumPackets - 1);
   PacedSenderProbing callback(expected_deltas_list, &clock_);
diff --git a/modules/rtp_rtcp/source/rtp_sender.cc b/modules/rtp_rtcp/source/rtp_sender.cc
index 0438b9f..677f3fc 100644
--- a/modules/rtp_rtcp/source/rtp_sender.cc
+++ b/modules/rtp_rtcp/source/rtp_sender.cc
@@ -40,6 +40,57 @@
 
 }  // namespace
 
+class BitrateAggregator {
+ public:
+  explicit BitrateAggregator(BitrateStatisticsObserver* bitrate_callback)
+      : callback_(bitrate_callback),
+        total_bitrate_observer_(*this),
+        retransmit_bitrate_observer_(*this),
+        ssrc_(0) {}
+
+  void OnStatsUpdated() const {
+    if (callback_)
+      callback_->Notify(total_bitrate_observer_.statistics(),
+                        retransmit_bitrate_observer_.statistics(),
+                        ssrc_);
+  }
+
+  Bitrate::Observer* total_bitrate_observer() {
+    return &total_bitrate_observer_;
+  }
+  Bitrate::Observer* retransmit_bitrate_observer() {
+    return &retransmit_bitrate_observer_;
+  }
+
+  void set_ssrc(uint32_t ssrc) { ssrc_ = ssrc; }
+
+ private:
+  // We assume that these observers are called on the same thread, which is
+  // true for RtpSender as they are called on the Process thread.
+  class BitrateObserver : public Bitrate::Observer {
+   public:
+    explicit BitrateObserver(const BitrateAggregator& aggregator)
+        : aggregator_(aggregator) {}
+
+    // Implements Bitrate::Observer.
+    virtual void BitrateUpdated(const BitrateStatistics& stats) OVERRIDE {
+      statistics_ = stats;
+      aggregator_.OnStatsUpdated();
+    }
+
+    BitrateStatistics statistics() const { return statistics_; }
+
+   private:
+    BitrateStatistics statistics_;
+    const BitrateAggregator& aggregator_;
+  };
+
+  BitrateStatisticsObserver* const callback_;
+  BitrateObserver total_bitrate_observer_;
+  BitrateObserver retransmit_bitrate_observer_;
+  uint32_t ssrc_;
+};
+
 RTPSender::RTPSender(const int32_t id,
                      const bool audio,
                      Clock* clock,
@@ -54,7 +105,8 @@
       // TickTime.
       clock_delta_ms_(clock_->TimeInMilliseconds() -
                       TickTime::MillisecondTimestamp()),
-      bitrate_sent_(clock, this),
+      bitrates_(new BitrateAggregator(bitrate_callback)),
+      total_bitrate_sent_(clock, bitrates_->total_bitrate_observer()),
       id_(id),
       audio_configured_(audio),
       audio_(NULL),
@@ -74,12 +126,11 @@
       // NACK.
       nack_byte_count_times_(),
       nack_byte_count_(),
-      nack_bitrate_(clock, NULL),
+      nack_bitrate_(clock, bitrates_->retransmit_bitrate_observer()),
       packet_history_(clock),
       // Statistics
       statistics_crit_(CriticalSectionWrapper::CreateCriticalSection()),
       rtp_stats_callback_(NULL),
-      bitrate_callback_(bitrate_callback),
       frame_count_observer_(frame_count_observer),
       send_side_delay_observer_(send_side_delay_observer),
       // RTP variables
@@ -108,6 +159,7 @@
   srand(static_cast<uint32_t>(clock_->TimeInMilliseconds()));
   ssrc_ = ssrc_db_.CreateSSRC();  // Can't be 0.
   ssrc_rtx_ = ssrc_db_.CreateSSRC();  // Can't be 0.
+  bitrates_->set_ssrc(ssrc_);
   // Random start, 16 bits. Can't be 0.
   sequence_number_rtx_ = static_cast<uint16_t>(rand() + 1) & 0x7FFF;
   sequence_number_ = static_cast<uint16_t>(rand() + 1) & 0x7FFF;
@@ -149,7 +201,7 @@
 }
 
 uint16_t RTPSender::ActualSendBitrateKbit() const {
-  return (uint16_t)(bitrate_sent_.BitrateNow() / 1000);
+  return (uint16_t)(total_bitrate_sent_.BitrateNow() / 1000);
 }
 
 uint32_t RTPSender::VideoBitrateSent() const {
@@ -864,7 +916,7 @@
     counters = &rtp_stats_;
   }
 
-  bitrate_sent_.Update(size);
+  total_bitrate_sent_.Update(size);
   ++counters->packets;
   if (IsFecPacket(buffer, header)) {
     ++counters->fec_packets;
@@ -997,7 +1049,7 @@
 
 void RTPSender::ProcessBitrate() {
   CriticalSectionScoped cs(send_critsect_);
-  bitrate_sent_.Process();
+  total_bitrate_sent_.Process();
   nack_bitrate_.Process();
   if (audio_configured_) {
     return;
@@ -1420,6 +1472,7 @@
       // Generate a new SSRC.
       ssrc_db_.ReturnSSRC(ssrc_);
       ssrc_ = ssrc_db_.CreateSSRC();  // Can't be 0.
+      bitrates_->set_ssrc(ssrc_);
     }
     // Don't initialize seq number if SSRC passed externally.
     if (!sequence_number_forced_ && !ssrc_forced_) {
@@ -1470,6 +1523,7 @@
     return 0;
   }
   ssrc_ = ssrc_db_.CreateSSRC();  // Can't be 0.
+  bitrates_->set_ssrc(ssrc_);
   return ssrc_;
 }
 
@@ -1484,6 +1538,7 @@
   ssrc_db_.ReturnSSRC(ssrc_);
   ssrc_db_.RegisterSSRC(ssrc);
   ssrc_ = ssrc;
+  bitrates_->set_ssrc(ssrc_);
   if (!sequence_number_forced_) {
     sequence_number_ =
         rand() / (RAND_MAX / MAX_INIT_RTP_SEQ_NUMBER);  // NOLINT
@@ -1681,17 +1736,8 @@
   return rtp_stats_callback_;
 }
 
-uint32_t RTPSender::BitrateSent() const { return bitrate_sent_.BitrateLast(); }
-
-void RTPSender::BitrateUpdated(const BitrateStatistics& stats) {
-  uint32_t ssrc;
-  {
-    CriticalSectionScoped ssrc_lock(send_critsect_);
-    ssrc = ssrc_;
-  }
-  if (bitrate_callback_) {
-    bitrate_callback_->Notify(stats, ssrc);
-  }
+uint32_t RTPSender::BitrateSent() const {
+  return total_bitrate_sent_.BitrateLast();
 }
 
 void RTPSender::SetRtpState(const RtpState& rtp_state) {
diff --git a/modules/rtp_rtcp/source/rtp_sender.h b/modules/rtp_rtcp/source/rtp_sender.h
index 780baa1..6564d47 100644
--- a/modules/rtp_rtcp/source/rtp_sender.h
+++ b/modules/rtp_rtcp/source/rtp_sender.h
@@ -31,6 +31,7 @@
 
 namespace webrtc {
 
+class BitrateAggregator;
 class CriticalSectionWrapper;
 class RTPSenderAudio;
 class RTPSenderVideo;
@@ -65,7 +66,7 @@
       PacedSender::Priority priority) = 0;
 };
 
-class RTPSender : public RTPSenderInterface, public Bitrate::Observer {
+class RTPSender : public RTPSenderInterface {
  public:
   RTPSender(const int32_t id, const bool audio, Clock *clock,
             Transport *transport, RtpAudioFeedback *audio_feedback,
@@ -276,8 +277,6 @@
 
   uint32_t BitrateSent() const;
 
-  virtual void BitrateUpdated(const BitrateStatistics& stats) OVERRIDE;
-
   void SetRtpState(const RtpState& rtp_state);
   RtpState GetRtpState() const;
   void SetRtxRtpState(const RtpState& rtp_state);
@@ -337,7 +336,9 @@
 
   Clock* clock_;
   int64_t clock_delta_ms_;
-  Bitrate bitrate_sent_;
+
+  scoped_ptr<BitrateAggregator> bitrates_;
+  Bitrate total_bitrate_sent_;
 
   int32_t id_;
   const bool audio_configured_;
@@ -375,7 +376,6 @@
   StreamDataCounters rtp_stats_ GUARDED_BY(statistics_crit_);
   StreamDataCounters rtx_rtp_stats_ GUARDED_BY(statistics_crit_);
   StreamDataCountersCallback* rtp_stats_callback_ GUARDED_BY(statistics_crit_);
-  BitrateStatisticsObserver* const bitrate_callback_;
   FrameCountObserver* const frame_count_observer_;
   SendSideDelayObserver* const send_side_delay_observer_;
 
diff --git a/modules/rtp_rtcp/source/rtp_sender_unittest.cc b/modules/rtp_rtcp/source/rtp_sender_unittest.cc
index 9c6a720..2a49477 100644
--- a/modules/rtp_rtcp/source/rtp_sender_unittest.cc
+++ b/modules/rtp_rtcp/source/rtp_sender_unittest.cc
@@ -855,20 +855,22 @@
 TEST_F(RtpSenderTest, BitrateCallbacks) {
   class TestCallback : public BitrateStatisticsObserver {
    public:
-    TestCallback()
-        : BitrateStatisticsObserver(), num_calls_(0), ssrc_(0), bitrate_() {}
+    TestCallback() : BitrateStatisticsObserver(), num_calls_(0), ssrc_(0) {}
     virtual ~TestCallback() {}
 
-    virtual void Notify(const BitrateStatistics& stats,
+    virtual void Notify(const BitrateStatistics& total_stats,
+                        const BitrateStatistics& retransmit_stats,
                         uint32_t ssrc) OVERRIDE {
       ++num_calls_;
       ssrc_ = ssrc;
-      bitrate_ = stats;
+      total_stats_ = total_stats;
+      retransmit_stats_ = retransmit_stats;
     }
 
     uint32_t num_calls_;
     uint32_t ssrc_;
-    BitrateStatistics bitrate_;
+    BitrateStatistics total_stats_;
+    BitrateStatistics retransmit_stats_;
   } callback;
   rtp_sender_.reset(new RTPSender(0, false, &fake_clock_, &transport_, NULL,
                                   &mock_paced_sender_, &callback, NULL, NULL));
@@ -909,13 +911,15 @@
 
   const uint32_t expected_packet_rate = 1000 / kPacketInterval;
 
-  EXPECT_EQ(1U, callback.num_calls_);
+  // We get one call for every stats updated, thus two calls since both the
+  // stream stats and the retransmit stats are updated once.
+  EXPECT_EQ(2u, callback.num_calls_);
   EXPECT_EQ(ssrc, callback.ssrc_);
   EXPECT_EQ(start_time + (kNumPackets * kPacketInterval),
-            callback.bitrate_.timestamp_ms);
-  EXPECT_EQ(expected_packet_rate, callback.bitrate_.packet_rate);
+            callback.total_stats_.timestamp_ms);
+  EXPECT_EQ(expected_packet_rate, callback.total_stats_.packet_rate);
   EXPECT_EQ((kPacketOverhead + sizeof(payload)) * 8 * expected_packet_rate,
-            callback.bitrate_.bitrate_bps);
+            callback.total_stats_.bitrate_bps);
 
   rtp_sender_.reset();
 }
diff --git a/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc b/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc
index 73f774d..420ef59 100644
--- a/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc
+++ b/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc
@@ -604,7 +604,7 @@
                      false, true, false);
   // Metrics for expected quality.
   QualityMetrics quality_metrics;
-  SetQualityMetrics(&quality_metrics, 37.5, 36.0, 0.94, 0.93);
+  SetQualityMetrics(&quality_metrics, 37.0, 36.0, 0.93, 0.92);
   // Metrics for rate control.
   RateControlMetrics rc_metrics[1];
   SetRateControlMetrics(rc_metrics, 0, 0, 40, 20, 10, 15, 0);
@@ -657,12 +657,12 @@
                      false, true, false);
   // Metrics for expected quality.
   QualityMetrics quality_metrics;
-  SetQualityMetrics(&quality_metrics, 36.0, 32.0, 0.90, 0.85);
+  SetQualityMetrics(&quality_metrics, 36.0, 31.8, 0.90, 0.85);
   // Metrics for rate control.
   RateControlMetrics rc_metrics[3];
   SetRateControlMetrics(rc_metrics, 0, 0, 30, 20, 20, 20, 0);
   SetRateControlMetrics(rc_metrics, 1, 2, 0, 20, 20, 60, 0);
-  SetRateControlMetrics(rc_metrics, 2, 0, 0, 20, 20, 30, 0);
+  SetRateControlMetrics(rc_metrics, 2, 0, 0, 20, 20, 40, 0);
   ProcessFramesAndVerify(quality_metrics,
                          rate_profile,
                          process_settings,
@@ -692,11 +692,11 @@
                      false, true, false);
   // Metrics for expected quality.
   QualityMetrics quality_metrics;
-  SetQualityMetrics(&quality_metrics, 30.0, 18.0, 0.80, 0.40);
+  SetQualityMetrics(&quality_metrics, 29.0, 17.0, 0.80, 0.40);
   // Metrics for rate control.
   RateControlMetrics rc_metrics[3];
-  SetRateControlMetrics(rc_metrics, 0, 35, 55, 70, 15, 40, 0);
-  SetRateControlMetrics(rc_metrics, 1, 15, 0, 50, 10, 30, 0);
+  SetRateControlMetrics(rc_metrics, 0, 50, 60, 100, 15, 45, 0);
+  SetRateControlMetrics(rc_metrics, 1, 30, 0, 65, 10, 35, 0);
   SetRateControlMetrics(rc_metrics, 2, 5, 0, 38, 10, 30, 0);
   ProcessFramesAndVerify(quality_metrics,
                          rate_profile,
diff --git a/modules/video_coding/codecs/vp9/vp9_impl.cc b/modules/video_coding/codecs/vp9/vp9_impl.cc
index 33f11a3..734e73d 100644
--- a/modules/video_coding/codecs/vp9/vp9_impl.cc
+++ b/modules/video_coding/codecs/vp9/vp9_impl.cc
@@ -189,11 +189,8 @@
     return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
   }
   // Only positive speeds, currently: 0 - 7.
-  // O means slowest/best quality, 7 means fastest/lowest quality.
-  // TODO(marpan): Speeds 5-7 are speed settings for real-time mode, on desktop.
-  // Currently set to 5, update to 6 (for faster encoding) after some subjective
-  // quality tests.
-  cpu_speed_ = 5;
+  // O means slowest/best quality, 7 means fastest/lower quality.
+  cpu_speed_ = 6;
   // Note: some of these codec controls still use "VP8" in the control name.
   // TODO(marpan): Update this in the next/future libvpx version.
   vpx_codec_control(encoder_, VP8E_SET_CPUUSED, cpu_speed_);
diff --git a/modules/video_coding/main/source/media_optimization.cc b/modules/video_coding/main/source/media_optimization.cc
index 0d9a4bd..5789480 100644
--- a/modules/video_coding/main/source/media_optimization.cc
+++ b/modules/video_coding/main/source/media_optimization.cc
@@ -542,7 +542,7 @@
       now_ms - encoded_frame_samples_.front().time_complete_ms);
   if (denom >= 1.0f) {
     avg_sent_bit_rate_bps_ =
-        static_cast<uint32_t>(framesize_sum * 8 * 1000 / denom + 0.5f);
+        static_cast<uint32_t>(framesize_sum * 8.0f * 1000.0f / denom + 0.5f);
   } else {
     avg_sent_bit_rate_bps_ = framesize_sum * 8;
   }
diff --git a/modules/video_render/android/video_render_android_native_opengl2.h b/modules/video_render/android/video_render_android_native_opengl2.h
index 66c5364..f5e5b57 100644
--- a/modules/video_render/android/video_render_android_native_opengl2.h
+++ b/modules/video_render/android/video_render_android_native_opengl2.h
@@ -41,7 +41,7 @@
   virtual void DeliverFrame(JNIEnv* jniEnv);
 
  private:
-  static jint CreateOpenGLNativeStatic(
+  static jint JNICALL CreateOpenGLNativeStatic(
       JNIEnv * env,
       jobject,
       jlong context,
@@ -49,7 +49,7 @@
       jint height);
   jint CreateOpenGLNative(int width, int height);
 
-  static void DrawNativeStatic(JNIEnv * env,jobject, jlong context);
+  static void JNICALL DrawNativeStatic(JNIEnv * env,jobject, jlong context);
   void DrawNative();
   uint32_t _id;
   CriticalSectionWrapper& _renderCritSect;
diff --git a/system_wrappers/source/trace_impl.cc b/system_wrappers/source/trace_impl.cc
index 13c63ac..d05b928 100644
--- a/system_wrappers/source/trace_impl.cc
+++ b/system_wrappers/source/trace_impl.cc
@@ -553,15 +553,6 @@
           trace_file_.Write(message, length);
           row_count_text_++;
         }
-        length = AddBuildInfo(message);
-        if (length != -1) {
-          message[length + 1] = 0;
-          message[length] = '\n';
-          message[length - 1] = '\n';
-          trace_file_.Write(message, length + 1);
-          row_count_text_++;
-          row_count_text_++;
-        }
       }
       uint16_t length = length_[local_queue_active][idx];
       message_queue_[local_queue_active][idx][length] = 0;
diff --git a/system_wrappers/source/trace_impl.h b/system_wrappers/source/trace_impl.h
index 5548e98..5fa6ce3 100644
--- a/system_wrappers/source/trace_impl.h
+++ b/system_wrappers/source/trace_impl.h
@@ -72,7 +72,6 @@
   virtual int32_t AddTime(char* trace_message,
                           const TraceLevel level) const = 0;
 
-  virtual int32_t AddBuildInfo(char* trace_message) const = 0;
   virtual int32_t AddDateTimeInfo(char* trace_message) const = 0;
 
   static bool Run(void* obj);
diff --git a/system_wrappers/source/trace_posix.cc b/system_wrappers/source/trace_posix.cc
index d14704b..1e0e1c8 100644
--- a/system_wrappers/source/trace_posix.cc
+++ b/system_wrappers/source/trace_posix.cc
@@ -17,20 +17,6 @@
 #include <sys/time.h>
 #include <time.h>
 
-#if defined(_DEBUG)
-#define BUILDMODE "d"
-#elif defined(DEBUG)
-#define BUILDMODE "d"
-#elif defined(NDEBUG)
-#define BUILDMODE "r"
-#else
-#define BUILDMODE "?"
-#endif
-#define BUILDTIME __TIME__
-#define BUILDDATE __DATE__
-// example: "Oct 10 2002 12:05:30 r"
-#define BUILDINFO BUILDDATE " " BUILDTIME " " BUILDMODE
-
 namespace webrtc {
 
 TracePosix::TracePosix()
@@ -86,12 +72,6 @@
   return 22;
 }
 
-int32_t TracePosix::AddBuildInfo(char* trace_message) const {
-  sprintf(trace_message, "Build info: %s", BUILDINFO);
-  // Include NULL termination (hence + 1).
-  return strlen(trace_message) + 1;
-}
-
 int32_t TracePosix::AddDateTimeInfo(char* trace_message) const {
   time_t t;
   time(&t);
diff --git a/system_wrappers/source/trace_posix.h b/system_wrappers/source/trace_posix.h
index 2056c70..2f0abc6 100644
--- a/system_wrappers/source/trace_posix.h
+++ b/system_wrappers/source/trace_posix.h
@@ -26,7 +26,6 @@
   virtual int32_t AddTime(char* trace_message, const TraceLevel level) const
       OVERRIDE;
 
-  virtual int32_t AddBuildInfo(char* trace_message) const OVERRIDE;
   virtual int32_t AddDateTimeInfo(char* trace_message) const OVERRIDE;
 
  private:
diff --git a/system_wrappers/source/trace_win.cc b/system_wrappers/source/trace_win.cc
index f1a03a5..3752659 100644
--- a/system_wrappers/source/trace_win.cc
+++ b/system_wrappers/source/trace_win.cc
@@ -15,20 +15,6 @@
 
 #include "Mmsystem.h"
 
-#if defined(_DEBUG)
-#define BUILDMODE "d"
-#elif defined(DEBUG)
-#define BUILDMODE "d"
-#elif defined(NDEBUG)
-#define BUILDMODE "r"
-#else
-#define BUILDMODE "?"
-#endif
-#define BUILDTIME __TIME__
-#define BUILDDATE __DATE__
-// Example: "Oct 10 2002 12:05:30 r"
-#define BUILDINFO BUILDDATE " " BUILDTIME " " BUILDMODE
-
 namespace webrtc {
 TraceWindows::TraceWindows()
     : prev_api_tick_count_(0),
@@ -84,13 +70,6 @@
   return 22;
 }
 
-int32_t TraceWindows::AddBuildInfo(char* trace_message) const {
-  // write data and time to text file
-  sprintf(trace_message, "Build info: %s", BUILDINFO);
-  // Include NULL termination (hence + 1).
-  return static_cast<int32_t>(strlen(trace_message) + 1);
-}
-
 int32_t TraceWindows::AddDateTimeInfo(char* trace_message) const {
   prev_api_tick_count_ = timeGetTime();
   prev_tick_count_ = prev_api_tick_count_;
diff --git a/system_wrappers/source/trace_win.h b/system_wrappers/source/trace_win.h
index 1a87107..1311b23 100644
--- a/system_wrappers/source/trace_win.h
+++ b/system_wrappers/source/trace_win.h
@@ -25,7 +25,6 @@
 
   virtual int32_t AddTime(char* trace_message, const TraceLevel level) const;
 
-  virtual int32_t AddBuildInfo(char* trace_message) const;
   virtual int32_t AddDateTimeInfo(char* trace_message) const;
  private:
   volatile mutable uint32_t prev_api_tick_count_;
diff --git a/test/BUILD.gn b/test/BUILD.gn
index db17c31..870404e 100644
--- a/test/BUILD.gn
+++ b/test/BUILD.gn
@@ -67,10 +67,7 @@
   ]
 
   if (is_android) {
-    sources += [ "testsupport/android/root_path_android_chromium.cc" ]
     deps += [ "//base:base" ]
-  } else {
-    sources += [ "testsupport/android/root_path_android.cc" ]
   }
 
   configs += [ "..:common_config" ]
diff --git a/test/encoder_settings.cc b/test/encoder_settings.cc
index db064bb..bae1350 100644
--- a/test/encoder_settings.cc
+++ b/test/encoder_settings.cc
@@ -60,6 +60,8 @@
   decoder.payload_name = encoder_settings.payload_name;
   if (encoder_settings.payload_name == "VP8") {
     decoder.decoder = VideoDecoder::Create(VideoDecoder::kVp8);
+  } else if (encoder_settings.payload_name == "VP9") {
+    decoder.decoder = VideoDecoder::Create(VideoDecoder::kVp9);
   } else {
     decoder.decoder = new FakeDecoder();
   }
diff --git a/test/fake_encoder.cc b/test/fake_encoder.cc
index 9551c82..0573c8a 100644
--- a/test/fake_encoder.cc
+++ b/test/fake_encoder.cc
@@ -51,7 +51,8 @@
   assert(config_.maxFramerate > 0);
   int time_since_last_encode_ms = 1000 / config_.maxFramerate;
   int64_t time_now_ms = clock_->TimeInMilliseconds();
-  if (last_encode_time_ms_ > 0) {
+  const bool first_encode = last_encode_time_ms_ == 0;
+  if (!first_encode) {
     // For all frames but the first we can estimate the display time by looking
     // at the display time of the previous frame.
     time_since_last_encode_ms = time_now_ms - last_encode_time_ms_;
@@ -80,6 +81,12 @@
     int stream_bits = (bits_available > max_stream_bits) ? max_stream_bits :
         bits_available;
     int stream_bytes = (stream_bits + 7) / 8;
+    if (first_encode) {
+      // The first frame is a key frame and should be larger.
+      // TODO(holmer): The FakeEncoder should store the bits_available between
+      // encodes so that it can compensate for oversized frames.
+      stream_bytes *= 10;
+    }
     if (static_cast<size_t>(stream_bytes) > sizeof(encoded_buffer_))
       stream_bytes = sizeof(encoded_buffer_);
 
@@ -96,7 +103,6 @@
     assert(callback_ != NULL);
     if (callback_->Encoded(encoded, &specifics, NULL) != 0)
       return -1;
-
     bits_available -= encoded._length * 8;
   }
   return 0;
diff --git a/test/test.gyp b/test/test.gyp
index 5c959b9..7aba2f5 100644
--- a/test/test.gyp
+++ b/test/test.gyp
@@ -98,8 +98,6 @@
         '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
       ],
       'sources': [
-        'testsupport/android/root_path_android.cc',
-        'testsupport/android/root_path_android_chromium.cc',
         'testsupport/fileutils.cc',
         'testsupport/fileutils.h',
         'testsupport/frame_reader.cc',
@@ -117,20 +115,6 @@
         'testsupport/trace_to_stderr.cc',
         'testsupport/trace_to_stderr.h',
       ],
-      'conditions': [
-        ['OS=="android"', {
-          'dependencies': [
-            '<(DEPTH)/base/base.gyp:base',
-          ],
-          'sources!': [
-            'testsupport/android/root_path_android.cc',
-          ],
-        }, {
-          'sources!': [
-            'testsupport/android/root_path_android_chromium.cc',
-          ],
-        }],
-      ],
     },
     {
       # Depend on this target when you want to have test_support but also the
diff --git a/test/testsupport/android/root_path_android.cc b/test/testsupport/android/root_path_android.cc
deleted file mode 100644
index 6eca5f5..0000000
--- a/test/testsupport/android/root_path_android.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- *  Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree. An additional intellectual property rights grant can be found
- *  in the file PATENTS.  All contributing project authors may
- *  be found in the AUTHORS file in the root of the source tree.
- */
-
-#include <string>
-
-namespace webrtc {
-namespace test {
-
-static const char* kRootDirName = "/sdcard/";
-std::string ProjectRootPathAndroid() {
-  return kRootDirName;
-}
-
-std::string OutputPathAndroid() {
-  return kRootDirName;
-}
-
-}  // namespace test
-}  // namespace webrtc
diff --git a/test/testsupport/android/root_path_android_chromium.cc b/test/testsupport/android/root_path_android_chromium.cc
deleted file mode 100644
index f8e65f4..0000000
--- a/test/testsupport/android/root_path_android_chromium.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *  Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree. An additional intellectual property rights grant can be found
- *  in the file PATENTS.  All contributing project authors may
- *  be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "base/android/path_utils.h"
-#include "base/files/file_path.h"
-
-namespace webrtc {
-namespace test {
-
-std::string OutputPathImpl();
-
-// This file is only compiled when running WebRTC tests in a Chromium workspace.
-// The Android testing framework will push files relative to the root path of
-// the Chromium workspace. The root path for webrtc is one directory up from
-// trunk/webrtc (in standalone) or src/third_party/webrtc (in Chromium).
-std::string ProjectRootPathAndroid() {
-  base::FilePath root_path;
-  base::android::GetExternalStorageDirectory(&root_path);
-  return root_path.value() + "/";
-}
-
-std::string OutputPathAndroid() {
-  return OutputPathImpl();
-}
-
-}  // namespace test
-}  // namespace webrtc
diff --git a/test/testsupport/fileutils.cc b/test/testsupport/fileutils.cc
index a3e6620..36ca391 100644
--- a/test/testsupport/fileutils.cc
+++ b/test/testsupport/fileutils.cc
@@ -50,15 +50,15 @@
 #endif
 
 #ifdef WEBRTC_ANDROID
-const char* kResourcesDirName = "resources";
+const char* kRootDirName = "/sdcard/";
 #else
 // The file we're looking for to identify the project root dir.
 const char* kProjectRootFileName = "DEPS";
-const char* kResourcesDirName = "resources";
-#endif
-
-const char* kFallbackPath = "./";
 const char* kOutputDirName = "out";
+const char* kFallbackPath = "./";
+#endif
+const char* kResourcesDirName = "resources";
+
 char relative_dir_path[FILENAME_MAX];
 bool relative_dir_path_set = false;
 
@@ -66,9 +66,6 @@
 
 const char* kCannotFindProjectRootDir = "ERROR_CANNOT_FIND_PROJECT_ROOT_DIR";
 
-std::string OutputPathAndroid();
-std::string ProjectRootPathAndroid();
-
 void SetExecutablePath(const std::string& path) {
   std::string working_dir = WorkingDir();
   std::string temp_path = path;
@@ -95,30 +92,18 @@
   return stat(file_name.c_str(), &file_info) == 0;
 }
 
-std::string OutputPathImpl() {
-  std::string path = ProjectRootPath();
-  if (path == kCannotFindProjectRootDir) {
-    return kFallbackPath;
-  }
-  path += kOutputDirName;
-  if (!CreateDir(path)) {
-    return kFallbackPath;
-  }
-  return path + kPathDelimiter;
-}
-
 #ifdef WEBRTC_ANDROID
 
 std::string ProjectRootPath() {
-  return ProjectRootPathAndroid();
+  return kRootDirName;
 }
 
 std::string OutputPath() {
-  return OutputPathAndroid();
+  return kRootDirName;
 }
 
 std::string WorkingDir() {
-  return ProjectRootPath();
+  return kRootDirName;
 }
 
 #else // WEBRTC_ANDROID
@@ -148,7 +133,15 @@
 }
 
 std::string OutputPath() {
-  return OutputPathImpl();
+  std::string path = ProjectRootPath();
+  if (path == kCannotFindProjectRootDir) {
+    return kFallbackPath;
+  }
+  path += kOutputDirName;
+  if (!CreateDir(path)) {
+    return kFallbackPath;
+  }
+  return path + kPathDelimiter;
 }
 
 std::string WorkingDir() {
diff --git a/test/testsupport/fileutils_unittest.cc b/test/testsupport/fileutils_unittest.cc
index 114f108..dff7f22 100644
--- a/test/testsupport/fileutils_unittest.cc
+++ b/test/testsupport/fileutils_unittest.cc
@@ -66,7 +66,7 @@
 }
 
 // Similar to the above test, but for the output dir
-TEST_F(FileUtilsTest, OutputPathFromUnchangedWorkingDir) {
+TEST_F(FileUtilsTest, DISABLED_ON_ANDROID(OutputPathFromUnchangedWorkingDir)) {
   std::string path = webrtc::test::OutputPath();
   std::string expected_end = "out";
   expected_end = kPathDelimiter + expected_end + kPathDelimiter;
@@ -80,10 +80,11 @@
   ASSERT_EQ("./", webrtc::test::OutputPath());
 }
 
-TEST_F(FileUtilsTest, DISABLED_ON_ANDROID(TempFilename)) {
+TEST_F(FileUtilsTest, TempFilename) {
   std::string temp_filename = webrtc::test::TempFilename(
       webrtc::test::OutputPath(), "TempFilenameTest");
-  ASSERT_TRUE(webrtc::test::FileExists(temp_filename));
+  ASSERT_TRUE(webrtc::test::FileExists(temp_filename))
+      << "Couldn't find file: " << temp_filename;
   remove(temp_filename.c_str());
 }
 
diff --git a/video/call.cc b/video/call.cc
index fd41d75..2b4f76f 100644
--- a/video/call.cc
+++ b/video/call.cc
@@ -58,6 +58,8 @@
   switch (codec_type) {
     case kVp8:
       return VP8Decoder::Create();
+    case kVp9:
+      return VP9Decoder::Create();
   }
   assert(false);
   return NULL;
@@ -112,8 +114,7 @@
   virtual void DestroyVideoReceiveStream(
       webrtc::VideoReceiveStream* receive_stream) OVERRIDE;
 
-  virtual uint32_t SendBitrateEstimate() OVERRIDE;
-  virtual uint32_t ReceiveBitrateEstimate() OVERRIDE;
+  virtual Stats GetStats() const OVERRIDE;
 
   virtual DeliveryStatus DeliverPacket(const uint8_t* packet,
                                        size_t length) OVERRIDE;
@@ -319,14 +320,26 @@
   delete receive_stream_impl;
 }
 
-uint32_t Call::SendBitrateEstimate() {
-  // TODO(pbos): Return send-bitrate estimate
-  return 0;
-}
-
-uint32_t Call::ReceiveBitrateEstimate() {
-  // TODO(pbos): Return receive-bitrate estimate
-  return 0;
+Call::Stats Call::GetStats() const {
+  Stats stats;
+  // Ignoring return values.
+  uint32_t send_bandwidth = 0;
+  rtp_rtcp_->GetEstimatedSendBandwidth(base_channel_id_, &send_bandwidth);
+  stats.send_bandwidth_bps = send_bandwidth;
+  uint32_t recv_bandwidth = 0;
+  rtp_rtcp_->GetEstimatedReceiveBandwidth(base_channel_id_, &recv_bandwidth);
+  stats.recv_bandwidth_bps = recv_bandwidth;
+  {
+    ReadLockScoped read_lock(*send_crit_);
+    for (std::map<uint32_t, VideoSendStream*>::const_iterator it =
+             send_ssrcs_.begin();
+         it != send_ssrcs_.end();
+         ++it) {
+      stats.pacer_delay_ms =
+          std::max(it->second->GetPacerQueuingDelayMs(), stats.pacer_delay_ms);
+    }
+  }
+  return stats;
 }
 
 void Call::SignalNetworkState(NetworkState state) {
diff --git a/video/call_perf_tests.cc b/video/call_perf_tests.cc
index 9776fb7..9194b08 100644
--- a/video/call_perf_tests.cc
+++ b/video/call_perf_tests.cc
@@ -502,7 +502,8 @@
       VideoSendStream::Stats stats = send_stream_->GetStats();
       if (stats.substreams.size() > 0) {
         assert(stats.substreams.size() == 1);
-        int bitrate_kbps = stats.substreams.begin()->second.bitrate_bps / 1000;
+        int bitrate_kbps =
+            stats.substreams.begin()->second.total_bitrate_bps / 1000;
         if (bitrate_kbps > 0) {
           test::PrintResult(
               "bitrate_stats_",
diff --git a/video/end_to_end_tests.cc b/video/end_to_end_tests.cc
index 96249c3..2b3c00f 100644
--- a/video/end_to_end_tests.cc
+++ b/video/end_to_end_tests.cc
@@ -225,8 +225,7 @@
   DestroyStreams();
 }
 
-// TODO(marpan): Re-enable this test on the next libvpx roll.
-TEST_F(EndToEndTest, DISABLED_SendsAndReceivesVP9) {
+TEST_F(EndToEndTest, SendsAndReceivesVP9) {
   class VP9Observer : public test::EndToEndTest, public VideoRenderer {
    public:
     VP9Observer()
@@ -1202,6 +1201,53 @@
   RunBaseTest(&test);
 }
 
+TEST_F(EndToEndTest, VerifyBandwidthStats) {
+  class RtcpObserver : public test::EndToEndTest, public PacketReceiver {
+   public:
+    RtcpObserver()
+        : EndToEndTest(kDefaultTimeoutMs),
+          sender_call_(NULL),
+          receiver_call_(NULL),
+          has_seen_pacer_delay_(false) {}
+
+    virtual DeliveryStatus DeliverPacket(const uint8_t* packet,
+                                         size_t length) OVERRIDE {
+      Call::Stats sender_stats = sender_call_->GetStats();
+      Call::Stats receiver_stats = receiver_call_->GetStats();
+      if (!has_seen_pacer_delay_)
+        has_seen_pacer_delay_ = sender_stats.pacer_delay_ms > 0;
+      if (sender_stats.send_bandwidth_bps > 0 &&
+          receiver_stats.recv_bandwidth_bps > 0 && has_seen_pacer_delay_)
+        observation_complete_->Set();
+      return receiver_call_->Receiver()->DeliverPacket(packet, length);
+    }
+
+    virtual void OnCallsCreated(Call* sender_call,
+                                Call* receiver_call) OVERRIDE {
+      sender_call_ = sender_call;
+      receiver_call_ = receiver_call;
+    }
+
+    virtual void PerformTest() OVERRIDE {
+      EXPECT_EQ(kEventSignaled, Wait()) << "Timed out while waiting for "
+                                           "non-zero bandwidth stats.";
+    }
+
+    virtual void SetReceivers(
+        PacketReceiver* send_transport_receiver,
+        PacketReceiver* receive_transport_receiver) OVERRIDE {
+      test::RtpRtcpObserver::SetReceivers(this, receive_transport_receiver);
+    }
+
+   private:
+    Call* sender_call_;
+    Call* receiver_call_;
+    bool has_seen_pacer_delay_;
+  } test;
+
+  RunBaseTest(&test);
+}
+
 void EndToEndTest::TestXrReceiverReferenceTimeReport(bool enable_rrtr) {
   static const int kNumRtcpReportPacketsToObserve = 5;
   class RtcpXrObserver : public test::EndToEndTest {
@@ -1434,7 +1480,7 @@
       // Make sure all fields have been populated.
 
       receive_stats_filled_["IncomingRate"] |=
-          stats.network_frame_rate != 0 || stats.bitrate_bps != 0;
+          stats.network_frame_rate != 0 || stats.total_bitrate_bps != 0;
 
       receive_stats_filled_["FrameCallback"] |= stats.decode_frame_rate != 0;
 
@@ -1465,7 +1511,7 @@
       send_stats_filled_["NumStreams"] |=
           stats.substreams.size() == expected_send_ssrcs_.size();
 
-      for (std::map<uint32_t, StreamStats>::const_iterator it =
+      for (std::map<uint32_t, SsrcStats>::const_iterator it =
                stats.substreams.begin();
            it != stats.substreams.end();
            ++it) {
@@ -1475,7 +1521,7 @@
         send_stats_filled_[CompoundKey("IncomingRate", it->first)] |=
             stats.input_frame_rate != 0;
 
-        const StreamStats& stream_stats = it->second;
+        const SsrcStats& stream_stats = it->second;
 
         send_stats_filled_[CompoundKey("StatisticsUpdated", it->first)] |=
             stream_stats.rtcp_stats.cumulative_lost != 0 ||
@@ -1490,7 +1536,7 @@
 
         send_stats_filled_[CompoundKey("BitrateStatisticsObserver",
                                        it->first)] |=
-            stream_stats.bitrate_bps != 0;
+            stream_stats.total_bitrate_bps != 0;
 
         send_stats_filled_[CompoundKey("FrameCountObserver", it->first)] |=
             stream_stats.delta_frames != 0 || stream_stats.key_frames != 0;
diff --git a/video/loopback.cc b/video/loopback.cc
index 4b49c31..8013833 100644
--- a/video/loopback.cc
+++ b/video/loopback.cc
@@ -142,6 +142,8 @@
   scoped_ptr<VideoEncoder> encoder;
   if (flags::Codec() == "VP8") {
     encoder.reset(VideoEncoder::Create(VideoEncoder::kVp8));
+  } else if (flags::Codec() == "VP9") {
+    encoder.reset(VideoEncoder::Create(VideoEncoder::kVp9));
   } else {
     // Codec not supported.
     assert(false && "Codec not supported!");
diff --git a/video/receive_statistics_proxy.cc b/video/receive_statistics_proxy.cc
index 3826283..ca0bcdf 100644
--- a/video/receive_statistics_proxy.cc
+++ b/video/receive_statistics_proxy.cc
@@ -58,10 +58,10 @@
 
 void ReceiveStatisticsProxy::IncomingRate(const int video_channel,
                                           const unsigned int framerate,
-                                          const unsigned int bitrate) {
+                                          const unsigned int bitrate_bps) {
   CriticalSectionScoped lock(crit_.get());
   stats_.network_frame_rate = framerate;
-  stats_.bitrate_bps = bitrate;
+  stats_.total_bitrate_bps = bitrate_bps;
 }
 
 void ReceiveStatisticsProxy::StatisticsUpdated(
diff --git a/video/receive_statistics_proxy.h b/video/receive_statistics_proxy.h
index b5fbf86..a1b6735 100644
--- a/video/receive_statistics_proxy.h
+++ b/video/receive_statistics_proxy.h
@@ -52,7 +52,7 @@
                                     const VideoCodec& video_codec) OVERRIDE {}
   virtual void IncomingRate(const int video_channel,
                             const unsigned int framerate,
-                            const unsigned int bitrate) OVERRIDE;
+                            const unsigned int bitrate_bps) OVERRIDE;
   virtual void DecoderTiming(int decode_ms,
                              int max_decode_ms,
                              int current_delay_ms,
diff --git a/video/send_statistics_proxy.cc b/video/send_statistics_proxy.cc
index 1b6081d..f2df0ed 100644
--- a/video/send_statistics_proxy.cc
+++ b/video/send_statistics_proxy.cc
@@ -29,6 +29,7 @@
                                        const unsigned int bitrate) {
   CriticalSectionScoped lock(crit_.get());
   stats_.encode_frame_rate = framerate;
+  stats_.media_bitrate_bps = bitrate;
 }
 
 void SendStatisticsProxy::SuspendChange(int video_channel, bool is_suspended) {
@@ -47,8 +48,8 @@
   return stats_;
 }
 
-StreamStats* SendStatisticsProxy::GetStatsEntry(uint32_t ssrc) {
-  std::map<uint32_t, StreamStats>::iterator it = stats_.substreams.find(ssrc);
+SsrcStats* SendStatisticsProxy::GetStatsEntry(uint32_t ssrc) {
+  std::map<uint32_t, SsrcStats>::iterator it = stats_.substreams.find(ssrc);
   if (it != stats_.substreams.end())
     return &it->second;
 
@@ -66,7 +67,7 @@
 void SendStatisticsProxy::StatisticsUpdated(const RtcpStatistics& statistics,
                                             uint32_t ssrc) {
   CriticalSectionScoped lock(crit_.get());
-  StreamStats* stats = GetStatsEntry(ssrc);
+  SsrcStats* stats = GetStatsEntry(ssrc);
   if (stats == NULL)
     return;
 
@@ -77,28 +78,30 @@
     const StreamDataCounters& counters,
     uint32_t ssrc) {
   CriticalSectionScoped lock(crit_.get());
-  StreamStats* stats = GetStatsEntry(ssrc);
+  SsrcStats* stats = GetStatsEntry(ssrc);
   if (stats == NULL)
     return;
 
   stats->rtp_stats = counters;
 }
 
-void SendStatisticsProxy::Notify(const BitrateStatistics& bitrate,
+void SendStatisticsProxy::Notify(const BitrateStatistics& total_stats,
+                                 const BitrateStatistics& retransmit_stats,
                                  uint32_t ssrc) {
   CriticalSectionScoped lock(crit_.get());
-  StreamStats* stats = GetStatsEntry(ssrc);
+  SsrcStats* stats = GetStatsEntry(ssrc);
   if (stats == NULL)
     return;
 
-  stats->bitrate_bps = bitrate.bitrate_bps;
+  stats->total_bitrate_bps = total_stats.bitrate_bps;
+  stats->retransmit_bitrate_bps = retransmit_stats.bitrate_bps;
 }
 
 void SendStatisticsProxy::FrameCountUpdated(FrameType frame_type,
                                             uint32_t frame_count,
                                             const unsigned int ssrc) {
   CriticalSectionScoped lock(crit_.get());
-  StreamStats* stats = GetStatsEntry(ssrc);
+  SsrcStats* stats = GetStatsEntry(ssrc);
   if (stats == NULL)
     return;
 
@@ -120,7 +123,7 @@
                                                int max_delay_ms,
                                                uint32_t ssrc) {
   CriticalSectionScoped lock(crit_.get());
-  StreamStats* stats = GetStatsEntry(ssrc);
+  SsrcStats* stats = GetStatsEntry(ssrc);
   if (stats == NULL)
     return;
   stats->avg_delay_ms = avg_delay_ms;
diff --git a/video/send_statistics_proxy.h b/video/send_statistics_proxy.h
index ef459da..2f645b1 100644
--- a/video/send_statistics_proxy.h
+++ b/video/send_statistics_proxy.h
@@ -46,7 +46,9 @@
                                    uint32_t ssrc) OVERRIDE;
 
   // From BitrateStatisticsObserver.
-  virtual void Notify(const BitrateStatistics& stats, uint32_t ssrc) OVERRIDE;
+  virtual void Notify(const BitrateStatistics& total_stats,
+                      const BitrateStatistics& retransmit_stats,
+                      uint32_t ssrc) OVERRIDE;
 
   // From FrameCountObserver.
   virtual void FrameCountUpdated(FrameType frame_type,
@@ -75,7 +77,7 @@
                                     uint32_t ssrc) OVERRIDE;
 
  private:
-  StreamStats* GetStatsEntry(uint32_t ssrc) EXCLUSIVE_LOCKS_REQUIRED(crit_);
+  SsrcStats* GetStatsEntry(uint32_t ssrc) EXCLUSIVE_LOCKS_REQUIRED(crit_);
 
   const VideoSendStream::Config config_;
   scoped_ptr<CriticalSectionWrapper> crit_;
diff --git a/video/send_statistics_proxy_unittest.cc b/video/send_statistics_proxy_unittest.cc
index f768452..d7750f8 100644
--- a/video/send_statistics_proxy_unittest.cc
+++ b/video/send_statistics_proxy_unittest.cc
@@ -44,22 +44,23 @@
   void ExpectEqual(VideoSendStream::Stats one, VideoSendStream::Stats other) {
     EXPECT_EQ(one.input_frame_rate, other.input_frame_rate);
     EXPECT_EQ(one.encode_frame_rate, other.encode_frame_rate);
+    EXPECT_EQ(one.media_bitrate_bps, other.media_bitrate_bps);
     EXPECT_EQ(one.suspended, other.suspended);
 
     EXPECT_EQ(one.substreams.size(), other.substreams.size());
-    for (std::map<uint32_t, StreamStats>::const_iterator it =
+    for (std::map<uint32_t, SsrcStats>::const_iterator it =
              one.substreams.begin();
          it != one.substreams.end();
          ++it) {
-      std::map<uint32_t, StreamStats>::const_iterator corresponding_it =
+      std::map<uint32_t, SsrcStats>::const_iterator corresponding_it =
           other.substreams.find(it->first);
       ASSERT_TRUE(corresponding_it != other.substreams.end());
-      const StreamStats& a = it->second;
-      const StreamStats& b = corresponding_it->second;
+      const SsrcStats& a = it->second;
+      const SsrcStats& b = corresponding_it->second;
 
       EXPECT_EQ(a.key_frames, b.key_frames);
       EXPECT_EQ(a.delta_frames, b.delta_frames);
-      EXPECT_EQ(a.bitrate_bps, b.bitrate_bps);
+      EXPECT_EQ(a.total_bitrate_bps, b.total_bitrate_bps);
       EXPECT_EQ(a.avg_delay_ms, b.avg_delay_ms);
       EXPECT_EQ(a.max_delay_ms, b.max_delay_ms);
 
@@ -84,7 +85,7 @@
   int avg_delay_ms_;
   int max_delay_ms_;
   VideoSendStream::Stats expected_;
-  typedef std::map<uint32_t, StreamStats>::const_iterator StreamIterator;
+  typedef std::map<uint32_t, SsrcStats>::const_iterator StreamIterator;
 };
 
 TEST_F(SendStatisticsProxyTest, RtcpStatistics) {
@@ -93,7 +94,7 @@
        it != config_.rtp.ssrcs.end();
        ++it) {
     const uint32_t ssrc = *it;
-    StreamStats& ssrc_stats = expected_.substreams[ssrc];
+    SsrcStats& ssrc_stats = expected_.substreams[ssrc];
 
     // Add statistics with some arbitrary, but unique, numbers.
     uint32_t offset = ssrc * sizeof(RtcpStatistics);
@@ -107,7 +108,7 @@
        it != config_.rtp.rtx.ssrcs.end();
        ++it) {
     const uint32_t ssrc = *it;
-    StreamStats& ssrc_stats = expected_.substreams[ssrc];
+    SsrcStats& ssrc_stats = expected_.substreams[ssrc];
 
     // Add statistics with some arbitrary, but unique, numbers.
     uint32_t offset = ssrc * sizeof(RtcpStatistics);
@@ -121,17 +122,25 @@
   ExpectEqual(expected_, stats);
 }
 
-TEST_F(SendStatisticsProxyTest, FrameRates) {
+TEST_F(SendStatisticsProxyTest, CaptureFramerate) {
   const int capture_fps = 31;
-  const int encode_fps = 29;
 
   ViECaptureObserver* capture_observer = statistics_proxy_.get();
   capture_observer->CapturedFrameRate(0, capture_fps);
-  ViEEncoderObserver* encoder_observer = statistics_proxy_.get();
-  encoder_observer->OutgoingRate(0, encode_fps, 0);
 
   VideoSendStream::Stats stats = statistics_proxy_->GetStats();
   EXPECT_EQ(capture_fps, stats.input_frame_rate);
+}
+
+TEST_F(SendStatisticsProxyTest, EncodedBitrateAndFramerate) {
+  const int media_bitrate_bps = 500;
+  const int encode_fps = 29;
+
+  ViEEncoderObserver* encoder_observer = statistics_proxy_.get();
+  encoder_observer->OutgoingRate(0, encode_fps, media_bitrate_bps);
+
+  VideoSendStream::Stats stats = statistics_proxy_->GetStats();
+  EXPECT_EQ(media_bitrate_bps, stats.media_bitrate_bps);
   EXPECT_EQ(encode_fps, stats.encode_frame_rate);
 }
 
@@ -156,8 +165,8 @@
        ++it) {
     const uint32_t ssrc = *it;
     // Add statistics with some arbitrary, but unique, numbers.
-    StreamStats& stats = expected_.substreams[ssrc];
-    uint32_t offset = ssrc * sizeof(StreamStats);
+    SsrcStats& stats = expected_.substreams[ssrc];
+    uint32_t offset = ssrc * sizeof(SsrcStats);
     stats.key_frames = offset;
     stats.delta_frames = offset + 1;
     observer->FrameCountUpdated(kVideoFrameKey, stats.key_frames, ssrc);
@@ -168,8 +177,8 @@
        ++it) {
     const uint32_t ssrc = *it;
     // Add statistics with some arbitrary, but unique, numbers.
-    StreamStats& stats = expected_.substreams[ssrc];
-    uint32_t offset = ssrc * sizeof(StreamStats);
+    SsrcStats& stats = expected_.substreams[ssrc];
+    uint32_t offset = ssrc * sizeof(SsrcStats);
     stats.key_frames = offset;
     stats.delta_frames = offset + 1;
     observer->FrameCountUpdated(kVideoFrameKey, stats.key_frames, ssrc);
@@ -223,21 +232,27 @@
        it != config_.rtp.ssrcs.end();
        ++it) {
     const uint32_t ssrc = *it;
-    BitrateStatistics bitrate;
+    BitrateStatistics total;
+    BitrateStatistics retransmit;
     // Use ssrc as bitrate_bps to get a unique value for each stream.
-    bitrate.bitrate_bps = ssrc;
-    observer->Notify(bitrate, ssrc);
-    expected_.substreams[ssrc].bitrate_bps = ssrc;
+    total.bitrate_bps = ssrc;
+    retransmit.bitrate_bps = ssrc + 1;
+    observer->Notify(total, retransmit, ssrc);
+    expected_.substreams[ssrc].total_bitrate_bps = total.bitrate_bps;
+    expected_.substreams[ssrc].retransmit_bitrate_bps = retransmit.bitrate_bps;
   }
   for (std::vector<uint32_t>::const_iterator it = config_.rtp.rtx.ssrcs.begin();
        it != config_.rtp.rtx.ssrcs.end();
        ++it) {
     const uint32_t ssrc = *it;
-    BitrateStatistics bitrate;
+    BitrateStatistics total;
+    BitrateStatistics retransmit;
     // Use ssrc as bitrate_bps to get a unique value for each stream.
-    bitrate.bitrate_bps = ssrc;
-    observer->Notify(bitrate, ssrc);
-    expected_.substreams[ssrc].bitrate_bps = ssrc;
+    total.bitrate_bps = ssrc;
+    retransmit.bitrate_bps = ssrc + 1;
+    observer->Notify(total, retransmit, ssrc);
+    expected_.substreams[ssrc].total_bitrate_bps = total.bitrate_bps;
+    expected_.substreams[ssrc].retransmit_bitrate_bps = retransmit.bitrate_bps;
   }
 
   VideoSendStream::Stats stats = statistics_proxy_->GetStats();
@@ -292,9 +307,10 @@
   rtp_callback->DataCountersUpdated(rtp_stats, exluded_ssrc);
 
   // From BitrateStatisticsObserver.
-  BitrateStatistics bitrate;
+  BitrateStatistics total;
+  BitrateStatistics retransmit;
   BitrateStatisticsObserver* bitrate_observer = statistics_proxy_.get();
-  bitrate_observer->Notify(bitrate, exluded_ssrc);
+  bitrate_observer->Notify(total, retransmit, exluded_ssrc);
 
   // From FrameCountObserver.
   FrameCountObserver* fps_observer = statistics_proxy_.get();
diff --git a/video/video_send_stream.cc b/video/video_send_stream.cc
index 28231b0..489cd14 100644
--- a/video/video_send_stream.cc
+++ b/video/video_send_stream.cc
@@ -492,5 +492,12 @@
     rtp_rtcp_->SetRTCPStatus(channel_, kRtcpNone);
 }
 
+int VideoSendStream::GetPacerQueuingDelayMs() const {
+  int pacer_delay_ms = 0;
+  if (rtp_rtcp_->GetPacerQueuingDelayMs(channel_, &pacer_delay_ms) != 0) {
+    return 0;
+  }
+  return pacer_delay_ms;
+}
 }  // namespace internal
 }  // namespace webrtc
diff --git a/video/video_send_stream.h b/video/video_send_stream.h
index f787430..873785d 100644
--- a/video/video_send_stream.h
+++ b/video/video_send_stream.h
@@ -74,6 +74,8 @@
 
   void SignalNetworkState(Call::NetworkState state);
 
+  int GetPacerQueuingDelayMs() const;
+
  private:
   void ConfigureSsrcs();
   TransportAdapter transport_adapter_;
diff --git a/video/video_send_stream_tests.cc b/video/video_send_stream_tests.cc
index b863957..3ab1127 100644
--- a/video/video_send_stream_tests.cc
+++ b/video/video_send_stream_tests.cc
@@ -962,8 +962,8 @@
                 config_.rtp.ssrcs.begin(), config_.rtp.ssrcs.end(), ssrc));
         // Check for data populated by various sources. RTCP excluded as this
         // data is received from remote side. Tested in call tests instead.
-        const StreamStats& entry = stats.substreams[ssrc];
-        if (entry.key_frames > 0u && entry.bitrate_bps > 0 &&
+        const SsrcStats& entry = stats.substreams[ssrc];
+        if (entry.key_frames > 0u && entry.total_bitrate_bps > 0 &&
             entry.rtp_stats.packets > 0u && entry.avg_delay_ms > 0 &&
             entry.max_delay_ms > 0) {
           return true;
@@ -1045,20 +1045,20 @@
       VideoSendStream::Stats stats = stream_->GetStats();
       if (!stats.substreams.empty()) {
         EXPECT_EQ(1u, stats.substreams.size());
-        int bitrate_bps = stats.substreams.begin()->second.bitrate_bps;
-        test::PrintResult(
-            "bitrate_stats_",
-            "min_transmit_bitrate_low_remb",
-            "bitrate_bps",
-            static_cast<size_t>(bitrate_bps),
-            "bps",
-            false);
-        if (bitrate_bps > kHighBitrateBps) {
+        int total_bitrate_bps =
+            stats.substreams.begin()->second.total_bitrate_bps;
+        test::PrintResult("bitrate_stats_",
+                          "min_transmit_bitrate_low_remb",
+                          "bitrate_bps",
+                          static_cast<size_t>(total_bitrate_bps),
+                          "bps",
+                          false);
+        if (total_bitrate_bps > kHighBitrateBps) {
           rtp_rtcp_->SetREMBData(kRembBitrateBps, 1, &header.ssrc);
           rtp_rtcp_->Process();
           bitrate_capped_ = true;
         } else if (bitrate_capped_ &&
-                   bitrate_bps < kRembRespectedBitrateBps) {
+                   total_bitrate_bps < kRembRespectedBitrateBps) {
           observation_complete_->Set();
         }
       }
diff --git a/video_decoder.h b/video_decoder.h
index 03a564e..941c0ac 100644
--- a/video_decoder.h
+++ b/video_decoder.h
@@ -40,6 +40,7 @@
  public:
   enum DecoderType {
     kVp8,
+    kVp9
   };
 
   static VideoDecoder* Create(DecoderType codec_type);
diff --git a/video_engine/vie_base_impl.cc b/video_engine/vie_base_impl.cc
index cf64ead..81c748a 100644
--- a/video_engine/vie_base_impl.cc
+++ b/video_engine/vie_base_impl.cc
@@ -10,7 +10,6 @@
 
 #include "webrtc/video_engine/vie_base_impl.h"
 
-#include <sstream>
 #include <string>
 #include <utility>
 
@@ -329,23 +328,8 @@
 }
 
 int ViEBaseImpl::GetVersion(char version[1024]) {
-  assert(kViEVersionMaxMessageSize == 1024);
-  if (!version) {
-    shared_data_.SetLastError(kViEBaseInvalidArgument);
-    return -1;
-  }
-
-  // Add WebRTC Version.
-  std::stringstream version_stream;
-  version_stream << "VideoEngine 39" << std::endl;
-
-  // Add build info.
-  version_stream << "Build: " << BUILDINFO << std::endl;
-
-  int version_length = version_stream.tellp();
-  assert(version_length < 1024);
-  memcpy(version, version_stream.str().c_str(), version_length);
-  version[version_length] = '\0';
+  assert(version != NULL);
+  strcpy(version, "VideoEngine 39");
   return 0;
 }
 
diff --git a/video_engine/vie_base_impl.h b/video_engine/vie_base_impl.h
index 20fd615..0ae7818 100644
--- a/video_engine/vie_base_impl.h
+++ b/video_engine/vie_base_impl.h
@@ -64,11 +64,6 @@
   ViESharedData* shared_data() { return &shared_data_; }
 
  private:
-  // Version functions.
-  int32_t AddViEVersion(char* str) const;
-  int32_t AddBuildInfo(char* str) const;
-  int32_t AddExternalTransportBuild(char* str) const;
-
   int CreateChannel(int& video_channel, int original_channel,  // NOLINT
                     bool sender);
 
diff --git a/video_engine/vie_channel.h b/video_engine/vie_channel.h
index 0327906..3b8d96a 100644
--- a/video_engine/vie_channel.h
+++ b/video_engine/vie_channel.h
@@ -415,10 +415,12 @@
 
   class RegisterableBitrateStatisticsObserver:
     public RegisterableCallback<BitrateStatisticsObserver> {
-    virtual void Notify(const BitrateStatistics& stats, uint32_t ssrc) {
+    virtual void Notify(const BitrateStatistics& total_stats,
+                        const BitrateStatistics& retransmit_stats,
+                        uint32_t ssrc) {
       CriticalSectionScoped cs(critsect_.get());
       if (callback_)
-        callback_->Notify(stats, ssrc);
+        callback_->Notify(total_stats, retransmit_stats, ssrc);
     }
   }
   send_bitrate_observer_;
diff --git a/video_engine/vie_defines.h b/video_engine/vie_defines.h
index 7bfed46..74b5e1a 100644
--- a/video_engine/vie_defines.h
+++ b/video_engine/vie_defines.h
@@ -35,8 +35,6 @@
 
 // ViEBase
 enum { kViEMaxNumberOfChannels = 64 };
-enum { kViEVersionMaxMessageSize = 1024 };
-enum { kViEMaxModuleVersionSize = 960 };
 
 // ViECapture
 enum { kViEMaxCaptureDevices = 256 };
@@ -101,21 +99,6 @@
   return static_cast<int>(moduleId & 0xffff);
 }
 
-//  Build information macros
-#if defined(_DEBUG) || defined(DEBUG)
-#define BUILDMODE "d"
-#elif defined(NDEBUG)
-#define BUILDMODE "r"
-#else
-#define BUILDMODE "?"
-#endif
-
-#define BUILDTIME __TIME__
-#define BUILDDATE __DATE__
-
-// Example: "Oct 10 2002 12:05:30 r".
-#define BUILDINFO BUILDDATE " " BUILDTIME " " BUILDMODE
-
 // Windows specific.
 #if defined(_WIN32)
   #define RENDER_MODULE_TYPE kRenderWindows
diff --git a/video_receive_stream.h b/video_receive_stream.h
index 5ab898c..a8620d9 100644
--- a/video_receive_stream.h
+++ b/video_receive_stream.h
@@ -63,7 +63,7 @@
     int expected_delay_ms;
   };
 
-  struct Stats : public StreamStats {
+  struct Stats : public SsrcStats {
     Stats()
         : network_frame_rate(0),
           decode_frame_rate(0),
diff --git a/video_send_stream.h b/video_send_stream.h
index aa5033a..a9aba94 100644
--- a/video_send_stream.h
+++ b/video_send_stream.h
@@ -41,11 +41,13 @@
     Stats()
         : input_frame_rate(0),
           encode_frame_rate(0),
+          media_bitrate_bps(0),
           suspended(false) {}
     int input_frame_rate;
     int encode_frame_rate;
+    int media_bitrate_bps;
     bool suspended;
-    std::map<uint32_t, StreamStats> substreams;
+    std::map<uint32_t, SsrcStats> substreams;
   };
 
   struct Config {
diff --git a/voice_engine/voe_base_impl.cc b/voice_engine/voe_base_impl.cc
index ad6314a..1783095 100644
--- a/voice_engine/voe_base_impl.cc
+++ b/voice_engine/voe_base_impl.cc
@@ -777,15 +777,6 @@
     accLen += len;
     assert(accLen < kVoiceEngineVersionMaxMessageSize);
 
-    len = AddBuildInfo(versionPtr);
-    if (len == -1)
-    {
-        return -1;
-    }
-    versionPtr += len;
-    accLen += len;
-    assert(accLen < kVoiceEngineVersionMaxMessageSize);
-
 #ifdef WEBRTC_EXTERNAL_TRANSPORT
     len = AddExternalTransportBuild(versionPtr);
     if (len == -1)
@@ -828,11 +819,6 @@
     return 0;
 }
 
-int32_t VoEBaseImpl::AddBuildInfo(char* str) const
-{
-    return sprintf(str, "Build: %s\n", BUILDINFO);
-}
-
 int32_t VoEBaseImpl::AddVoEVersion(char* str) const
 {
     return sprintf(str, "VoiceEngine 4.1.0\n");
diff --git a/voice_engine/voe_base_impl.h b/voice_engine/voe_base_impl.h
index 985ef5d..2f37736 100644
--- a/voice_engine/voe_base_impl.h
+++ b/voice_engine/voe_base_impl.h
@@ -146,7 +146,6 @@
                         int64_t* elapsed_time_ms,
                         int64_t* ntp_time_ms);
 
-    int32_t AddBuildInfo(char* str) const;
     int32_t AddVoEVersion(char* str) const;
 
     // Initialize channel by setting Engine Information then initializing
diff --git a/voice_engine/voice_engine_defines.h b/voice_engine/voice_engine_defines.h
index b3cba7c..cde9470 100644
--- a/voice_engine/voice_engine_defines.h
+++ b/voice_engine/voice_engine_defines.h
@@ -128,26 +128,6 @@
 }  // namespace webrtc
 
 // ----------------------------------------------------------------------------
-//  Build information macros
-// ----------------------------------------------------------------------------
-
-#if defined(_DEBUG)
-#define BUILDMODE "d"
-#elif defined(DEBUG)
-#define BUILDMODE "d"
-#elif defined(NDEBUG)
-#define BUILDMODE "r"
-#else
-#define BUILDMODE "?"
-#endif
-
-#define BUILDTIME __TIME__
-#define BUILDDATE __DATE__
-
-// Example: "Oct 10 2002 12:05:30 r"
-#define BUILDINFO BUILDDATE " " BUILDTIME " " BUILDMODE
-
-// ----------------------------------------------------------------------------
 //  Macros
 // ----------------------------------------------------------------------------