Roll chromium_revision e144d30..6fdb142 (318658:318841) + remove OVERRIDE macro

Clang version changed 223108:230914
Details: e144d30..6fdb142/tools/clang/scripts/update.sh

Removes the OVERRIDE macro defined in:
* webrtc/base/common.h
* webrtc/typedefs.h

The majority of the source changes were done by running this in src/:
perl -0pi -e "s/virtual\s([^({;]*(\([^({;]*\)[^({;]*))(OVERRIDE|override)/\1override/sg" `find {talk,webrtc} -name "*.h"  -o -name "*.cc*" -o -name "*.mm*"`

which converted all:
virtual Foo() OVERRIDE
functions to:
Foo() override

Then I manually edited:
* talk/media/webrtc/fakewebrtccommon.h
* webrtc/test/fake_common.h

Remaining uses of OVERRIDE was fixed by search+replace.

Manual edits were done to fix virtual destructors that were
overriding inherited ones.

Finally a build error related to the pure virtual definitions of
Read, Write and Rewind in common_types.h required a bit of
refactoring in:
* webrtc/common_types.cc
* webrtc/common_types.h
* webrtc/system_wrappers/interface/file_wrapper.h
* webrtc/system_wrappers/source/file_impl.cc

This roll should make it possible for us to finally re-enable deadlock
detection for TSan on the buildbots.

BUG=4106
R=pbos@webrtc.org, tommi@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#8596}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8596 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
kjellander@webrtc.org
2015-03-04 12:58:35 +00:00
parent 792f1a14e2
commit 14665ff7d4
286 changed files with 3546 additions and 3920 deletions

View File

