Fix some chromium-style warnings in webrtc/modules/remote_bitrate_estimator/

BUG=163
R=pwestin@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/1905004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4443 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org 2013-07-31 15:16:52 +00:00
parent 4fac8a4699
commit 8f23df51d4
3 changed files with 20 additions and 19 deletions

View File

@ -34,24 +34,24 @@ class RemoteBitrateEstimatorSingleStream : public RemoteBitrateEstimator {
// packet size excluding headers.
virtual void IncomingPacket(int64_t arrival_time_ms,
int payload_size,
const RTPHeader& header);
const RTPHeader& header) OVERRIDE;
// Triggers a new estimate calculation.
// Implements the Module interface.
virtual int32_t Process();
virtual int32_t TimeUntilNextProcess();
virtual int32_t Process() OVERRIDE;
virtual int32_t TimeUntilNextProcess() OVERRIDE;
// Set the current round-trip time experienced by the stream.
// Implements the StatsObserver interface.
virtual void OnRttUpdate(uint32_t rtt);
virtual void OnRttUpdate(uint32_t rtt) OVERRIDE;
// Removes all data for |ssrc|.
virtual void RemoveStream(unsigned int ssrc);
virtual void RemoveStream(unsigned int ssrc) OVERRIDE;
// 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;
unsigned int* bitrate_bps) const OVERRIDE;
private:
typedef std::map<unsigned int, OveruseDetector> SsrcOveruseDetectorMap;

View File

@ -18,6 +18,13 @@ enum { kMtu = 1200 };
namespace testing {
void TestBitrateObserver::OnReceiveBitrateChanged(
const std::vector<unsigned int>& ssrcs,
unsigned int bitrate) {
latest_bitrate_ = bitrate;
updated_ = true;
}
RtpStream::RtpStream(int fps,
int bitrate_bps,
unsigned int ssrc,
@ -187,6 +194,8 @@ RemoteBitrateEstimatorTest::RemoteBitrateEstimatorTest()
1e6, // Capacity.
clock_.TimeInMicroseconds())) {}
RemoteBitrateEstimatorTest::~RemoteBitrateEstimatorTest() {}
void RemoteBitrateEstimatorTest::AddDefaultStream() {
stream_generator_->AddStream(new testing::RtpStream(
30, // Frames per second.

View File

@ -30,22 +30,13 @@ class TestBitrateObserver : public RemoteBitrateObserver {
virtual ~TestBitrateObserver() {}
virtual void OnReceiveBitrateChanged(const std::vector<unsigned int>& ssrcs,
unsigned int bitrate) {
latest_bitrate_ = bitrate;
updated_ = true;
}
unsigned int bitrate) OVERRIDE;
void Reset() {
updated_ = false;
}
void Reset() { updated_ = false; }
bool updated() const {
return updated_;
}
bool updated() const { return updated_; }
unsigned int latest_bitrate() const {
return latest_bitrate_;
}
unsigned int latest_bitrate() const { return latest_bitrate_; }
private:
bool updated_;
@ -154,6 +145,7 @@ class StreamGenerator {
class RemoteBitrateEstimatorTest : public ::testing::Test {
public:
RemoteBitrateEstimatorTest();
virtual ~RemoteBitrateEstimatorTest();
protected:
virtual void SetUp() = 0;