Remove unused multi stream bandwidth estimator.
BUG=
R=mflodman@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/1712004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4264 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/modules.gyp b/webrtc/modules/modules.gyp
index e79920a..8e0297c 100644
--- a/webrtc/modules/modules.gyp
+++ b/webrtc/modules/modules.gyp
@@ -163,7 +163,6 @@
'pacing/paced_sender_unittest.cc',
'remote_bitrate_estimator/include/mock/mock_remote_bitrate_observer.h',
'remote_bitrate_estimator/bitrate_estimator_unittest.cc',
- 'remote_bitrate_estimator/remote_bitrate_estimator_multi_stream_unittest.cc',
'remote_bitrate_estimator/remote_bitrate_estimator_single_stream_unittest.cc',
'remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc',
'remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.h',
diff --git a/webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h b/webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h
index 3d0167b..a2f6bcf 100644
--- a/webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h
+++ b/webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h
@@ -41,18 +41,10 @@
public:
virtual ~RemoteBitrateEstimator() {}
- // Stores an RTCP SR (NTP, RTP timestamp) tuple for a specific SSRC to be used
- // in future RTP timestamp to NTP time conversions. As soon as any SSRC has
- // two tuples the RemoteBitrateEstimator will switch to multi-stream mode.
- virtual void IncomingRtcp(unsigned int ssrc, uint32_t ntp_secs,
- uint32_t ntp_frac, uint32_t rtp_timestamp) = 0;
-
// Called for each incoming packet. Updates the incoming payload bitrate
// estimate and the over-use detector. If an over-use is detected the
// remote bitrate estimate will be updated. Note that |payload_size| is the
- // packet size excluding headers. The estimator can only count on the
- // "header" (an RTPHeader) and "extension" (an RTPHeaderExtension) fields of
- // the WebRtcRTPHeader to be initialized.
+ // packet size excluding headers.
virtual void IncomingPacket(int64_t arrival_time_ms,
int payload_size,
const RTPHeader& header) = 0;
@@ -88,16 +80,6 @@
RemoteBitrateObserver* observer,
Clock* clock) const;
};
-
-struct MultiStreamRemoteBitrateEstimatorFactory
- : RemoteBitrateEstimatorFactory {
- MultiStreamRemoteBitrateEstimatorFactory() {}
- virtual ~MultiStreamRemoteBitrateEstimatorFactory() {}
-
- virtual RemoteBitrateEstimator* Create(
- RemoteBitrateObserver* observer,
- Clock* clock) const;
-};
} // namespace webrtc
#endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_REMOTE_BITRATE_ESTIMATOR_H_
diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi
index 3920492..f738bb3 100644
--- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi
+++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi
@@ -36,7 +36,6 @@
'bitrate_estimator.h',
'overuse_detector.cc',
'overuse_detector.h',
- 'remote_bitrate_estimator_multi_stream.cc',
'remote_bitrate_estimator_single_stream.cc',
'remote_rate_control.cc',
'remote_rate_control.h',
diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_multi_stream.cc b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_multi_stream.cc
deleted file mode 100644
index 90c6f24..0000000
--- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_multi_stream.cc
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- * Copyright (c) 2012 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 <map>
-
-#include "webrtc/modules/remote_bitrate_estimator/bitrate_estimator.h"
-#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
-#include "webrtc/modules/remote_bitrate_estimator/include/rtp_to_ntp.h"
-#include "webrtc/modules/remote_bitrate_estimator/overuse_detector.h"
-#include "webrtc/modules/remote_bitrate_estimator/remote_rate_control.h"
-#include "webrtc/system_wrappers/interface/clock.h"
-#include "webrtc/system_wrappers/interface/constructor_magic.h"
-#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
-#include "webrtc/system_wrappers/interface/scoped_ptr.h"
-#include "webrtc/system_wrappers/interface/tick_util.h"
-#include "webrtc/typedefs.h"
-
-namespace webrtc {
-namespace {
-class RemoteBitrateEstimatorMultiStream : public RemoteBitrateEstimator {
- public:
- RemoteBitrateEstimatorMultiStream(RemoteBitrateObserver* observer,
- Clock* clock);
- virtual ~RemoteBitrateEstimatorMultiStream() {}
-
- // Stores an RTCP SR (NTP, RTP timestamp) tuple for a specific SSRC to be used
- // in future RTP timestamp to NTP time conversions. As soon as any SSRC has
- // two tuples the RemoteBitrateEstimator will switch to multi-stream mode.
- virtual void IncomingRtcp(unsigned int ssrc, uint32_t ntp_secs,
- uint32_t ntp_frac, uint32_t rtp_timestamp);
-
- // Called for each incoming packet. The first SSRC will immediately be used
- // for over-use detection. Subsequent SSRCs will only be used when at least
- // two RTCP SR reports with the same SSRC have been received. Updates the
- // incoming payload bitrate estimate and the over-use detector.
- // If an over-use is detected the remote bitrate estimate will be updated.
- // Note that |payload_size| is the packet size excluding headers.
- virtual void IncomingPacket(int64_t arrival_time_ms,
- int payload_size,
- const RTPHeader& header);
-
- // Triggers a new estimate calculation.
- // Implements the Module interface.
- virtual int32_t Process();
- virtual int32_t TimeUntilNextProcess();
- // Set the current round-trip time experienced by the stream.
- // Implements the StatsObserver interface.
- virtual void OnRttUpdate(uint32_t rtt);
-
- // Removes all data for |ssrc|.
- virtual void RemoveStream(unsigned int ssrc);
-
- // Returns true if a valid estimate exists and sets |bitrate_bps| to the
- // estimated payload bitrate in bits per second. |ssrcs| is the list of ssrcs
- // currently being received and of which the bitrate estimate is based upon.
- virtual bool LatestEstimate(std::vector<unsigned int>* ssrcs,
- unsigned int* bitrate_bps) const;
-
- private:
- typedef std::map<unsigned int, synchronization::RtcpList> StreamMap;
-
- // Triggers a new estimate calculation.
- void UpdateEstimate(int64_t time_now);
-
- void GetSsrcs(std::vector<unsigned int>* ssrcs) const;
-
- Clock* clock_;
- RemoteRateControl remote_rate_;
- OveruseDetector overuse_detector_;
- BitRateStats incoming_bitrate_;
- RemoteBitrateObserver* observer_;
- StreamMap streams_;
- scoped_ptr<CriticalSectionWrapper> crit_sect_;
- unsigned int initial_ssrc_;
- bool multi_stream_;
- int32_t last_process_time_;
-
- DISALLOW_COPY_AND_ASSIGN(RemoteBitrateEstimatorMultiStream);
-};
-
-RemoteBitrateEstimatorMultiStream::RemoteBitrateEstimatorMultiStream(
- RemoteBitrateObserver* observer,
- Clock* clock)
- : clock_(clock),
- remote_rate_(),
- overuse_detector_(OverUseDetectorOptions()),
- incoming_bitrate_(),
- observer_(observer),
- streams_(),
- crit_sect_(CriticalSectionWrapper::CreateCriticalSection()),
- initial_ssrc_(0),
- multi_stream_(false),
- last_process_time_(-1) {
- assert(observer_);
-}
-
-void RemoteBitrateEstimatorMultiStream::IncomingRtcp(unsigned int ssrc,
- uint32_t ntp_secs,
- uint32_t ntp_frac,
- uint32_t timestamp) {
- CriticalSectionScoped cs(crit_sect_.get());
- if (ntp_secs == 0 && ntp_frac == 0) {
- return;
- }
- // Insert a new RTCP list mapped to this SSRC if one doesn't already exist.
- std::pair<StreamMap::iterator, bool> stream_insert_result =
- streams_.insert(std::make_pair(ssrc, synchronization::RtcpList()));
- StreamMap::iterator stream_it = stream_insert_result.first;
- synchronization::RtcpList* rtcp_list = &stream_it->second;
- synchronization::RtcpMeasurement measurement(ntp_secs, ntp_frac, timestamp);
- // Make sure this RTCP is unique as we need two unique data points to
- // calculate the RTP timestamp frequency.
- for (synchronization::RtcpList::iterator it = rtcp_list->begin();
- it != rtcp_list->end(); ++it) {
- if ((measurement.ntp_secs == (*it).ntp_secs &&
- measurement.ntp_frac == (*it).ntp_frac) ||
- measurement.rtp_timestamp == (*it).rtp_timestamp) {
- return;
- }
- }
- // If this stream will get two RTCPs when the new one is added we can switch
- // to multi-stream mode.
- if (!multi_stream_ && rtcp_list->size() >= 1) {
- multi_stream_ = true;
- }
- if (rtcp_list->size() >= 2) {
- rtcp_list->pop_back();
- }
- rtcp_list->push_front(measurement);
-}
-
-void RemoteBitrateEstimatorMultiStream::IncomingPacket(
- int64_t arrival_time_ms,
- int payload_size,
- const RTPHeader& header) {
- uint32_t ssrc = header.ssrc;
- uint32_t rtp_timestamp = header.timestamp +
- header.extension.transmissionTimeOffset;
- CriticalSectionScoped cs(crit_sect_.get());
- incoming_bitrate_.Update(payload_size, arrival_time_ms);
- // Add this stream to the map of streams if it doesn't already exist.
- std::pair<StreamMap::iterator, bool> stream_insert_result =
- streams_.insert(std::make_pair(ssrc, synchronization::RtcpList()));
- synchronization::RtcpList* rtcp_list = &stream_insert_result.first->second;
- if (initial_ssrc_ == 0) {
- initial_ssrc_ = ssrc;
- }
- if (!multi_stream_) {
- if (ssrc != initial_ssrc_) {
- // We can only handle the initial stream until we get into multi stream
- // mode.
- return;
- }
- } else if (rtcp_list->size() < 2) {
- // We can't use this stream until we have received two RTCP SR reports.
- return;
- }
- const BandwidthUsage prior_state = overuse_detector_.State();
- int64_t timestamp_in_ms = -1;
- if (multi_stream_) {
- synchronization::RtpToNtpMs(rtp_timestamp, *rtcp_list, ×tamp_in_ms);
- }
- overuse_detector_.Update(payload_size, timestamp_in_ms, rtp_timestamp,
- arrival_time_ms);
- if (overuse_detector_.State() == kBwOverusing) {
- unsigned int incoming_bitrate = incoming_bitrate_.BitRate(arrival_time_ms);
- if (prior_state != kBwOverusing ||
- remote_rate_.TimeToReduceFurther(arrival_time_ms, incoming_bitrate)) {
- // The first overuse should immediately trigger a new estimate.
- // We also have to update the estimate immediately if we are overusing
- // and the target bitrate is too high compared to what we are receiving.
- UpdateEstimate(arrival_time_ms);
- }
- }
-}
-
-int32_t RemoteBitrateEstimatorMultiStream::Process() {
- if (TimeUntilNextProcess() > 0) {
- return 0;
- }
- UpdateEstimate(clock_->TimeInMilliseconds());
- last_process_time_ = clock_->TimeInMilliseconds();
- return 0;
-}
-
-int32_t RemoteBitrateEstimatorMultiStream::TimeUntilNextProcess() {
- if (last_process_time_ < 0) {
- return 0;
- }
- return last_process_time_ + kProcessIntervalMs - clock_->TimeInMilliseconds();
-}
-
-void RemoteBitrateEstimatorMultiStream::UpdateEstimate(int64_t time_now) {
- CriticalSectionScoped cs(crit_sect_.get());
- const int64_t time_of_last_received_packet =
- overuse_detector_.time_of_last_received_packet();
- if (time_of_last_received_packet >= 0 &&
- time_now - time_of_last_received_packet > kStreamTimeOutMs) {
- // This over-use detector hasn't received packets for |kStreamTimeOutMs|
- // milliseconds and is considered stale.
- remote_rate_.Reset();
- return;
- }
- const RateControlInput input(overuse_detector_.State(),
- incoming_bitrate_.BitRate(time_now),
- overuse_detector_.NoiseVar());
- const RateControlRegion region = remote_rate_.Update(&input, time_now);
- unsigned int target_bitrate = remote_rate_.UpdateBandwidthEstimate(time_now);
- if (remote_rate_.ValidEstimate()) {
- std::vector<unsigned int> ssrcs;
- GetSsrcs(&ssrcs);
- if (!ssrcs.empty()) {
- observer_->OnReceiveBitrateChanged(ssrcs, target_bitrate);
- }
- }
- overuse_detector_.SetRateControlRegion(region);
-}
-
-void RemoteBitrateEstimatorMultiStream::OnRttUpdate(uint32_t rtt) {
- CriticalSectionScoped cs(crit_sect_.get());
- remote_rate_.SetRtt(rtt);
-}
-
-void RemoteBitrateEstimatorMultiStream::RemoveStream(unsigned int ssrc) {
- CriticalSectionScoped cs(crit_sect_.get());
- streams_.erase(ssrc);
-}
-
-bool RemoteBitrateEstimatorMultiStream::LatestEstimate(
- std::vector<unsigned int>* ssrcs,
- unsigned int* bitrate_bps) const {
- CriticalSectionScoped cs(crit_sect_.get());
- assert(bitrate_bps);
- if (!remote_rate_.ValidEstimate()) {
- return false;
- }
- GetSsrcs(ssrcs);
- if (ssrcs->empty())
- *bitrate_bps = 0;
- else
- *bitrate_bps = remote_rate_.LatestEstimate();
- return true;
-}
-
-void RemoteBitrateEstimatorMultiStream::GetSsrcs(
- std::vector<unsigned int>* ssrcs) const {
- assert(ssrcs);
- ssrcs->resize(streams_.size());
- int i = 0;
- for (StreamMap::const_iterator it = streams_.begin(); it != streams_.end();
- ++it, ++i) {
- (*ssrcs)[i] = it->first;
- }
-}
-} // namespace
-
-RemoteBitrateEstimator* MultiStreamRemoteBitrateEstimatorFactory::Create(
- RemoteBitrateObserver* observer,
- Clock* clock) const {
- return new RemoteBitrateEstimatorMultiStream(observer, clock);
-}
-} // namespace webrtc
diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_multi_stream_unittest.cc b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_multi_stream_unittest.cc
deleted file mode 100644
index a4e12aa..0000000
--- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_multi_stream_unittest.cc
+++ /dev/null
@@ -1,76 +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 "testing/gtest/include/gtest/gtest.h"
-
-#include "webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.h"
-#include "webrtc/system_wrappers/interface/constructor_magic.h"
-
-namespace webrtc {
-
-class RemoteBitrateEstimatorMultiTest : public RemoteBitrateEstimatorTest {
- public:
- RemoteBitrateEstimatorMultiTest() {}
- virtual void SetUp() {
- bitrate_estimator_.reset(MultiStreamRemoteBitrateEstimatorFactory().Create(
- bitrate_observer_.get(),
- &clock_));
- }
- protected:
- DISALLOW_COPY_AND_ASSIGN(RemoteBitrateEstimatorMultiTest);
-};
-
-TEST_F(RemoteBitrateEstimatorMultiTest, InitialBehavior) {
- InitialBehaviorTestHelper(497919);
-}
-
-TEST_F(RemoteBitrateEstimatorMultiTest, RateIncreaseReordering) {
- RateIncreaseReorderingTestHelper();
-}
-
-TEST_F(RemoteBitrateEstimatorMultiTest, RateIncreaseRtpTimestamps) {
- RateIncreaseRtpTimestampsTestHelper();
-}
-
-TEST_F(RemoteBitrateEstimatorMultiTest, CapacityDropOneStream) {
- CapacityDropTestHelper(1, false, 956214, 367);
-}
-
-TEST_F(RemoteBitrateEstimatorMultiTest, CapacityDropOneStreamWrap) {
- CapacityDropTestHelper(1, true, 956214, 367);
-}
-
-TEST_F(RemoteBitrateEstimatorMultiTest, CapacityDropOneStreamWrapAlign) {
- align_streams_ = true;
- CapacityDropTestHelper(1, true, 838645, 533);
-}
-
-TEST_F(RemoteBitrateEstimatorMultiTest, CapacityDropTwoStreamsWrapAlign) {
- align_streams_ = true;
- CapacityDropTestHelper(2, true, 810646, 433);
-}
-
-TEST_F(RemoteBitrateEstimatorMultiTest, CapacityDropThreeStreamsWrapAlign) {
- align_streams_ = true;
- CapacityDropTestHelper(3, true, 868522, 2067);
-}
-
-TEST_F(RemoteBitrateEstimatorMultiTest, CapacityDropThirteenStreamsWrap) {
- CapacityDropTestHelper(13, true, 918810, 433);
-}
-
-TEST_F(RemoteBitrateEstimatorMultiTest, CapacityDropNineteenStreamsWrap) {
- CapacityDropTestHelper(19, true, 919119, 433);
-}
-
-TEST_F(RemoteBitrateEstimatorMultiTest, CapacityDropThirtyStreamsWrap) {
- CapacityDropTestHelper(30, true, 918724, 433);
-}
-} // namespace webrtc
diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc
index 4cbfbbe..2221831 100644
--- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc
+++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream.cc
@@ -27,9 +27,6 @@
Clock* clock);
virtual ~RemoteBitrateEstimatorSingleStream() {}
- virtual void IncomingRtcp(unsigned int ssrc, uint32_t ntp_secs,
- uint32_t ntp_frac, uint32_t rtp_timestamp) {}
-
// Called for each incoming packet. If this is a new SSRC, a new
// BitrateControl will be created. Updates the incoming payload bitrate
// estimate and the over-use detector. If an over-use is detected the
diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream_unittest.cc b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream_unittest.cc
index c149933..69cb38a 100644
--- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream_unittest.cc
+++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_single_stream_unittest.cc
@@ -54,25 +54,15 @@
// Verify that the time it takes for the estimator to reduce the bitrate when
// the capacity is tightened stays the same. This test also verifies that we
-// handle wrap-arounds in this scenario.
-TEST_F(RemoteBitrateEstimatorSingleTest, CapacityDropOneStreamWrapAlign) {
- align_streams_ = true;
- CapacityDropTestHelper(1, true, 956214, 367);
-}
-
-// Verify that the time it takes for the estimator to reduce the bitrate when
-// the capacity is tightened stays the same. This test also verifies that we
// handle wrap-arounds in this scenario. This is a multi-stream test.
-TEST_F(RemoteBitrateEstimatorSingleTest, CapacityDropTwoStreamsWrapAlign) {
- align_streams_ = true;
+TEST_F(RemoteBitrateEstimatorSingleTest, CapacityDropTwoStreamsWrap) {
CapacityDropTestHelper(2, true, 927088, 267);
}
// Verify that the time it takes for the estimator to reduce the bitrate when
// the capacity is tightened stays the same. This test also verifies that we
// handle wrap-arounds in this scenario. This is a multi-stream test.
-TEST_F(RemoteBitrateEstimatorSingleTest, CapacityDropThreeStreamsWrapAlign) {
- align_streams_ = true;
+TEST_F(RemoteBitrateEstimatorSingleTest, CapacityDropThreeStreamsWrap) {
CapacityDropTestHelper(3, true, 920944, 333);
}
diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc
index 6c02109..28ddc65 100644
--- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc
+++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc
@@ -178,21 +178,10 @@
it = std::min_element(streams_.begin(), streams_.end(), RtpStream::Compare);
return (*it).second->next_rtp_time();
}
-
-void StreamGenerator::Rtcps(RtcpList* rtcps, int64_t time_now_us) const {
- for (StreamMap::const_iterator it = streams_.begin(); it != streams_.end();
- ++it) {
- RtpStream::RtcpPacket* rtcp = it->second->Rtcp(time_now_us);
- if (rtcp) {
- rtcps->push_front(rtcp);
- }
- }
-}
} // namespace testing
RemoteBitrateEstimatorTest::RemoteBitrateEstimatorTest()
: clock_(0),
- align_streams_(false),
bitrate_observer_(new testing::TestBitrateObserver),
stream_generator_(new testing::StreamGenerator(
1e6, // Capacity.
@@ -246,18 +235,6 @@
bool overuse = false;
while (!packets.empty()) {
testing::RtpStream::RtpPacket* packet = packets.front();
- if (align_streams_) {
- testing::StreamGenerator::RtcpList rtcps;
- stream_generator_->Rtcps(&rtcps, clock_.TimeInMicroseconds());
- for (testing::StreamGenerator::RtcpList::iterator it = rtcps.begin();
- it != rtcps.end(); ++it) {
- bitrate_estimator_->IncomingRtcp((*it)->ssrc,
- (*it)->ntp_secs,
- (*it)->ntp_frac,
- (*it)->timestamp);
- delete *it;
- }
- }
bitrate_observer_->Reset();
IncomingPacket(packet->ssrc,
packet->size,
diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.h b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.h
index c4eb0e2..d2f84f4 100644
--- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.h
+++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.h
@@ -137,8 +137,6 @@
// it possible to simulate different types of channels.
int64_t GenerateFrame(RtpStream::PacketList* packets, int64_t time_now_us);
- void Rtcps(RtcpList* rtcps, int64_t time_now_us) const;
-
private:
typedef std::map<unsigned int, RtpStream*> StreamMap;
@@ -210,7 +208,6 @@
static const unsigned int kDefaultSsrc;
SimulatedClock clock_; // Time at the receiver.
- bool align_streams_;
scoped_ptr<testing::TestBitrateObserver> bitrate_observer_;
scoped_ptr<RemoteBitrateEstimator> bitrate_estimator_;
scoped_ptr<testing::StreamGenerator> stream_generator_;
diff --git a/webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h b/webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h
index fc0bbab..d3a3366 100644
--- a/webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h
+++ b/webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h
@@ -164,15 +164,6 @@
virtual void OnRTCPPacketTimeout(const int32_t /*id*/) {};
- // |ntp_secs|, |ntp_frac| and |timestamp| are the NTP time and RTP timestamp
- // parsed from the RTCP sender report from the sender with ssrc
- // |senderSSRC|.
- virtual void OnSendReportReceived(const int32_t id,
- const uint32_t senderSSRC,
- uint32_t ntp_secs,
- uint32_t ntp_frac,
- uint32_t timestamp) {};
-
virtual void OnReceiveReportReceived(const int32_t id,
const uint32_t senderSSRC) {};
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc
index b9f99ab..0dde10b 100644
--- a/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc
@@ -1334,13 +1334,7 @@
}
}
if(_cbRtcpFeedback) {
- if(rtcpPacketInformation.rtcpPacketTypeFlags & kRtcpSr) {
- _cbRtcpFeedback->OnSendReportReceived(_id,
- rtcpPacketInformation.remoteSSRC,
- rtcpPacketInformation.ntp_secs,
- rtcpPacketInformation.ntp_frac,
- rtcpPacketInformation.rtp_timestamp);
- } else {
+ if(!(rtcpPacketInformation.rtcpPacketTypeFlags & kRtcpSr)) {
_cbRtcpFeedback->OnReceiveReportReceived(_id,
rtcpPacketInformation.remoteSSRC);
}
diff --git a/webrtc/modules/rtp_rtcp/test/testAPI/test_api_rtcp.cc b/webrtc/modules/rtp_rtcp/test/testAPI/test_api_rtcp.cc
index 347da79..632041c 100644
--- a/webrtc/modules/rtp_rtcp/test/testAPI/test_api_rtcp.cc
+++ b/webrtc/modules/rtp_rtcp/test/testAPI/test_api_rtcp.cc
@@ -50,14 +50,6 @@
EXPECT_STRCASEEQ("test", print_name);
};
- virtual void OnSendReportReceived(const int32_t id,
- const uint32_t senderSSRC,
- uint32_t ntp_secs,
- uint32_t ntp_frac,
- uint32_t timestamp) {
- RTCPSenderInfo senderInfo;
- EXPECT_EQ(0, _rtpRtcpModule->RemoteRTCPStat(&senderInfo));
- };
virtual void OnReceiveReportReceived(const int32_t id,
const uint32_t senderSSRC) {
};
diff --git a/webrtc/video_engine/vie_channel.cc b/webrtc/video_engine/vie_channel.cc
index 3c8a24f..af17cce 100644
--- a/webrtc/video_engine/vie_channel.cc
+++ b/webrtc/video_engine/vie_channel.cc
@@ -1944,15 +1944,6 @@
}
}
-void ViEChannel::OnSendReportReceived(const int32_t id,
- const uint32_t senderSSRC,
- uint32_t ntp_secs,
- uint32_t ntp_frac,
- uint32_t timestamp) {
- vie_receiver_.OnSendReportReceived(id, senderSSRC, ntp_secs, ntp_frac,
- timestamp);
-}
-
int32_t ViEChannel::OnInitializeDecoder(
const int32_t id,
const int8_t payload_type,
diff --git a/webrtc/video_engine/vie_channel.h b/webrtc/video_engine/vie_channel.h
index d36772e..c3161a2 100644
--- a/webrtc/video_engine/vie_channel.h
+++ b/webrtc/video_engine/vie_channel.h
@@ -202,11 +202,6 @@
const uint32_t name,
const uint16_t length,
const uint8_t* data);
- virtual void OnSendReportReceived(const int32_t id,
- const uint32_t senderSSRC,
- uint32_t ntp_secs,
- uint32_t ntp_frac,
- uint32_t timestamp);
// Implements RtpFeedback.
virtual int32_t OnInitializeDecoder(
const int32_t id,
diff --git a/webrtc/video_engine/vie_channel_group.cc b/webrtc/video_engine/vie_channel_group.cc
index 596ba33..5673a5a 100644
--- a/webrtc/video_engine/vie_channel_group.cc
+++ b/webrtc/video_engine/vie_channel_group.cc
@@ -60,12 +60,6 @@
receive_absolute_send_time_ = enable;
}
- virtual void IncomingRtcp(unsigned int ssrc, uint32_t ntp_secs,
- uint32_t ntp_frac, uint32_t rtp_timestamp) {
- CriticalSectionScoped cs(crit_sect_.get());
- rbe_->IncomingRtcp(ssrc, ntp_secs, ntp_frac, rtp_timestamp);
- }
-
virtual void IncomingPacket(int64_t arrival_time_ms,
int payload_size,
const RTPHeader& header) {
diff --git a/webrtc/video_engine/vie_receiver.cc b/webrtc/video_engine/vie_receiver.cc
index 0284ad5..a39dbee 100644
--- a/webrtc/video_engine/vie_receiver.cc
+++ b/webrtc/video_engine/vie_receiver.cc
@@ -140,15 +140,6 @@
return 0;
}
-void ViEReceiver::OnSendReportReceived(const int32_t id,
- const uint32_t senderSSRC,
- uint32_t ntp_secs,
- uint32_t ntp_frac,
- uint32_t timestamp) {
- remote_bitrate_estimator_->IncomingRtcp(senderSSRC, ntp_secs, ntp_frac,
- timestamp);
-}
-
int ViEReceiver::InsertRTPPacket(const int8_t* rtp_packet,
int rtp_packet_length) {
// TODO(mflodman) Change decrypt to get rid of this cast.
diff --git a/webrtc/video_engine/vie_receiver.h b/webrtc/video_engine/vie_receiver.h
index efa6712..904a951 100644
--- a/webrtc/video_engine/vie_receiver.h
+++ b/webrtc/video_engine/vie_receiver.h
@@ -61,12 +61,6 @@
const uint16_t payload_size,
const WebRtcRTPHeader* rtp_header);
- void OnSendReportReceived(const int32_t id,
- const uint32_t senderSSRC,
- uint32_t ntp_secs,
- uint32_t ntp_frac,
- uint32_t timestamp);
-
void EstimatedReceiveBandwidth(unsigned int* available_bandwidth) const;
private: