Add RTC_ prefix to contructormagic macros.

We must remove dependency on Chromium, i.e. we can't use Chromium's base/logging.h. That means we need to define these macros in WebRTC also when doing Chromium builds. And this causes redefinition.

* DISALLOW_ASSIGN -> RTC_DISALLOW_ASSIGN
* DISALLOW_COPY_AND_ASSIGN -> RTC_DISALLOW_COPY_AND_ASSIGN
* DISALLOW_IMPLICIT_CONSTRUCTORS -> RTC_DISALLOW_IMPLICIT_CONSTRUCTORS

Related CL: https://codereview.webrtc.org/1335923002/

BUG=chromium:468375
NOTRY=true

Review URL: https://codereview.webrtc.org/1345433002

Cr-Commit-Position: refs/heads/master@{#9953}
This commit is contained in:
henrikg
2015-09-16 05:37:44 -07:00
committed by Commit bot
parent afb6b5e3e0
commit 3c089d751e
258 changed files with 411 additions and 418 deletions

View File

@ -115,7 +115,7 @@ class AudioDecoder {
SpeechType* speech_type);
private:
DISALLOW_COPY_AND_ASSIGN(AudioDecoder);
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoder);
};
} // namespace webrtc

View File

@ -91,7 +91,7 @@ class AudioEncoderIsacT final : public AudioEncoder {
// Timestamp of the previously encoded packet.
uint32_t last_encoded_timestamp_;
DISALLOW_COPY_AND_ASSIGN(AudioEncoderIsacT);
RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderIsacT);
};
template <typename T>
@ -122,7 +122,7 @@ class AudioDecoderIsacT final : public AudioDecoder {
LockedIsacBandwidthInfo* bwinfo_;
int decoder_sample_rate_hz_;
DISALLOW_COPY_AND_ASSIGN(AudioDecoderIsacT);
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderIsacT);
};
} // namespace webrtc

View File

@ -43,7 +43,7 @@ class AudioDecoderOpus : public AudioDecoder {
private:
OpusDecInst* dec_state_;
const size_t channels_;
DISALLOW_COPY_AND_ASSIGN(AudioDecoderOpus);
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderOpus);
};
} // namespace webrtc

View File

@ -56,7 +56,7 @@ class AcmReceiveTest {
const int output_freq_hz_;
NumOutputChannels expected_output_channels_;
DISALLOW_COPY_AND_ASSIGN(AcmReceiveTest);
RTC_DISALLOW_COPY_AND_ASSIGN(AcmReceiveTest);
};
} // namespace test

View File

@ -64,7 +64,7 @@ class AcmReceiveTestOldApi {
int output_freq_hz_;
NumOutputChannels exptected_output_channels_;
DISALLOW_COPY_AND_ASSIGN(AcmReceiveTestOldApi);
RTC_DISALLOW_COPY_AND_ASSIGN(AcmReceiveTestOldApi);
};
// This test toggles the output frequency every |toggle_period_ms|. The test

View File

@ -74,7 +74,7 @@ class AcmSendTest : public AudioPacketizationCallback, public PacketSource {
uint16_t sequence_number_;
std::vector<uint8_t> last_payload_vec_;
DISALLOW_COPY_AND_ASSIGN(AcmSendTest);
RTC_DISALLOW_COPY_AND_ASSIGN(AcmSendTest);
};
} // namespace test

View File

@ -83,7 +83,7 @@ class AcmSendTestOldApi : public AudioPacketizationCallback,
std::vector<uint8_t> last_payload_vec_;
bool data_to_send_;
DISALLOW_COPY_AND_ASSIGN(AcmSendTestOldApi);
RTC_DISALLOW_COPY_AND_ASSIGN(AcmSendTestOldApi);
};
} // namespace test

View File

