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

Unified Diff: webrtc/video/video_send_stream.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
« no previous file with comments | « webrtc/video/video_receive_stream.cc ('k') | webrtc/video/video_send_stream_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_send_stream.cc
diff --git a/webrtc/video/video_send_stream.cc b/webrtc/video/video_send_stream.cc
index 42ad774a7c6e783a9ce1dda2d6e5bf4049d9f3c6..2ab4eaabdacf514519aa43fa5909d4ea98531506 100644
--- a/webrtc/video/video_send_stream.cc
+++ b/webrtc/video/video_send_stream.cc
@@ -117,9 +117,9 @@ VideoSendStream::VideoSendStream(
channel_id_(channel_id),
use_config_bitrate_(true),
stats_proxy_(Clock::GetRealTimeClock(), config) {
- DCHECK(!config_.rtp.ssrcs.empty());
- CHECK(channel_group->CreateSendChannel(channel_id_, 0, &transport_adapter_,
- num_cpu_cores, config_.rtp.ssrcs));
+ RTC_DCHECK(!config_.rtp.ssrcs.empty());
+ RTC_CHECK(channel_group->CreateSendChannel(
+ channel_id_, 0, &transport_adapter_, num_cpu_cores, config_.rtp.ssrcs));
vie_channel_ = channel_group_->GetChannel(channel_id_);
vie_encoder_ = channel_group_->GetEncoder(channel_id_);
@@ -127,16 +127,16 @@ VideoSendStream::VideoSendStream(
const std::string& extension = config_.rtp.extensions[i].name;
int id = config_.rtp.extensions[i].id;
// One-byte-extension local identifiers are in the range 1-14 inclusive.
- DCHECK_GE(id, 1);
- DCHECK_LE(id, 14);
+ RTC_DCHECK_GE(id, 1);
+ RTC_DCHECK_LE(id, 14);
if (extension == RtpExtension::kTOffset) {
- CHECK_EQ(0, vie_channel_->SetSendTimestampOffsetStatus(true, id));
+ RTC_CHECK_EQ(0, vie_channel_->SetSendTimestampOffsetStatus(true, id));
} else if (extension == RtpExtension::kAbsSendTime) {
- CHECK_EQ(0, vie_channel_->SetSendAbsoluteSendTimeStatus(true, id));
+ RTC_CHECK_EQ(0, vie_channel_->SetSendAbsoluteSendTimeStatus(true, id));
} else if (extension == RtpExtension::kVideoRotation) {
- CHECK_EQ(0, vie_channel_->SetSendVideoRotationStatus(true, id));
+ RTC_CHECK_EQ(0, vie_channel_->SetSendVideoRotationStatus(true, id));
} else if (extension == RtpExtension::kTransportSequenceNumber) {
- CHECK_EQ(0, vie_channel_->SetSendTransportSequenceNumber(true, id));
+ RTC_CHECK_EQ(0, vie_channel_->SetSendTransportSequenceNumber(true, id));
} else {
RTC_NOTREACHED() << "Registering unsupported RTP extension.";
}
@@ -164,18 +164,18 @@ VideoSendStream::VideoSendStream(
&stats_proxy_, this));
// 28 to match packet overhead in ModuleRtpRtcpImpl.
- DCHECK_LE(config_.rtp.max_packet_size, static_cast<size_t>(0xFFFF - 28));
+ RTC_DCHECK_LE(config_.rtp.max_packet_size, static_cast<size_t>(0xFFFF - 28));
vie_channel_->SetMTU(static_cast<uint16_t>(config_.rtp.max_packet_size + 28));
- DCHECK(config.encoder_settings.encoder != nullptr);
- DCHECK_GE(config.encoder_settings.payload_type, 0);
- DCHECK_LE(config.encoder_settings.payload_type, 127);
- CHECK_EQ(0, vie_encoder_->RegisterExternalEncoder(
- config.encoder_settings.encoder,
- config.encoder_settings.payload_type,
- config.encoder_settings.internal_source));
+ RTC_DCHECK(config.encoder_settings.encoder != nullptr);
+ RTC_DCHECK_GE(config.encoder_settings.payload_type, 0);
+ RTC_DCHECK_LE(config.encoder_settings.payload_type, 127);
+ RTC_CHECK_EQ(0, vie_encoder_->RegisterExternalEncoder(
+ config.encoder_settings.encoder,
+ config.encoder_settings.payload_type,
+ config.encoder_settings.internal_source));
- CHECK(ReconfigureVideoEncoder(encoder_config));
+ RTC_CHECK(ReconfigureVideoEncoder(encoder_config));
vie_channel_->RegisterSendSideDelayObserver(&stats_proxy_);
vie_encoder_->RegisterSendStatisticsProxy(&stats_proxy_);
@@ -251,8 +251,8 @@ bool VideoSendStream::ReconfigureVideoEncoder(
TRACE_EVENT0("webrtc", "VideoSendStream::(Re)configureVideoEncoder");
LOG(LS_INFO) << "(Re)configureVideoEncoder: " << config.ToString();
const std::vector<VideoStream>& streams = config.streams;
- DCHECK(!streams.empty());
- DCHECK_GE(config_.rtp.ssrcs.size(), streams.size());
+ RTC_DCHECK(!streams.empty());
+ RTC_DCHECK_GE(config_.rtp.ssrcs.size(), streams.size());
VideoCodec video_codec;
memset(&video_codec, 0, sizeof(video_codec));
@@ -311,7 +311,7 @@ bool VideoSendStream::ReconfigureVideoEncoder(
}
} else {
// TODO(pbos): Support encoder_settings codec-agnostically.
- DCHECK(config.encoder_specific_settings == nullptr)
+ RTC_DCHECK(config.encoder_specific_settings == nullptr)
<< "Encoder-specific settings for codec type not wired up.";
}
@@ -323,18 +323,18 @@ bool VideoSendStream::ReconfigureVideoEncoder(
video_codec.numberOfSimulcastStreams =
static_cast<unsigned char>(streams.size());
video_codec.minBitrate = streams[0].min_bitrate_bps / 1000;
- DCHECK_LE(streams.size(), static_cast<size_t>(kMaxSimulcastStreams));
+ RTC_DCHECK_LE(streams.size(), static_cast<size_t>(kMaxSimulcastStreams));
for (size_t i = 0; i < streams.size(); ++i) {
SimulcastStream* sim_stream = &video_codec.simulcastStream[i];
- DCHECK_GT(streams[i].width, 0u);
- DCHECK_GT(streams[i].height, 0u);
- DCHECK_GT(streams[i].max_framerate, 0);
+ RTC_DCHECK_GT(streams[i].width, 0u);
+ RTC_DCHECK_GT(streams[i].height, 0u);
+ RTC_DCHECK_GT(streams[i].max_framerate, 0);
// Different framerates not supported per stream at the moment.
- DCHECK_EQ(streams[i].max_framerate, streams[0].max_framerate);
- DCHECK_GE(streams[i].min_bitrate_bps, 0);
- DCHECK_GE(streams[i].target_bitrate_bps, streams[i].min_bitrate_bps);
- DCHECK_GE(streams[i].max_bitrate_bps, streams[i].target_bitrate_bps);
- DCHECK_GE(streams[i].max_qp, 0);
+ RTC_DCHECK_EQ(streams[i].max_framerate, streams[0].max_framerate);
+ RTC_DCHECK_GE(streams[i].min_bitrate_bps, 0);
+ RTC_DCHECK_GE(streams[i].target_bitrate_bps, streams[i].min_bitrate_bps);
+ RTC_DCHECK_GE(streams[i].max_bitrate_bps, streams[i].target_bitrate_bps);
+ RTC_DCHECK_GE(streams[i].max_qp, 0);
sim_stream->width = static_cast<unsigned short>(streams[i].width);
sim_stream->height = static_cast<unsigned short>(streams[i].height);
@@ -361,7 +361,7 @@ bool VideoSendStream::ReconfigureVideoEncoder(
// the bitrate controller is already set from Call.
video_codec.startBitrate = 0;
- DCHECK_GT(streams[0].max_framerate, 0);
+ RTC_DCHECK_GT(streams[0].max_framerate, 0);
video_codec.maxFramerate = streams[0].max_framerate;
if (!SetSendCodec(video_codec))
@@ -373,7 +373,7 @@ bool VideoSendStream::ReconfigureVideoEncoder(
stats_proxy_.OnInactiveSsrc(config_.rtp.ssrcs[i]);
}
- DCHECK_GE(config.min_transmit_bitrate_bps, 0);
+ RTC_DCHECK_GE(config.min_transmit_bitrate_bps, 0);
vie_encoder_->SetMinTransmitBitrate(config.min_transmit_bitrate_bps / 1000);
encoder_config_ = config;
@@ -415,7 +415,7 @@ void VideoSendStream::ConfigureSsrcs() {
}
// Set up RTX.
- DCHECK_EQ(config_.rtp.rtx.ssrcs.size(), config_.rtp.ssrcs.size());
+ RTC_DCHECK_EQ(config_.rtp.rtx.ssrcs.size(), config_.rtp.ssrcs.size());
for (size_t i = 0; i < config_.rtp.rtx.ssrcs.size(); ++i) {
uint32_t ssrc = config_.rtp.rtx.ssrcs[i];
vie_channel_->SetSSRC(config_.rtp.rtx.ssrcs[i], kViEStreamTypeRtx,
@@ -425,7 +425,7 @@ void VideoSendStream::ConfigureSsrcs() {
vie_channel_->SetRtpStateForSsrc(ssrc, it->second);
}
- DCHECK_GE(config_.rtp.rtx.payload_type, 0);
+ RTC_DCHECK_GE(config_.rtp.rtx.payload_type, 0);
vie_channel_->SetRtxSendPayloadType(config_.rtp.rtx.payload_type,
config_.encoder_settings.payload_type);
}
« no previous file with comments | « webrtc/video/video_receive_stream.cc ('k') | webrtc/video/video_send_stream_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698