Remove MockRemoteBitrateObserver (unused)
BUG=None Review-Url: https://codereview.webrtc.org/2731523002 Cr-Commit-Position: refs/heads/master@{#17060}
This commit is contained in:
parent
609ab2b3dc
commit
fb1fa44d70
@ -21,7 +21,6 @@
|
||||
#include "webrtc/modules/congestion_controller/include/congestion_controller.h"
|
||||
#include "webrtc/modules/congestion_controller/include/mock/mock_congestion_controller.h"
|
||||
#include "webrtc/modules/pacing/paced_sender.h"
|
||||
#include "webrtc/modules/remote_bitrate_estimator/include/mock/mock_remote_bitrate_estimator.h"
|
||||
#include "webrtc/modules/rtp_rtcp/mocks/mock_rtcp_rtt_stats.h"
|
||||
#include "webrtc/test/gtest.h"
|
||||
#include "webrtc/test/mock_voe_channel_proxy.h"
|
||||
@ -75,7 +74,7 @@ struct ConfigHelper {
|
||||
stream_config_(nullptr),
|
||||
congestion_controller_(&simulated_clock_,
|
||||
&bitrate_observer_,
|
||||
&remote_bitrate_observer_,
|
||||
nullptr,
|
||||
&event_log_,
|
||||
&packet_router_),
|
||||
bitrate_allocator_(&limit_observer_),
|
||||
@ -248,7 +247,6 @@ struct ConfigHelper {
|
||||
AudioSendStream::Config stream_config_;
|
||||
testing::StrictMock<MockVoEChannelProxy>* channel_proxy_ = nullptr;
|
||||
testing::NiceMock<MockCongestionObserver> bitrate_observer_;
|
||||
testing::NiceMock<MockRemoteBitrateObserver> remote_bitrate_observer_;
|
||||
MockAudioProcessing audio_processing_;
|
||||
MockTransmitMixer transmit_mixer_;
|
||||
AudioProcessing::AudioProcessingStatistics audio_processing_stats_;
|
||||
|
||||
@ -146,7 +146,6 @@ if (rtc_include_tests) {
|
||||
testonly = true
|
||||
sources = [
|
||||
"aimd_rate_control_unittest.cc",
|
||||
"include/mock/mock_remote_bitrate_estimator.h",
|
||||
"include/mock/mock_remote_bitrate_observer.h",
|
||||
"inter_arrival_unittest.cc",
|
||||
"overuse_detector_unittest.cc",
|
||||
|
||||
@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2015 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.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_MOCK_MOCK_REMOTE_BITRATE_ESTIMATOR_H_
|
||||
#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_MOCK_MOCK_REMOTE_BITRATE_ESTIMATOR_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h"
|
||||
#include "webrtc/test/gmock.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
class MockRemoteBitrateObserver : public RemoteBitrateObserver {
|
||||
public:
|
||||
MOCK_METHOD2(OnReceiveBitrateChanged,
|
||||
void(const std::vector<uint32_t>& ssrcs, uint32_t bitrate));
|
||||
};
|
||||
|
||||
class MockRemoteBitrateEstimator : public RemoteBitrateEstimator {
|
||||
public:
|
||||
MOCK_METHOD3(IncomingPacket, void(int64_t, size_t, const RTPHeader&));
|
||||
MOCK_METHOD1(RemoveStream, void(uint32_t));
|
||||
MOCK_CONST_METHOD2(LatestEstimate, bool(std::vector<uint32_t>*, uint32_t*));
|
||||
|
||||
// From CallStatsObserver;
|
||||
MOCK_METHOD2(OnRttUpdate, void(int64_t, int64_t));
|
||||
|
||||
// From Module.
|
||||
MOCK_METHOD0(TimeUntilNextProcess, int64_t());
|
||||
MOCK_METHOD0(Process, void());
|
||||
MOCK_METHOD1(SetMinBitrate, void(int));
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_MOCK_MOCK_REMOTE_BITRATE_ESTIMATOR_H_
|
||||
@ -57,7 +57,6 @@ RemoteBitrateEstimatorSingleStream::RemoteBitrateEstimatorSingleStream(
|
||||
last_process_time_(-1),
|
||||
process_interval_ms_(kProcessIntervalMs),
|
||||
uma_recorded_(false) {
|
||||
assert(observer_);
|
||||
LOG(LS_INFO) << "RemoteBitrateEstimatorSingleStream: Instantiating.";
|
||||
}
|
||||
|
||||
@ -201,7 +200,8 @@ void RemoteBitrateEstimatorSingleStream::UpdateEstimate(int64_t now_ms) {
|
||||
RTC_DCHECK_GT(process_interval_ms_, 0);
|
||||
std::vector<uint32_t> ssrcs;
|
||||
GetSsrcs(&ssrcs);
|
||||
observer_->OnReceiveBitrateChanged(ssrcs, target_bitrate);
|
||||
if (observer_)
|
||||
observer_->OnReceiveBitrateChanged(ssrcs, target_bitrate);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -56,12 +56,12 @@ class RemoteBitrateEstimatorSingleStream : public RemoteBitrateEstimator {
|
||||
// otherwise creates it.
|
||||
AimdRateControl* GetRemoteRate() EXCLUSIVE_LOCKS_REQUIRED(crit_sect_.get());
|
||||
|
||||
Clock* clock_;
|
||||
Clock* const clock_;
|
||||
SsrcOveruseEstimatorMap overuse_detectors_ GUARDED_BY(crit_sect_.get());
|
||||
RateStatistics incoming_bitrate_ GUARDED_BY(crit_sect_.get());
|
||||
uint32_t last_valid_incoming_bitrate_ GUARDED_BY(crit_sect_.get());
|
||||
std::unique_ptr<AimdRateControl> remote_rate_ GUARDED_BY(crit_sect_.get());
|
||||
RemoteBitrateObserver* observer_ GUARDED_BY(crit_sect_.get());
|
||||
RemoteBitrateObserver* const observer_ GUARDED_BY(crit_sect_.get());
|
||||
std::unique_ptr<CriticalSectionWrapper> crit_sect_;
|
||||
int64_t last_process_time_;
|
||||
int64_t process_interval_ms_ GUARDED_BY(crit_sect_.get());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user