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

Unified Diff: webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.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/red/audio_encoder_copy_red.cc
diff --git a/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc b/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc
index c8ae53fe29e76521d8e8ac87cbd55046f1d52dc7..a19d194e593d45c9593983423893ec17a2a394db 100644
--- a/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc
+++ b/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc
@@ -19,7 +19,7 @@ namespace webrtc {
AudioEncoderCopyRed::AudioEncoderCopyRed(const Config& config)
: speech_encoder_(config.speech_encoder),
red_payload_type_(config.payload_type) {
- CHECK(speech_encoder_) << "Speech encoder not provided.";
+ RTC_CHECK(speech_encoder_) << "Speech encoder not provided.";
}
AudioEncoderCopyRed::~AudioEncoderCopyRed() = default;
@@ -60,26 +60,26 @@ AudioEncoder::EncodedInfo AudioEncoderCopyRed::EncodeInternal(
EncodedInfo info = speech_encoder_->Encode(
rtp_timestamp, audio, static_cast<size_t>(SampleRateHz() / 100),
max_encoded_bytes, encoded);
- CHECK_GE(max_encoded_bytes,
- info.encoded_bytes + secondary_info_.encoded_bytes);
- CHECK(info.redundant.empty()) << "Cannot use nested redundant encoders.";
+ RTC_CHECK_GE(max_encoded_bytes,
+ info.encoded_bytes + secondary_info_.encoded_bytes);
+ RTC_CHECK(info.redundant.empty()) << "Cannot use nested redundant encoders.";
if (info.encoded_bytes > 0) {
// |info| will be implicitly cast to an EncodedInfoLeaf struct, effectively
// discarding the (empty) vector of redundant information. This is
// intentional.
info.redundant.push_back(info);
- DCHECK_EQ(info.redundant.size(), 1u);
+ RTC_DCHECK_EQ(info.redundant.size(), 1u);
if (secondary_info_.encoded_bytes > 0) {
memcpy(&encoded[info.encoded_bytes], secondary_encoded_.data(),
secondary_info_.encoded_bytes);
info.redundant.push_back(secondary_info_);
- DCHECK_EQ(info.redundant.size(), 2u);
+ RTC_DCHECK_EQ(info.redundant.size(), 2u);
}
// Save primary to secondary.
secondary_encoded_.SetData(encoded, info.encoded_bytes);
secondary_info_ = info;
- DCHECK_EQ(info.speech, info.redundant[0].speech);
+ RTC_DCHECK_EQ(info.speech, info.redundant[0].speech);
}
// Update main EncodedInfo.
info.payload_type = red_payload_type_;

Powered by Google App Engine
This is Rietveld 408576698