@ -82,7 +82,7 @@ class CodecManager final {
CodecOwner codec_owner_;
bool encoder_is_opus_;
DISALLOW_COPY_AND_ASSIGN(CodecManager);
RTC_DISALLOW_COPY_AND_ASSIGN(CodecManager);
};
} // namespace acm2

View File

@ -70,7 +70,7 @@ class CodecOwner {
rtc::scoped_ptr<AudioEncoder> cng_encoder_;
rtc::scoped_ptr<AudioEncoder> red_encoder_;
DISALLOW_COPY_AND_ASSIGN(CodecOwner);
RTC_DISALLOW_COPY_AND_ASSIGN(CodecOwner);
};
} // namespace acm2

View File

@ -65,7 +65,7 @@ class Accelerate : public TimeStretch {
AudioMultiVector* output) const override;
private:
DISALLOW_COPY_AND_ASSIGN(Accelerate);
RTC_DISALLOW_COPY_AND_ASSIGN(Accelerate);
};
struct AccelerateFactory {

View File

@ -46,7 +46,7 @@ class AudioDecoderPcmU : public AudioDecoder {
SpeechType* speech_type) override;
private:
DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcmU);
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcmU);
};
class AudioDecoderPcmA : public AudioDecoder {
@ -64,7 +64,7 @@ class AudioDecoderPcmA : public AudioDecoder {
SpeechType* speech_type) override;
private:
DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcmA);
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcmA);
};
class AudioDecoderPcmUMultiCh : public AudioDecoderPcmU {
@ -77,7 +77,7 @@ class AudioDecoderPcmUMultiCh : public AudioDecoderPcmU {
private:
const size_t channels_;
DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcmUMultiCh);
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcmUMultiCh);
};
class AudioDecoderPcmAMultiCh : public AudioDecoderPcmA {
@ -90,7 +90,7 @@ class AudioDecoderPcmAMultiCh : public AudioDecoderPcmA {
private:
const size_t channels_;
DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcmAMultiCh);
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcmAMultiCh);
};
#ifdef WEBRTC_CODEC_PCM16
@ -111,7 +111,7 @@ class AudioDecoderPcm16B : public AudioDecoder {
SpeechType* speech_type) override;
private:
DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcm16B);
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcm16B);
};
// This class handles all four types (i.e., sample rates) of PCM16B codecs.
@ -124,7 +124,7 @@ class AudioDecoderPcm16BMultiCh : public AudioDecoderPcm16B {
private:
const size_t channels_;
DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcm16BMultiCh);
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcm16BMultiCh);
};
#endif
@ -147,7 +147,7 @@ class AudioDecoderIlbc : public AudioDecoder {
private:
IlbcDecoderInstance* dec_state_;
DISALLOW_COPY_AND_ASSIGN(AudioDecoderIlbc);
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderIlbc);
};
#endif
@ -170,7 +170,7 @@ class AudioDecoderG722 : public AudioDecoder {
private:
G722DecInst* dec_state_;
DISALLOW_COPY_AND_ASSIGN(AudioDecoderG722);
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderG722);
};
class AudioDecoderG722Stereo : public AudioDecoder {
@ -199,7 +199,7 @@ class AudioDecoderG722Stereo : public AudioDecoder {
G722DecInst* dec_state_left_;
G722DecInst* dec_state_right_;
DISALLOW_COPY_AND_ASSIGN(AudioDecoderG722Stereo);
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderG722Stereo);
};
#endif
@ -232,7 +232,7 @@ class AudioDecoderCng : public AudioDecoder {
private:
CNG_dec_inst* dec_state_;
DISALLOW_COPY_AND_ASSIGN(AudioDecoderCng);
RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderCng);
};
enum NetEqDecoder {

View File

@ -132,7 +132,7 @@ class AudioMultiVector {
size_t num_channels_;
private:
DISALLOW_COPY_AND_ASSIGN(AudioMultiVector);
RTC_DISALLOW_COPY_AND_ASSIGN(AudioMultiVector);
};
} // namespace webrtc

