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

Unified Diff: webrtc/video_engine/vie_channel.cc

Issue 1184443005: Remove implicit-int-conversion warnings. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: size_t j Created 5 years, 6 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_engine/video_engine_core.gypi ('k') | webrtc/video_engine/vie_encoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video_engine/vie_channel.cc
diff --git a/webrtc/video_engine/vie_channel.cc b/webrtc/video_engine/vie_channel.cc
index 9c6b152508bf0d15a51ba4e3761b43f28acd79ee..61096b39630eacb83fa325e278fa2fed7796c491 100644
--- a/webrtc/video_engine/vie_channel.cc
+++ b/webrtc/video_engine/vie_channel.cc
@@ -271,23 +271,32 @@ void ViEChannel::UpdateHistograms() {
rtp_rtx.Add(rtx);
elapsed_sec = rtp_rtx.TimeSinceFirstPacketInMs(now) / 1000;
if (elapsed_sec > metrics::kMinRunTimeInSeconds) {
- RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.BitrateReceivedInKbps",
- rtp_rtx.transmitted.TotalBytes() * 8 / elapsed_sec / 1000);
- RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.MediaBitrateReceivedInKbps",
- rtp.MediaPayloadBytes() * 8 / elapsed_sec / 1000);
- RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.PaddingBitrateReceivedInKbps",
- rtp_rtx.transmitted.padding_bytes * 8 / elapsed_sec / 1000);
+ RTC_HISTOGRAM_COUNTS_10000(
+ "WebRTC.Video.BitrateReceivedInKbps",
+ static_cast<int>(rtp_rtx.transmitted.TotalBytes() * 8 / elapsed_sec /
+ 1000));
+ RTC_HISTOGRAM_COUNTS_10000(
+ "WebRTC.Video.MediaBitrateReceivedInKbps",
+ static_cast<int>(rtp.MediaPayloadBytes() * 8 / elapsed_sec / 1000));
+ RTC_HISTOGRAM_COUNTS_10000(
+ "WebRTC.Video.PaddingBitrateReceivedInKbps",
+ static_cast<int>(rtp_rtx.transmitted.padding_bytes * 8 / elapsed_sec /
+ 1000));
RTC_HISTOGRAM_COUNTS_10000(
"WebRTC.Video.RetransmittedBitrateReceivedInKbps",
- rtp_rtx.retransmitted.TotalBytes() * 8 / elapsed_sec / 1000);
+ static_cast<int>(rtp_rtx.retransmitted.TotalBytes() * 8 /
+ elapsed_sec / 1000));
uint32_t ssrc = 0;
if (vie_receiver_.GetRtxSsrc(&ssrc)) {
- RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.RtxBitrateReceivedInKbps",
- rtx.transmitted.TotalBytes() * 8 / elapsed_sec / 1000);
+ RTC_HISTOGRAM_COUNTS_10000(
+ "WebRTC.Video.RtxBitrateReceivedInKbps",
+ static_cast<int>(rtx.transmitted.TotalBytes() * 8 / elapsed_sec /
+ 1000));
}
if (vie_receiver_.IsFecEnabled()) {
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.FecBitrateReceivedInKbps",
- rtp_rtx.fec.TotalBytes() * 8 / elapsed_sec / 1000);
+ static_cast<int>(rtp_rtx.fec.TotalBytes() *
+ 8 / elapsed_sec / 1000));
}
}
}
@@ -305,25 +314,34 @@ void ViEChannel::UpdateHistogramsAtStopSend() {
if (elapsed_sec < metrics::kMinRunTimeInSeconds) {
return;
}
- RTC_HISTOGRAM_COUNTS_100000("WebRTC.Video.BitrateSentInKbps",
- rtp_rtx.transmitted.TotalBytes() * 8 / elapsed_sec / 1000);
- RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.MediaBitrateSentInKbps",
- rtp.MediaPayloadBytes() * 8 / elapsed_sec / 1000);
- RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.PaddingBitrateSentInKbps",
- rtp_rtx.transmitted.padding_bytes * 8 / elapsed_sec / 1000);
- RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.RetransmittedBitrateSentInKbps",
- rtp_rtx.retransmitted.TotalBytes() * 8 / elapsed_sec / 1000);
+ RTC_HISTOGRAM_COUNTS_100000(
+ "WebRTC.Video.BitrateSentInKbps",
+ static_cast<int>(rtp_rtx.transmitted.TotalBytes() * 8 / elapsed_sec /
+ 1000));
+ RTC_HISTOGRAM_COUNTS_10000(
+ "WebRTC.Video.MediaBitrateSentInKbps",
+ static_cast<int>(rtp.MediaPayloadBytes() * 8 / elapsed_sec / 1000));
+ RTC_HISTOGRAM_COUNTS_10000(
+ "WebRTC.Video.PaddingBitrateSentInKbps",
+ static_cast<int>(rtp_rtx.transmitted.padding_bytes * 8 / elapsed_sec /
+ 1000));
+ RTC_HISTOGRAM_COUNTS_10000(
+ "WebRTC.Video.RetransmittedBitrateSentInKbps",
+ static_cast<int>(rtp_rtx.retransmitted.TotalBytes() * 8 / elapsed_sec /
+ 1000));
if (rtp_rtcp_->RtxSendStatus() != kRtxOff) {
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.RtxBitrateSentInKbps",
- rtx.transmitted.TotalBytes() * 8 / elapsed_sec / 1000);
+ static_cast<int>(rtx.transmitted.TotalBytes() *
+ 8 / elapsed_sec / 1000));
}
bool fec_enabled = false;
uint8_t pltype_red;
uint8_t pltype_fec;
rtp_rtcp_->GenericFECStatus(fec_enabled, pltype_red, pltype_fec);
if (fec_enabled) {
- RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.FecBitrateSentInKbps",
- rtp_rtx.fec.TotalBytes() * 8 / elapsed_sec / 1000);
+ RTC_HISTOGRAM_COUNTS_10000(
+ "WebRTC.Video.FecBitrateSentInKbps",
+ static_cast<int>(rtp_rtx.fec.TotalBytes() * 8 / elapsed_sec / 1000));
}
}
@@ -375,8 +393,8 @@ int32_t ViEChannel::SetSendCodec(const VideoCodec& video_codec,
if (video_codec.numberOfSimulcastStreams > 0) {
// Set correct bitrate to base layer.
// Create our simulcast RTP modules.
- int num_modules_to_add =
- video_codec.numberOfSimulcastStreams - simulcast_rtp_rtcp_.size() - 1;
+ int num_modules_to_add = video_codec.numberOfSimulcastStreams -
+ static_cast<int>(simulcast_rtp_rtcp_.size()) - 1;
if (num_modules_to_add < 0) {
num_modules_to_add = 0;
}
@@ -425,8 +443,9 @@ int32_t ViEChannel::SetSendCodec(const VideoCodec& video_codec,
}
// Remove last in list if we have too many.
- for (int j = simulcast_rtp_rtcp_.size();
- j > (video_codec.numberOfSimulcastStreams - 1); j--) {
+ for (size_t j = simulcast_rtp_rtcp_.size();
+ j > static_cast<size_t>(video_codec.numberOfSimulcastStreams - 1);
+ j--) {
RtpRtcp* rtp_rtcp = simulcast_rtp_rtcp_.back();
deregistered_modules.push_back(rtp_rtcp);
rtp_rtcp->SetSendingStatus(false);
« no previous file with comments | « webrtc/video_engine/video_engine_core.gypi ('k') | webrtc/video_engine/vie_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698