@ -49,16 +49,18 @@ class Accelerate : public TimeStretch {
protected:
// Sets the parameters |best_correlation| and |peak_index| to suitable
// values when the signal contains no active speech.
virtual void SetParametersForPassiveSpeech(size_t len,
int16_t* best_correlation,
int* peak_index) const OVERRIDE;
void SetParametersForPassiveSpeech(size_t len,
int16_t* best_correlation,
int* peak_index) const override;
// Checks the criteria for performing the time-stretching operation and,
// if possible, performs the time-stretching.
virtual ReturnCodes CheckCriteriaAndStretch(
const int16_t* input, size_t input_length, size_t peak_index,
int16_t best_correlation, bool active_speech,
AudioMultiVector* output) const OVERRIDE;
ReturnCodes CheckCriteriaAndStretch(const int16_t* input,
size_t input_length,
size_t peak_index,
int16_t best_correlation,
bool active_speech,
AudioMultiVector* output) const override;
private:
DISALLOW_COPY_AND_ASSIGN(Accelerate);

View File

@ -233,7 +233,7 @@ class AudioDecoderCng : public AudioDecoder {
uint32_t rtp_timestamp,
uint32_t arrival_timestamp) { return -1; }
virtual CNG_dec_inst* CngDecoderInstance() OVERRIDE { return dec_state_; }
CNG_dec_inst* CngDecoderInstance() override { return dec_state_; }
private:
CNG_dec_inst* dec_state_;

View File

@ -47,13 +47,13 @@ class DecisionLogicFax : public DecisionLogic {
// should be set to true. The output variable |reset_decoder| will be set to
// true if a reset is required; otherwise it is left unchanged (i.e., it can
// remain true if it was true before the call).
virtual Operations GetDecisionSpecialized(const SyncBuffer& sync_buffer,
const Expand& expand,
int decoder_frame_length,
const RTPHeader* packet_header,
Modes prev_mode,
bool play_dtmf,
bool* reset_decoder) OVERRIDE;
Operations GetDecisionSpecialized(const SyncBuffer& sync_buffer,
const Expand& expand,
int decoder_frame_length,
const RTPHeader* packet_header,
Modes prev_mode,
bool play_dtmf,
bool* reset_decoder) override;
private:
DISALLOW_COPY_AND_ASSIGN(DecisionLogicFax);

View File

@ -378,7 +378,7 @@ TEST_F(LargeTimestampJumpTest, JumpLongerThanHalfRangeAndWrap) {
class ShortTimestampJumpTest : public LargeTimestampJumpTest {
protected:
void UpdateState(NetEqOutputType output_type) OVERRIDE {
void UpdateState(NetEqOutputType output_type) override {
switch (test_state_) {
case kInitialPhase: {
if (output_type == kOutputNormal) {

View File

@ -79,10 +79,10 @@ class NetEqImpl : public webrtc::NetEq {
// of the time when the packet was received, and should be measured with
// the same tick rate as the RTP timestamp of the current payload.
// Returns 0 on success, -1 on failure.
virtual int InsertPacket(const WebRtcRTPHeader& rtp_header,
const uint8_t* payload,
size_t length_bytes,
uint32_t receive_timestamp) OVERRIDE;
int InsertPacket(const WebRtcRTPHeader& rtp_header,
const uint8_t* payload,
size_t length_bytes,
uint32_t receive_timestamp) override;
// Inserts a sync-packet into packet queue. Sync-packets are decoded to
// silence and are intended to keep AV-sync intact in an event of long packet
@ -93,8 +93,8 @@ class NetEqImpl : public webrtc::NetEq {
// type, i.e. they cannot have DTMF or CNG payload type, nor a codec change
// can be implied by inserting a sync-packet.
// Returns kOk on success, kFail on failure.
virtual int InsertSyncPacket(const WebRtcRTPHeader& rtp_header,
uint32_t receive_timestamp) OVERRIDE;
int InsertSyncPacket(const WebRtcRTPHeader& rtp_header,
uint32_t receive_timestamp) override;
// Instructs NetEq to deliver 10 ms of audio data. The data is written to
// |output_audio|, which can hold (at least) |max_length| elements.
@ -104,97 +104,98 @@ class NetEqImpl : public webrtc::NetEq {
// the samples are interleaved.
// The speech type is written to |type|, if |type| is not NULL.
// Returns kOK on success, or kFail in case of an error.
virtual int GetAudio(size_t max_length, int16_t* output_audio,
int* samples_per_channel, int* num_channels,
NetEqOutputType* type) OVERRIDE;
int GetAudio(size_t max_length,
int16_t* output_audio,
int* samples_per_channel,
int* num_channels,
NetEqOutputType* type) override;
// Associates |rtp_payload_type| with |codec| and stores the information in
// the codec database. Returns kOK on success, kFail on failure.
virtual int RegisterPayloadType(enum NetEqDecoder codec,
uint8_t rtp_payload_type) OVERRIDE;
int RegisterPayloadType(enum NetEqDecoder codec,
uint8_t rtp_payload_type) override;
// Provides an externally created decoder object |decoder| to insert in the
// decoder database. The decoder implements a decoder of type |codec| and
// associates it with |rtp_payload_type|. Returns kOK on success, kFail on
// failure.
virtual int RegisterExternalDecoder(AudioDecoder* decoder,
enum NetEqDecoder codec,
uint8_t rtp_payload_type) OVERRIDE;
int RegisterExternalDecoder(AudioDecoder* decoder,
enum NetEqDecoder codec,
uint8_t rtp_payload_type) override;
// Removes |rtp_payload_type| from the codec database. Returns 0 on success,
// -1 on failure.
virtual int RemovePayloadType(uint8_t rtp_payload_type) OVERRIDE;
int RemovePayloadType(uint8_t rtp_payload_type) override;
virtual bool SetMinimumDelay(int delay_ms) OVERRIDE;
bool SetMinimumDelay(int delay_ms) override;
virtual bool SetMaximumDelay(int delay_ms) OVERRIDE;
bool SetMaximumDelay(int delay_ms) override;
virtual int LeastRequiredDelayMs() const OVERRIDE;
int LeastRequiredDelayMs() const override;
virtual int SetTargetDelay() OVERRIDE { return kNotImplemented; }
int SetTargetDelay() override { return kNotImplemented; }
virtual int TargetDelay() OVERRIDE { return kNotImplemented; }
int TargetDelay() override { return kNotImplemented; }
virtual int CurrentDelay() OVERRIDE { return kNotImplemented; }
int CurrentDelay() override { return kNotImplemented; }
// Sets the playout mode to |mode|.
// Deprecated.
// TODO(henrik.lundin) Delete.
virtual void SetPlayoutMode(NetEqPlayoutMode mode) OVERRIDE;
void SetPlayoutMode(NetEqPlayoutMode mode) override;
// Returns the current playout mode.
// Deprecated.
// TODO(henrik.lundin) Delete.
virtual NetEqPlayoutMode PlayoutMode() const OVERRIDE;
NetEqPlayoutMode PlayoutMode() const override;
// Writes the current network statistics to |stats|. The statistics are reset
// after the call.
virtual int NetworkStatistics(NetEqNetworkStatistics* stats) OVERRIDE;
int NetworkStatistics(NetEqNetworkStatistics* stats) override;
// Writes the last packet waiting times (in ms) to |waiting_times|. The number
// of values written is no more than 100, but may be smaller if the interface
// is polled again before 100 packets has arrived.
virtual void WaitingTimes(std::vector<int>* waiting_times) OVERRIDE;
void WaitingTimes(std::vector<int>* waiting_times) override;
// Writes the current RTCP statistics to |stats|. The statistics are reset
// and a new report period is started with the call.
virtual void GetRtcpStatistics(RtcpStatistics* stats) OVERRIDE;
void GetRtcpStatistics(RtcpStatistics* stats) override;
// Same as RtcpStatistics(), but does not reset anything.
virtual void GetRtcpStatisticsNoReset(RtcpStatistics* stats) OVERRIDE;
void GetRtcpStatisticsNoReset(RtcpStatistics* stats) override;
// Enables post-decode VAD. When enabled, GetAudio() will return
// kOutputVADPassive when the signal contains no speech.
virtual void EnableVad() OVERRIDE;
void EnableVad() override;
// Disables post-decode VAD.
virtual void DisableVad() OVERRIDE;
void DisableVad() override;
virtual bool GetPlayoutTimestamp(uint32_t* timestamp) OVERRIDE;
bool GetPlayoutTimestamp(uint32_t* timestamp) override;
virtual int SetTargetNumberOfChannels() OVERRIDE { return kNotImplemented; }
int SetTargetNumberOfChannels() override { return kNotImplemented; }
virtual int SetTargetSampleRate() OVERRIDE { return kNotImplemented; }
int SetTargetSampleRate() override { return kNotImplemented; }
// Returns the error code for the last occurred error. If no error has
// occurred, 0 is returned.
virtual int LastError() const OVERRIDE;
int LastError() const override;
// Returns the error code last returned by a decoder (audio or comfort noise).
// When LastError() returns kDecoderErrorCode or kComfortNoiseErrorCode, check
// this method to get the decoder's error code.
virtual int LastDecoderError() OVERRIDE;
int LastDecoderError() override;
// Flushes both the packet buffer and the sync buffer.
virtual void FlushBuffers() OVERRIDE;
void FlushBuffers() override;
virtual void PacketBufferStatistics(int* current_num_packets,
int* max_num_packets) const OVERRIDE;
void PacketBufferStatistics(int* current_num_packets,
int* max_num_packets) const override;
// Get sequence number and timestamp of the latest RTP.
// This method is to facilitate NACK.
virtual int DecodedRtpInfo(int* sequence_number,
uint32_t* timestamp) const OVERRIDE;
int DecodedRtpInfo(int* sequence_number, uint32_t* timestamp) const override;
// This accessor method is only intended for testing purposes.
const SyncBuffer* sync_buffer_for_test() const;

View File

@ -15,9 +15,9 @@
class NETEQTEST_DummyRTPpacket : public NETEQTEST_RTPpacket {
public:
virtual int readFromFile(FILE* fp) OVERRIDE;
virtual int writeToFile(FILE* fp) OVERRIDE;
virtual void parseHeader() OVERRIDE;
int readFromFile(FILE* fp) override;
int writeToFile(FILE* fp) override;
void parseHeader() override;
};
#endif // NETEQTEST_DUMMYRTPPACKET_H

View File

@ -88,8 +88,8 @@ static const bool runtime_dummy =
class NetEqIsacQualityTest : public NetEqQualityTest {
protected:
NetEqIsacQualityTest();
virtual void SetUp() OVERRIDE;
virtual void TearDown() OVERRIDE;
void SetUp() override;
void TearDown() override;
virtual int EncodeBlock(int16_t* in_data, int block_size_samples,
uint8_t* payload, int max_bytes);
private:

View File

@ -116,8 +116,8 @@ DEFINE_bool(dtx, true, "Whether to enable DTX for encoding.");
class NetEqOpusFecQualityTest : public NetEqQualityTest {
protected:
NetEqOpusFecQualityTest();
virtual void SetUp() OVERRIDE;
virtual void TearDown() OVERRIDE;
void SetUp() override;
void TearDown() override;
virtual int EncodeBlock(int16_t* in_data, int block_size_samples,
uint8_t* payload, int max_bytes);
private:

View File

@ -26,7 +26,7 @@ class AudioChecksum : public AudioSink {
public:
AudioChecksum() : finished_(false) {}
virtual bool WriteArray(const int16_t* audio, size_t num_samples) OVERRIDE {
bool WriteArray(const int16_t* audio, size_t num_samples) override {
if (finished_)
return false;

View File

@ -47,7 +47,7 @@ class AudioSinkFork : public AudioSink {
AudioSinkFork(AudioSink* left, AudioSink* right)
: left_sink_(left), right_sink_(right) {}
virtual bool WriteArray(const int16_t* audio, size_t num_samples) OVERRIDE {
bool WriteArray(const int16_t* audio, size_t num_samples) override {
return left_sink_->WriteArray(audio, num_samples) &&
right_sink_->WriteArray(audio, num_samples);
}

View File

@ -33,7 +33,7 @@ class ConstantPcmPacketSource : public PacketSource {
// Returns a pointer to the next packet. Will never return NULL. That is,
// the source is infinite.
Packet* NextPacket() OVERRIDE;
Packet* NextPacket() override;
private:
void WriteHeader(uint8_t* packet_memory);

View File

@ -33,13 +33,13 @@ class LossModel {
class NoLoss : public LossModel {
public:
virtual bool Lost() OVERRIDE;
bool Lost() override;
};
class UniformLoss : public LossModel {
public:
UniformLoss(double loss_rate);
virtual bool Lost() OVERRIDE;
bool Lost() override;
void set_loss_rate(double loss_rate) { loss_rate_ = loss_rate; }
private:
@ -49,7 +49,7 @@ class UniformLoss : public LossModel {
class GilbertElliotLoss : public LossModel {
public:
GilbertElliotLoss(double prob_trans_11, double prob_trans_01);
virtual bool Lost() OVERRIDE;
bool Lost() override;
private:
// Prob. of losing current packet, when previous packet is lost.
@ -69,8 +69,8 @@ class NetEqQualityTest : public ::testing::Test {
int channels,
std::string in_filename,
std::string out_filename);
virtual void SetUp() OVERRIDE;
virtual void TearDown() OVERRIDE;
void SetUp() override;
void TearDown() override;
// EncodeBlock(...) does the following:
// 1. encodes a block of audio, saved in |in_data| and has a length of

View File

@ -34,7 +34,7 @@ class OutputAudioFile : public AudioSink {
fclose(out_file_);
}
virtual bool WriteArray(const int16_t* audio, size_t num_samples) OVERRIDE {
bool WriteArray(const int16_t* audio, size_t num_samples) override {
assert(out_file_);
return fwrite(audio, sizeof(*audio), num_samples, out_file_) == num_samples;
}

View File

@ -27,7 +27,7 @@ class OutputWavFile : public AudioSink {
OutputWavFile(const std::string& file_name, int sample_rate_hz)
: wav_writer_(file_name, sample_rate_hz, 1) {}
virtual bool WriteArray(const int16_t* audio, size_t num_samples) OVERRIDE {
bool WriteArray(const int16_t* audio, size_t num_samples) override {
wav_writer_.WriteSamples(audio, num_samples);
return true;
}

View File

@ -41,7 +41,7 @@ class RtpFileSource : public PacketSource {
// Returns a pointer to the next packet. Returns NULL if end of file was
// reached, or if a the data was corrupt.
virtual Packet* NextPacket() OVERRIDE;
Packet* NextPacket() override;
private:
static const int kFirstLineLength = 40;

View File

@ -70,7 +70,7 @@ class TimestampJumpRtpGenerator : public RtpGenerator {
uint32_t GetRtpHeader(uint8_t payload_type,
size_t payload_length_samples,
WebRtcRTPHeader* rtp_header) OVERRIDE;
WebRtcRTPHeader* rtp_header) override;
private:
uint32_t jump_from_timestamp_;