View File

@ -105,7 +105,7 @@ class AudioVector {
// Note that this index may point outside of array_.
size_t capacity_; // Allocated number of samples in the array.
DISALLOW_COPY_AND_ASSIGN(AudioVector);
RTC_DISALLOW_COPY_AND_ASSIGN(AudioVector);
};
} // namespace webrtc

View File

@ -130,7 +130,7 @@ class BackgroundNoise {
bool initialized_;
NetEq::BackgroundNoiseMode mode_;
DISALLOW_COPY_AND_ASSIGN(BackgroundNoise);
RTC_DISALLOW_COPY_AND_ASSIGN(BackgroundNoise);
};
} // namespace webrtc

View File

@ -42,7 +42,7 @@ class BufferLevelFilter {
int level_factor_; // Filter factor for the buffer level filter in Q8.
int filtered_current_level_; // Filtered current buffer level in Q8.
DISALLOW_COPY_AND_ASSIGN(BufferLevelFilter);
RTC_DISALLOW_COPY_AND_ASSIGN(BufferLevelFilter);
};
} // namespace webrtc

View File

@ -66,7 +66,7 @@ class ComfortNoise {
DecoderDatabase* decoder_database_;
SyncBuffer* sync_buffer_;
int internal_error_code_;
DISALLOW_COPY_AND_ASSIGN(ComfortNoise);
RTC_DISALLOW_COPY_AND_ASSIGN(ComfortNoise);
};
} // namespace webrtc

View File

@ -161,7 +161,7 @@ class DecisionLogic {
const NetEqPlayoutMode playout_mode_;
private:
DISALLOW_COPY_AND_ASSIGN(DecisionLogic);
RTC_DISALLOW_COPY_AND_ASSIGN(DecisionLogic);
};
} // namespace webrtc

View File

@ -53,7 +53,7 @@ class DecisionLogicFax : public DecisionLogic {
bool* reset_decoder) override;
private:
DISALLOW_COPY_AND_ASSIGN(DecisionLogicFax);
RTC_DISALLOW_COPY_AND_ASSIGN(DecisionLogicFax);
};
} // namespace webrtc

View File

@ -99,7 +99,7 @@ class DecisionLogicNormal : public DecisionLogic {
// Checks if num_consecutive_expands_ >= kMaxWaitForPacket.
bool MaxWaitForPacket() const;
DISALLOW_COPY_AND_ASSIGN(DecisionLogicNormal);
RTC_DISALLOW_COPY_AND_ASSIGN(DecisionLogicNormal);
};
} // namespace webrtc

View File

@ -147,7 +147,7 @@ class DecoderDatabase {
int active_decoder_;
int active_cng_decoder_;
DISALLOW_COPY_AND_ASSIGN(DecoderDatabase);
RTC_DISALLOW_COPY_AND_ASSIGN(DecoderDatabase);
};
} // namespace webrtc

View File

@ -157,7 +157,7 @@ class DelayManager {
DelayPeakDetector& peak_detector_;
int last_pack_cng_or_dtmf_;
DISALLOW_COPY_AND_ASSIGN(DelayManager);
RTC_DISALLOW_COPY_AND_ASSIGN(DelayManager);
};
} // namespace webrtc

View File

@ -69,7 +69,7 @@ class DelayPeakDetector {
int peak_detection_threshold_;
int peak_period_counter_ms_;
DISALLOW_COPY_AND_ASSIGN(DelayPeakDetector);
RTC_DISALLOW_COPY_AND_ASSIGN(DelayPeakDetector);
};
} // namespace webrtc

View File

@ -130,7 +130,7 @@ class DspHelper {
// Table of constants used in method DspHelper::ParabolicFit().
static const int16_t kParabolaCoefficients[17][3];
DISALLOW_COPY_AND_ASSIGN(DspHelper);
RTC_DISALLOW_COPY_AND_ASSIGN(DspHelper);
};
} // namespace webrtc

