aboutsummaryrefslogtreecommitdiff
path: root/webrtc/modules/audio_coding/codecs/audio_encoder.cc
diff options
context:
space:
mode:
authorhenrikg <henrikg@webrtc.org>2015-09-17 00:24:34 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-17 07:24:51 +0000
commit91d6edef35e7275879c30ce16ecb8b6dc73c6e4a (patch)
tree313b64a3d88422a53f5b091f770a2d33dce823ce /webrtc/modules/audio_coding/codecs/audio_encoder.cc
parentc0ac6cad00f51b99fafaa7c19e2e63b3b542735b (diff)
downloadwebrtc-91d6edef35e7275879c30ce16ecb8b6dc73c6e4a.tar.gz
Add RTC_ prefix to (D)CHECKs and related 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. Alternative solutions: * Check if we already have defined e.g. CHECK, and don't define them in that case. This makes us depend on include order in Chromium, which is not acceptable. * Don't allow using the macros in WebRTC headers. Error prone since if someone adds it there by mistake it may compile fine, but later break if a header in added or order is changed in Chromium. That will be confusing and hard to enforce. * Ensure that headers that are included by an embedder don't include our macros. This would require some heavy refactoring to be maintainable and enforcable. * Changes in Chromium for this is obviously not an option. BUG=chromium:468375 NOTRY=true Review URL: https://codereview.webrtc.org/1335923002 Cr-Commit-Position: refs/heads/master@{#9964}
Diffstat (limited to 'webrtc/modules/audio_coding/codecs/audio_encoder.cc')
-rw-r--r--webrtc/modules/audio_coding/codecs/audio_encoder.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/webrtc/modules/audio_coding/codecs/audio_encoder.cc b/webrtc/modules/audio_coding/codecs/audio_encoder.cc
index c0c20bec4d..6d763005ac 100644
--- a/webrtc/modules/audio_coding/codecs/audio_encoder.cc
+++ b/webrtc/modules/audio_coding/codecs/audio_encoder.cc
@@ -26,11 +26,11 @@ AudioEncoder::EncodedInfo AudioEncoder::Encode(uint32_t rtp_timestamp,
size_t num_samples_per_channel,
size_t max_encoded_bytes,
uint8_t* encoded) {
- CHECK_EQ(num_samples_per_channel,
- static_cast<size_t>(SampleRateHz() / 100));
+ RTC_CHECK_EQ(num_samples_per_channel,
+ static_cast<size_t>(SampleRateHz() / 100));
EncodedInfo info =
EncodeInternal(rtp_timestamp, audio, max_encoded_bytes, encoded);
- CHECK_LE(info.encoded_bytes, max_encoded_bytes);
+ RTC_CHECK_LE(info.encoded_bytes, max_encoded_bytes);
return info;
}