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

Unified Diff: webrtc/modules/audio_coding/main/acm2/codec_manager.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/main/acm2/codec_manager.cc
diff --git a/webrtc/modules/audio_coding/main/acm2/codec_manager.cc b/webrtc/modules/audio_coding/main/acm2/codec_manager.cc
index c2e07ebd7b5b2f7c7d5933451cba19442b27cb74..39905ad5ee469b8688d979f86f45eea6dfde62fe 100644
--- a/webrtc/modules/audio_coding/main/acm2/codec_manager.cc
+++ b/webrtc/modules/audio_coding/main/acm2/codec_manager.cc
@@ -185,7 +185,7 @@ CodecManager::CodecManager()
CodecManager::~CodecManager() = default;
int CodecManager::RegisterEncoder(const CodecInst& send_codec) {
- DCHECK(thread_checker_.CalledOnValidThread());
+ RTC_DCHECK(thread_checker_.CalledOnValidThread());
int codec_id = IsValidSendCodec(send_codec, true);
// Check for reported errors from function IsValidSendCodec().
@@ -264,7 +264,7 @@ int CodecManager::RegisterEncoder(const CodecInst& send_codec) {
bool new_codec = true;
if (codec_owner_.Encoder()) {
int new_codec_id = ACMCodecDB::CodecNumber(send_codec_inst_);
- DCHECK_GE(new_codec_id, 0);
+ RTC_DCHECK_GE(new_codec_id, 0);
new_codec = new_codec_id != codec_id;
}
@@ -276,7 +276,7 @@ int CodecManager::RegisterEncoder(const CodecInst& send_codec) {
if (new_codec) {
// This is a new codec. Register it and return.
- DCHECK(CodecSupported(send_codec));
+ RTC_DCHECK(CodecSupported(send_codec));
if (IsOpus(send_codec)) {
// VAD/DTX not supported.
dtx_enabled_ = false;
@@ -284,7 +284,7 @@ int CodecManager::RegisterEncoder(const CodecInst& send_codec) {
codec_owner_.SetEncoders(
send_codec, dtx_enabled_ ? CngPayloadType(send_codec.plfreq) : -1,
vad_mode_, red_enabled_ ? RedPayloadType(send_codec.plfreq) : -1);
- DCHECK(codec_owner_.Encoder());
+ RTC_DCHECK(codec_owner_.Encoder());
codec_fec_enabled_ = codec_fec_enabled_ &&
codec_owner_.Encoder()->SetFec(codec_fec_enabled_);
@@ -300,7 +300,7 @@ int CodecManager::RegisterEncoder(const CodecInst& send_codec) {
codec_owner_.SetEncoders(
send_codec, dtx_enabled_ ? CngPayloadType(send_codec.plfreq) : -1,
vad_mode_, red_enabled_ ? RedPayloadType(send_codec.plfreq) : -1);
- DCHECK(codec_owner_.Encoder());
+ RTC_DCHECK(codec_owner_.Encoder());
}
send_codec_inst_.plfreq = send_codec.plfreq;
send_codec_inst_.pacsize = send_codec.pacsize;
@@ -381,8 +381,8 @@ bool CodecManager::SetCopyRed(bool enable) {
int CodecManager::SetVAD(bool enable, ACMVADMode mode) {
// Sanity check of the mode.
- DCHECK(mode == VADNormal || mode == VADLowBitrate || mode == VADAggr ||
- mode == VADVeryAggr);
+ RTC_DCHECK(mode == VADNormal || mode == VADLowBitrate || mode == VADAggr ||
+ mode == VADVeryAggr);
// Check that the send codec is mono. We don't support VAD/DTX for stereo
// sending.
@@ -427,7 +427,7 @@ int CodecManager::SetCodecFEC(bool enable_codec_fec) {
return -1;
}
- CHECK(codec_owner_.Encoder());
+ RTC_CHECK(codec_owner_.Encoder());
codec_fec_enabled_ =
codec_owner_.Encoder()->SetFec(enable_codec_fec) && enable_codec_fec;
return codec_fec_enabled_ == enable_codec_fec ? 0 : -1;

Powered by Google App Engine
This is Rietveld 408576698