View File

@ -107,7 +107,7 @@ class DtmfBuffer {
DtmfList buffer_;
DISALLOW_COPY_AND_ASSIGN(DtmfBuffer);
RTC_DISALLOW_COPY_AND_ASSIGN(DtmfBuffer);
};
} // namespace webrtc

View File

@ -48,7 +48,7 @@ class DtmfToneGenerator {
int16_t sample_history1_[2]; // Last 2 samples for the 1st oscillator.
int16_t sample_history2_[2]; // Last 2 samples for the 2nd oscillator.
DISALLOW_COPY_AND_ASSIGN(DtmfToneGenerator);
RTC_DISALLOW_COPY_AND_ASSIGN(DtmfToneGenerator);
};
} // namespace webrtc

View File

@ -140,7 +140,7 @@ class Expand {
size_t expand_duration_samples_;
rtc::scoped_ptr<ChannelParameters[]> channel_parameters_;
DISALLOW_COPY_AND_ASSIGN(Expand);
RTC_DISALLOW_COPY_AND_ASSIGN(Expand);
};
struct ExpandFactory {

View File

@ -281,7 +281,7 @@ class NetEq {
NetEq() {}
private:
DISALLOW_COPY_AND_ASSIGN(NetEq);
RTC_DISALLOW_COPY_AND_ASSIGN(NetEq);
};
} // namespace webrtc

View File

@ -96,7 +96,7 @@ class Merge {
int16_t input_downsampled_[kInputDownsampLength];
AudioMultiVector expanded_;
DISALLOW_COPY_AND_ASSIGN(Merge);
RTC_DISALLOW_COPY_AND_ASSIGN(Merge);
};
} // namespace webrtc

View File

@ -43,7 +43,7 @@ class ExternalPcm16B : public AudioDecoder {
size_t Channels() const override { return 1; }
private:
DISALLOW_COPY_AND_ASSIGN(ExternalPcm16B);
RTC_DISALLOW_COPY_AND_ASSIGN(ExternalPcm16B);
};
// Create a mock of ExternalPcm16B which delegates all calls to the real object.

View File

@ -399,7 +399,7 @@ class NetEqImpl : public webrtc::NetEq {
uint32_t decoded_packet_timestamp_ GUARDED_BY(crit_sect_);
private:
DISALLOW_COPY_AND_ASSIGN(NetEqImpl);
RTC_DISALLOW_COPY_AND_ASSIGN(NetEqImpl);
};
} // namespace webrtc

View File

@ -61,7 +61,7 @@ class Normal {
const BackgroundNoise& background_noise_;
Expand* expand_;
DISALLOW_COPY_AND_ASSIGN(Normal);
RTC_DISALLOW_COPY_AND_ASSIGN(Normal);
};
} // namespace webrtc

View File

@ -148,7 +148,7 @@ class PacketBuffer {
private:
size_t max_number_of_packets_;
PacketList buffer_;
DISALLOW_COPY_AND_ASSIGN(PacketBuffer);
RTC_DISALLOW_COPY_AND_ASSIGN(PacketBuffer);
};
} // namespace webrtc

View File

@ -83,7 +83,7 @@ class PayloadSplitter {
uint32_t timestamps_per_frame,
PacketList* new_packets);
DISALLOW_COPY_AND_ASSIGN(PayloadSplitter);
RTC_DISALLOW_COPY_AND_ASSIGN(PayloadSplitter);
};
} // namespace webrtc

View File

@ -65,7 +65,7 @@ class PostDecodeVad {
int sid_interval_counter_;
::VadInst* vad_instance_;
DISALLOW_COPY_AND_ASSIGN(PostDecodeVad);
RTC_DISALLOW_COPY_AND_ASSIGN(PostDecodeVad);
};
} // namespace webrtc

View File

