Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc

Issue 1335923002: Add RTC_ prefix to (D)CHECKs and related macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc
diff --git a/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc b/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc
index f7812b34f7db9082c6f23449df3532a52d7bc15a..dde3cc6799871dc1175d215858b1ca1cb6ca6fb2 100644
--- a/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc
+++ b/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.cc
@@ -24,7 +24,7 @@ int16_t NumSamplesPerFrame(int num_channels,
int frame_size_ms,
int sample_rate_hz) {
int samples_per_frame = num_channels * frame_size_ms * sample_rate_hz / 1000;
- CHECK_LE(samples_per_frame, std::numeric_limits<int16_t>::max())
+ RTC_CHECK_LE(samples_per_frame, std::numeric_limits<int16_t>::max())
<< "Frame size too large.";
return static_cast<int16_t>(samples_per_frame);
}
@@ -54,8 +54,8 @@ AudioEncoderPcm::AudioEncoderPcm(const Config& config, int sample_rate_hz)
config.frame_size_ms,
sample_rate_hz_)),
first_timestamp_in_buffer_(0) {
- CHECK_GT(sample_rate_hz, 0) << "Sample rate must be larger than 0 Hz";
- CHECK_EQ(config.frame_size_ms % 10, 0)
+ RTC_CHECK_GT(sample_rate_hz, 0) << "Sample rate must be larger than 0 Hz";
+ RTC_CHECK_EQ(config.frame_size_ms % 10, 0)
<< "Frame size must be an integer multiple of 10 ms.";
speech_buffer_.reserve(full_frame_samples_);
}
@@ -101,8 +101,8 @@ AudioEncoder::EncodedInfo AudioEncoderPcm::EncodeInternal(
if (speech_buffer_.size() < full_frame_samples_) {
return EncodedInfo();
}
- CHECK_EQ(speech_buffer_.size(), full_frame_samples_);
- CHECK_GE(max_encoded_bytes, full_frame_samples_);
+ RTC_CHECK_EQ(speech_buffer_.size(), full_frame_samples_);
+ RTC_CHECK_GE(max_encoded_bytes, full_frame_samples_);
EncodedInfo info;
info.encoded_timestamp = first_timestamp_in_buffer_;
info.payload_type = payload_type_;

Powered by Google App Engine
This is Rietveld 408576698