Index: webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc |
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc |
index 9cd5ac337be1589e680bb27f2e10a6a656710ab0..fba45478629cdbba70942014464828293d5a137d 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc |
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc |
@@ -134,13 +134,13 @@ class OneBitVectorChunk : public PacketStatusChunk { |
buffer[0] = 0x80u; |
for (int i = 0; i < kSymbolsInFirstByte; ++i) { |
uint8_t encoded_symbol = EncodeSymbol(symbols_[i]); |
- DCHECK_LE(encoded_symbol, 1u); |
+ RTC_DCHECK_LE(encoded_symbol, 1u); |
buffer[0] |= encoded_symbol << (kSymbolsInFirstByte - (i + 1)); |
} |
buffer[1] = 0x00u; |
for (int i = 0; i < kSymbolsInSecondByte; ++i) { |
uint8_t encoded_symbol = EncodeSymbol(symbols_[i + kSymbolsInFirstByte]); |
- DCHECK_LE(encoded_symbol, 1u); |
+ RTC_DCHECK_LE(encoded_symbol, 1u); |
buffer[1] |= encoded_symbol << (kSymbolsInSecondByte - (i + 1)); |
} |
} |
@@ -248,7 +248,7 @@ class RunLengthChunk : public PacketStatusChunk { |
public: |
RunLengthChunk(TransportFeedback::StatusSymbol symbol, size_t size) |
: symbol_(symbol), size_(size) { |
- DCHECK_LE(size, 0x1FFFu); |
+ RTC_DCHECK_LE(size, 0x1FFFu); |
} |
virtual ~RunLengthChunk() {} |
@@ -267,7 +267,7 @@ class RunLengthChunk : public PacketStatusChunk { |
} |
static RunLengthChunk* ParseFrom(const uint8_t* buffer) { |
- DCHECK_EQ(0, buffer[0] & 0x80); |
+ RTC_DCHECK_EQ(0, buffer[0] & 0x80); |
TransportFeedback::StatusSymbol symbol = |
DecodeSymbol((buffer[0] >> 5) & 0x03); |
uint16_t count = (static_cast<uint16_t>(buffer[0] & 0x1F) << 8) | buffer[1]; |
@@ -314,8 +314,8 @@ uint32_t TransportFeedback::GetMediaSourceSsrc() const { |
} |
void TransportFeedback::WithBase(uint16_t base_sequence, |
int64_t ref_timestamp_us) { |
- DCHECK_EQ(-1, base_seq_); |
- DCHECK_NE(-1, ref_timestamp_us); |
+ RTC_DCHECK_EQ(-1, base_seq_); |
+ RTC_DCHECK_NE(-1, ref_timestamp_us); |
base_seq_ = base_sequence; |
last_seq_ = base_sequence; |
base_time_ = ref_timestamp_us / kBaseScaleFactor; |
@@ -328,7 +328,7 @@ void TransportFeedback::WithFeedbackSequenceNumber(uint8_t feedback_sequence) { |
bool TransportFeedback::WithReceivedPacket(uint16_t sequence_number, |
int64_t timestamp) { |
- DCHECK_NE(-1, base_seq_); |
+ RTC_DCHECK_NE(-1, base_seq_); |
int64_t seq = Unwrap(sequence_number); |
if (seq != base_seq_ && seq <= last_seq_) |
return false; |
@@ -520,7 +520,7 @@ void TransportFeedback::EmitVectorChunk() { |
} |
void TransportFeedback::EmitRunLengthChunk() { |
- DCHECK_GE(first_symbol_cardinality_, symbol_vec_.size()); |
+ RTC_DCHECK_GE(first_symbol_cardinality_, symbol_vec_.size()); |
status_chunks_.push_back( |
new RunLengthChunk(symbol_vec_.front(), first_symbol_cardinality_)); |
symbol_vec_.clear(); |
@@ -585,12 +585,12 @@ bool TransportFeedback::Create(uint8_t* packet, |
ByteWriter<uint32_t>::WriteBigEndian(&packet[*position], media_source_ssrc_); |
*position += 4; |
- DCHECK_LE(base_seq_, 0xFFFF); |
+ RTC_DCHECK_LE(base_seq_, 0xFFFF); |
ByteWriter<uint16_t>::WriteBigEndian(&packet[*position], base_seq_); |
*position += 2; |
int64_t status_count = last_seq_ - base_seq_ + 1; |
- DCHECK_LE(status_count, 0xFFFF); |
+ RTC_DCHECK_LE(status_count, 0xFFFF); |
ByteWriter<uint16_t>::WriteBigEndian(&packet[*position], status_count); |
*position += 2; |
@@ -714,7 +714,7 @@ rtc::scoped_ptr<TransportFeedback> TransportFeedback::ParseFrom( |
std::vector<StatusSymbol> symbols = packet->GetStatusVector(); |
- DCHECK_EQ(num_packets, symbols.size()); |
+ RTC_DCHECK_EQ(num_packets, symbols.size()); |
for (StatusSymbol symbol : symbols) { |
switch (symbol) { |
@@ -740,8 +740,8 @@ rtc::scoped_ptr<TransportFeedback> TransportFeedback::ParseFrom( |
} |
} |
- DCHECK_GE(index, end_index - 3); |
- DCHECK_LE(index, end_index); |
+ RTC_DCHECK_GE(index, end_index - 3); |
+ RTC_DCHECK_LE(index, end_index); |
return packet; |
} |