@ -70,7 +70,7 @@ class PreemptiveExpand : public TimeStretch {
size_t old_data_length_per_channel_;
size_t overlap_samples_;
DISALLOW_COPY_AND_ASSIGN(PreemptiveExpand);
RTC_DISALLOW_COPY_AND_ASSIGN(PreemptiveExpand);
};
struct PreemptiveExpandFactory {

View File

@ -43,7 +43,7 @@ class RandomVector {
uint32_t seed_;
int16_t seed_increment_;
DISALLOW_COPY_AND_ASSIGN(RandomVector);
RTC_DISALLOW_COPY_AND_ASSIGN(RandomVector);
};
} // namespace webrtc

View File

@ -51,7 +51,7 @@ class Rtcp {
uint32_t jitter_; // Current jitter value.
int32_t transit_; // Clock difference for previous packet.
DISALLOW_COPY_AND_ASSIGN(Rtcp);
RTC_DISALLOW_COPY_AND_ASSIGN(Rtcp);
};
} // namespace webrtc

View File

@ -160,7 +160,7 @@ class StatisticsCalculator {
PeriodicUmaCount delayed_packet_outage_counter_;
PeriodicUmaAverage excess_buffer_delay_;
DISALLOW_COPY_AND_ASSIGN(StatisticsCalculator);
RTC_DISALLOW_COPY_AND_ASSIGN(StatisticsCalculator);
};
} // namespace webrtc

View File

@ -92,7 +92,7 @@ class SyncBuffer : public AudioMultiVector {
uint32_t end_timestamp_; // The timestamp of the last sample in the buffer.
size_t dtmf_index_; // Index to the first non-DTMF sample in the buffer.
DISALLOW_COPY_AND_ASSIGN(SyncBuffer);
RTC_DISALLOW_COPY_AND_ASSIGN(SyncBuffer);
};
} // namespace webrtc

View File

@ -109,7 +109,7 @@ class TimeStretch {
bool SpeechDetection(int32_t vec1_energy, int32_t vec2_energy,
size_t peak_index, int scaling) const;
DISALLOW_COPY_AND_ASSIGN(TimeStretch);
RTC_DISALLOW_COPY_AND_ASSIGN(TimeStretch);
};
} // namespace webrtc

View File

@ -61,7 +61,7 @@ class TimestampScaler {
uint32_t internal_ref_;
const DecoderDatabase& decoder_database_;
DISALLOW_COPY_AND_ASSIGN(TimestampScaler);
RTC_DISALLOW_COPY_AND_ASSIGN(TimestampScaler);
};
} // namespace webrtc

View File

@ -51,7 +51,7 @@ class AudioChecksum : public AudioSink {
char checksum_result_[rtc::Md5Digest::kSize];
bool finished_;
DISALLOW_COPY_AND_ASSIGN(AudioChecksum);
RTC_DISALLOW_COPY_AND_ASSIGN(AudioChecksum);
};
} // namespace test

View File

@ -51,7 +51,7 @@ class AudioLoop {
size_t block_length_samples_;
rtc::scoped_ptr<int16_t[]> audio_array_;
DISALLOW_COPY_AND_ASSIGN(AudioLoop);
RTC_DISALLOW_COPY_AND_ASSIGN(AudioLoop);
};
} // namespace test

View File

@ -38,7 +38,7 @@ class AudioSink {
}
private:
DISALLOW_COPY_AND_ASSIGN(AudioSink);
RTC_DISALLOW_COPY_AND_ASSIGN(AudioSink);
};
// Forks the output audio to two AudioSink objects.
@ -56,7 +56,7 @@ class AudioSinkFork : public AudioSink {
AudioSink* left_sink_;
AudioSink* right_sink_;
DISALLOW_COPY_AND_ASSIGN(AudioSinkFork);
RTC_DISALLOW_COPY_AND_ASSIGN(AudioSinkFork);
};
} // namespace test
} // namespace webrtc

View File

