aboutsummaryrefslogtreecommitdiff
path: root/webrtc/video/send_statistics_proxy.cc
diff options
context:
space:
mode:
authorpbos@webrtc.org <pbos@webrtc.org>2015-03-23 13:12:24 +0000
committerpbos@webrtc.org <pbos@webrtc.org>2015-03-23 13:13:15 +0000
commit2b4ce3a501b8d679f84c1ad10317dea5c78fa595 (patch)
treebccde979fe377437566bda7532e1ff6625a5b28d /webrtc/video/send_statistics_proxy.cc
parent41d2befe9f34ba8706dbf0d2d3ede54af761b5bf (diff)
downloadwebrtc-2b4ce3a501b8d679f84c1ad10317dea5c78fa595.tar.gz
Convert webrtc/video/ abort/assert to CHECK/DCHECK.
Also replaces NULL with nullptr. This gives nicer error messages and keeps style consistent. BUG=1756 R=magjed@webrtc.org, stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/42879004 Cr-Commit-Position: refs/heads/master@{#8831} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8831 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'webrtc/video/send_statistics_proxy.cc')
-rw-r--r--webrtc/video/send_statistics_proxy.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/webrtc/video/send_statistics_proxy.cc b/webrtc/video/send_statistics_proxy.cc
index 594cde5fa1..41a8a99727 100644
--- a/webrtc/video/send_statistics_proxy.cc
+++ b/webrtc/video/send_statistics_proxy.cc
@@ -85,7 +85,7 @@ VideoSendStream::StreamStats* SendStatisticsProxy::GetStatsEntry(
std::find(config_.rtp.rtx.ssrcs.begin(),
config_.rtp.rtx.ssrcs.end(),
ssrc) == config_.rtp.rtx.ssrcs.end()) {
- return NULL;
+ return nullptr;
}
return &stats_.substreams[ssrc]; // Insert new entry and return ptr.
@@ -100,7 +100,7 @@ void SendStatisticsProxy::OnSendEncodedImage(
const EncodedImage& encoded_image,
const RTPVideoHeader* rtp_video_header) {
size_t simulcast_idx =
- rtp_video_header != NULL ? rtp_video_header->simulcastIdx : 0;
+ rtp_video_header != nullptr ? rtp_video_header->simulcastIdx : 0;
if (simulcast_idx >= config_.rtp.ssrcs.size()) {
LOG(LS_ERROR) << "Encoded image outside simulcast range (" << simulcast_idx
<< " >= " << config_.rtp.ssrcs.size() << ").";
@@ -110,7 +110,7 @@ void SendStatisticsProxy::OnSendEncodedImage(
CriticalSectionScoped lock(crit_.get());
VideoSendStream::StreamStats* stats = GetStatsEntry(ssrc);
- if (stats == NULL)
+ if (stats == nullptr)
return;
stats->width = encoded_image._encodedWidth;
@@ -128,7 +128,7 @@ void SendStatisticsProxy::RtcpPacketTypesCounterUpdated(
const RtcpPacketTypeCounter& packet_counter) {
CriticalSectionScoped lock(crit_.get());
VideoSendStream::StreamStats* stats = GetStatsEntry(ssrc);
- if (stats == NULL)
+ if (stats == nullptr)
return;
stats->rtcp_packet_type_counts = packet_counter;
@@ -138,7 +138,7 @@ void SendStatisticsProxy::StatisticsUpdated(const RtcpStatistics& statistics,
uint32_t ssrc) {
CriticalSectionScoped lock(crit_.get());
VideoSendStream::StreamStats* stats = GetStatsEntry(ssrc);
- if (stats == NULL)
+ if (stats == nullptr)
return;
stats->rtcp_stats = statistics;
@@ -152,8 +152,8 @@ void SendStatisticsProxy::DataCountersUpdated(
uint32_t ssrc) {
CriticalSectionScoped lock(crit_.get());
VideoSendStream::StreamStats* stats = GetStatsEntry(ssrc);
- DCHECK(stats != NULL) << "DataCountersUpdated reported for unknown ssrc: "
- << ssrc;
+ DCHECK(stats != nullptr) << "DataCountersUpdated reported for unknown ssrc: "
+ << ssrc;
stats->rtp_stats = counters;
}
@@ -163,7 +163,7 @@ void SendStatisticsProxy::Notify(const BitrateStatistics& total_stats,
uint32_t ssrc) {
CriticalSectionScoped lock(crit_.get());
VideoSendStream::StreamStats* stats = GetStatsEntry(ssrc);
- if (stats == NULL)
+ if (stats == nullptr)
return;
stats->total_bitrate_bps = total_stats.bitrate_bps;
@@ -174,7 +174,7 @@ void SendStatisticsProxy::FrameCountUpdated(const FrameCounts& frame_counts,
uint32_t ssrc) {
CriticalSectionScoped lock(crit_.get());
VideoSendStream::StreamStats* stats = GetStatsEntry(ssrc);
- if (stats == NULL)
+ if (stats == nullptr)
return;
stats->frame_counts = frame_counts;
@@ -185,7 +185,7 @@ void SendStatisticsProxy::SendSideDelayUpdated(int avg_delay_ms,
uint32_t ssrc) {
CriticalSectionScoped lock(crit_.get());
VideoSendStream::StreamStats* stats = GetStatsEntry(ssrc);
- if (stats == NULL)
+ if (stats == nullptr)
return;
stats->avg_delay_ms = avg_delay_ms;
stats->max_delay_ms = max_delay_ms;