@ -49,7 +49,7 @@ class ConstantPcmPacketSource : public PacketSource {
uint32_t timestamp_;
const uint32_t payload_ssrc_;
DISALLOW_COPY_AND_ASSIGN(ConstantPcmPacketSource);
RTC_DISALLOW_COPY_AND_ASSIGN(ConstantPcmPacketSource);
};
} // namespace test

View File

@ -50,7 +50,7 @@ class InputAudioFile {
private:
FILE* fp_;
DISALLOW_COPY_AND_ASSIGN(InputAudioFile);
RTC_DISALLOW_COPY_AND_ASSIGN(InputAudioFile);
};
} // namespace test

View File

@ -42,7 +42,7 @@ class OutputAudioFile : public AudioSink {
private:
FILE* out_file_;
DISALLOW_COPY_AND_ASSIGN(OutputAudioFile);
RTC_DISALLOW_COPY_AND_ASSIGN(OutputAudioFile);
};
} // namespace test

View File

@ -35,7 +35,7 @@ class OutputWavFile : public AudioSink {
private:
WavWriter wav_writer_;
DISALLOW_COPY_AND_ASSIGN(OutputWavFile);
RTC_DISALLOW_COPY_AND_ASSIGN(OutputWavFile);
};
} // namespace test

View File

@ -114,7 +114,7 @@ class Packet {
double time_ms_; // Used to denote a packet's arrival time.
bool valid_header_; // Set by the RtpHeaderParser.
DISALLOW_COPY_AND_ASSIGN(Packet);
RTC_DISALLOW_COPY_AND_ASSIGN(Packet);
};
} // namespace test

View File

@ -46,7 +46,7 @@ class PacketSource {
uint32_t ssrc_; // The selected SSRC. All other SSRCs will be discarded.
private:
DISALLOW_COPY_AND_ASSIGN(PacketSource);
RTC_DISALLOW_COPY_AND_ASSIGN(PacketSource);
};
} // namespace test

View File

@ -43,7 +43,7 @@ class ResampleInputAudioFile : public InputAudioFile {
const int file_rate_hz_;
int output_rate_hz_;
Resampler resampler_;
DISALLOW_COPY_AND_ASSIGN(ResampleInputAudioFile);
RTC_DISALLOW_COPY_AND_ASSIGN(ResampleInputAudioFile);
};
} // namespace test

View File

@ -61,7 +61,7 @@ class RtcEventLogSource : public PacketSource {
rtc::scoped_ptr<rtclog::EventStream> event_log_;
rtc::scoped_ptr<RtpHeaderParser> parser_;
DISALLOW_COPY_AND_ASSIGN(RtcEventLogSource);
RTC_DISALLOW_COPY_AND_ASSIGN(RtcEventLogSource);
};
} // namespace test

View File

@ -55,7 +55,7 @@ class RtpFileSource : public PacketSource {
rtc::scoped_ptr<RtpFileReader> rtp_reader_;
rtc::scoped_ptr<RtpHeaderParser> parser_;
DISALLOW_COPY_AND_ASSIGN(RtpFileSource);
RTC_DISALLOW_COPY_AND_ASSIGN(RtpFileSource);
};
} // namespace test

View File

@ -54,7 +54,7 @@ class RtpGenerator {
double drift_factor_;
private:
DISALLOW_COPY_AND_ASSIGN(RtpGenerator);
RTC_DISALLOW_COPY_AND_ASSIGN(RtpGenerator);
};
class TimestampJumpRtpGenerator : public RtpGenerator {
@ -75,7 +75,7 @@ class TimestampJumpRtpGenerator : public RtpGenerator {
private:
uint32_t jump_from_timestamp_;
uint32_t jump_to_timestamp_;
DISALLOW_COPY_AND_ASSIGN(TimestampJumpRtpGenerator);
RTC_DISALLOW_COPY_AND_ASSIGN(TimestampJumpRtpGenerator);
};
} // namespace test