Stop using LOG macros in favor of RTC_ prefixed macros.
This CL has been generated with the following script:
for m in PLOG \
LOG_TAG \
LOG_GLEM \
LOG_GLE_EX \
LOG_GLE \
LAST_SYSTEM_ERROR \
LOG_ERRNO_EX \
LOG_ERRNO \
LOG_ERR_EX \
LOG_ERR \
LOG_V \
LOG_F \
LOG_T_F \
LOG_E \
LOG_T \
LOG_CHECK_LEVEL_V \
LOG_CHECK_LEVEL \
LOG
do
git grep -l $m | xargs sed -i "s,\b$m\b,RTC_$m,g"
done
git checkout rtc_base/logging.h
git cl format
Bug: webrtc:8452
Change-Id: I1a53ef3e0a5ef6e244e62b2e012b864914784600
Reviewed-on: https://webrtc-review.googlesource.com/21325
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20617}
diff --git a/video/overuse_frame_detector.cc b/video/overuse_frame_detector.cc
index f110e1c..7b64c10 100644
--- a/video/overuse_frame_detector.cc
+++ b/video/overuse_frame_detector.cc
@@ -91,10 +91,11 @@
if (kr != KERN_SUCCESS) {
// If we couldn't get # of physical CPUs, don't panic. Assume we have 1.
n_physical_cores = 1;
- LOG(LS_ERROR) << "Failed to determine number of physical cores, assuming 1";
+ RTC_LOG(LS_ERROR)
+ << "Failed to determine number of physical cores, assuming 1";
} else {
n_physical_cores = hbi.physical_cpu;
- LOG(LS_INFO) << "Number of physical cores:" << n_physical_cores;
+ RTC_LOG(LS_INFO) << "Number of physical cores:" << n_physical_cores;
}
// Change init list default for few core systems. The assumption here is that
@@ -206,9 +207,9 @@
last_toggling_ms_(-1) {
RTC_DCHECK_GT(overuse_period_ms, 0);
RTC_DCHECK_GT(normal_period_ms, 0);
- LOG(LS_INFO) << "Simulating overuse with intervals " << normal_period_ms
- << "ms normal mode, " << overuse_period_ms
- << "ms overuse mode.";
+ RTC_LOG(LS_INFO) << "Simulating overuse with intervals " << normal_period_ms
+ << "ms normal mode, " << overuse_period_ms
+ << "ms overuse mode.";
}
~OverdoseInjector() override {}
@@ -223,21 +224,21 @@
if (now_ms > last_toggling_ms_ + normal_period_ms_) {
state_ = State::kOveruse;
last_toggling_ms_ = now_ms;
- LOG(LS_INFO) << "Simulating CPU overuse.";
+ RTC_LOG(LS_INFO) << "Simulating CPU overuse.";
}
break;
case State::kOveruse:
if (now_ms > last_toggling_ms_ + overuse_period_ms_) {
state_ = State::kUnderuse;
last_toggling_ms_ = now_ms;
- LOG(LS_INFO) << "Simulating CPU underuse.";
+ RTC_LOG(LS_INFO) << "Simulating CPU underuse.";
}
break;
case State::kUnderuse:
if (now_ms > last_toggling_ms_ + underuse_period_ms_) {
state_ = State::kNormal;
last_toggling_ms_ = now_ms;
- LOG(LS_INFO) << "Actual CPU overuse measurements in effect.";
+ RTC_LOG(LS_INFO) << "Actual CPU overuse measurements in effect.";
}
break;
}
@@ -283,13 +284,14 @@
instance.reset(new OverdoseInjector(
options, normal_period_ms, overuse_period_ms, underuse_period_ms));
} else {
- LOG(LS_WARNING)
+ RTC_LOG(LS_WARNING)
<< "Invalid (non-positive) normal/overuse/underuse periods: "
<< normal_period_ms << " / " << overuse_period_ms << " / "
<< underuse_period_ms;
}
} else {
- LOG(LS_WARNING) << "Malformed toggling interval: " << toggling_interval;
+ RTC_LOG(LS_WARNING) << "Malformed toggling interval: "
+ << toggling_interval;
}
}
@@ -531,10 +533,10 @@
int rampup_delay =
in_quick_rampup_ ? kQuickRampUpDelayMs : current_rampup_delay_ms_;
- LOG(LS_VERBOSE) << " Frame stats: "
- << " encode usage " << metrics_->encode_usage_percent
- << " overuse detections " << num_overuse_detections_
- << " rampup delay " << rampup_delay;
+ RTC_LOG(LS_VERBOSE) << " Frame stats: "
+ << " encode usage " << metrics_->encode_usage_percent
+ << " overuse detections " << num_overuse_detections_
+ << " rampup delay " << rampup_delay;
}
bool OveruseFrameDetector::IsOverusing(const CpuOveruseMetrics& metrics) {
diff --git a/video/receive_statistics_proxy.cc b/video/receive_statistics_proxy.cc
index 10b200b..0fc298a 100644
--- a/video/receive_statistics_proxy.cc
+++ b/video/receive_statistics_proxy.cc
@@ -131,8 +131,8 @@
stats_.frame_counts.delta_frames > 0) {
RTC_HISTOGRAM_COUNTS_100000("WebRTC.Video.ReceiveStreamLifetimeInSeconds",
stream_duration_sec);
- LOG(LS_INFO) << "WebRTC.Video.ReceiveStreamLifetimeInSeconds "
- << stream_duration_sec;
+ RTC_LOG(LS_INFO) << "WebRTC.Video.ReceiveStreamLifetimeInSeconds "
+ << stream_duration_sec;
}
if (first_report_block_time_ms_ != -1 &&
@@ -142,8 +142,8 @@
if (fraction_lost != -1) {
RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.ReceivedPacketsLostInPercent",
fraction_lost);
- LOG(LS_INFO) << "WebRTC.Video.ReceivedPacketsLostInPercent "
- << fraction_lost;
+ RTC_LOG(LS_INFO) << "WebRTC.Video.ReceivedPacketsLostInPercent "
+ << fraction_lost;
}
}
@@ -160,14 +160,14 @@
int sync_offset_ms = sync_offset_counter_.Avg(kMinRequiredSamples);
if (sync_offset_ms != -1) {
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.AVSyncOffsetInMs", sync_offset_ms);
- LOG(LS_INFO) << "WebRTC.Video.AVSyncOffsetInMs " << sync_offset_ms;
+ RTC_LOG(LS_INFO) << "WebRTC.Video.AVSyncOffsetInMs " << sync_offset_ms;
}
AggregatedStats freq_offset_stats = freq_offset_counter_.GetStats();
if (freq_offset_stats.num_samples > 0) {
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.RtpToNtpFreqOffsetInKhz",
freq_offset_stats.average);
- LOG(LS_INFO) << "WebRTC.Video.RtpToNtpFreqOffsetInKhz, "
- << freq_offset_stats.ToString();
+ RTC_LOG(LS_INFO) << "WebRTC.Video.RtpToNtpFreqOffsetInKhz, "
+ << freq_offset_stats.ToString();
}
int num_total_frames =
@@ -178,37 +178,37 @@
(num_key_frames * 1000 + num_total_frames / 2) / num_total_frames;
RTC_HISTOGRAM_COUNTS_1000("WebRTC.Video.KeyFramesReceivedInPermille",
key_frames_permille);
- LOG(LS_INFO) << "WebRTC.Video.KeyFramesReceivedInPermille "
- << key_frames_permille;
+ RTC_LOG(LS_INFO) << "WebRTC.Video.KeyFramesReceivedInPermille "
+ << key_frames_permille;
}
int qp = qp_counters_.vp8.Avg(kMinRequiredSamples);
if (qp != -1) {
RTC_HISTOGRAM_COUNTS_200("WebRTC.Video.Decoded.Vp8.Qp", qp);
- LOG(LS_INFO) << "WebRTC.Video.Decoded.Vp8.Qp " << qp;
+ RTC_LOG(LS_INFO) << "WebRTC.Video.Decoded.Vp8.Qp " << qp;
}
int decode_ms = decode_time_counter_.Avg(kMinRequiredSamples);
if (decode_ms != -1) {
RTC_HISTOGRAM_COUNTS_1000("WebRTC.Video.DecodeTimeInMs", decode_ms);
- LOG(LS_INFO) << "WebRTC.Video.DecodeTimeInMs " << decode_ms;
+ RTC_LOG(LS_INFO) << "WebRTC.Video.DecodeTimeInMs " << decode_ms;
}
int jb_delay_ms = jitter_buffer_delay_counter_.Avg(kMinRequiredSamples);
if (jb_delay_ms != -1) {
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.JitterBufferDelayInMs",
jb_delay_ms);
- LOG(LS_INFO) << "WebRTC.Video.JitterBufferDelayInMs " << jb_delay_ms;
+ RTC_LOG(LS_INFO) << "WebRTC.Video.JitterBufferDelayInMs " << jb_delay_ms;
}
int target_delay_ms = target_delay_counter_.Avg(kMinRequiredSamples);
if (target_delay_ms != -1) {
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.TargetDelayInMs", target_delay_ms);
- LOG(LS_INFO) << "WebRTC.Video.TargetDelayInMs " << target_delay_ms;
+ RTC_LOG(LS_INFO) << "WebRTC.Video.TargetDelayInMs " << target_delay_ms;
}
int current_delay_ms = current_delay_counter_.Avg(kMinRequiredSamples);
if (current_delay_ms != -1) {
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.CurrentDelayInMs",
current_delay_ms);
- LOG(LS_INFO) << "WebRTC.Video.CurrentDelayInMs " << current_delay_ms;
+ RTC_LOG(LS_INFO) << "WebRTC.Video.CurrentDelayInMs " << current_delay_ms;
}
int delay_ms = delay_counter_.Avg(kMinRequiredSamples);
if (delay_ms != -1)
@@ -260,15 +260,15 @@
if (e2e_delay_ms != -1) {
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
uma_prefix + ".EndToEndDelayInMs" + uma_suffix, e2e_delay_ms);
- LOG(LS_INFO) << uma_prefix << ".EndToEndDelayInMs" << uma_suffix << " "
- << e2e_delay_ms;
+ RTC_LOG(LS_INFO) << uma_prefix << ".EndToEndDelayInMs" << uma_suffix
+ << " " << e2e_delay_ms;
}
int e2e_delay_max_ms = stats.e2e_delay_counter.Max();
if (e2e_delay_max_ms != -1 && e2e_delay_ms != -1) {
RTC_HISTOGRAM_COUNTS_SPARSE_100000(
uma_prefix + ".EndToEndDelayMaxInMs" + uma_suffix, e2e_delay_max_ms);
- LOG(LS_INFO) << uma_prefix << ".EndToEndDelayMaxInMs" << uma_suffix << " "
- << e2e_delay_max_ms;
+ RTC_LOG(LS_INFO) << uma_prefix << ".EndToEndDelayMaxInMs" << uma_suffix
+ << " " << e2e_delay_max_ms;
}
int interframe_delay_ms =
stats.interframe_delay_counter.Avg(kMinRequiredSamples);
@@ -276,16 +276,16 @@
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
uma_prefix + ".InterframeDelayInMs" + uma_suffix,
interframe_delay_ms);
- LOG(LS_INFO) << uma_prefix << ".InterframeDelayInMs" << uma_suffix << " "
- << interframe_delay_ms;
+ RTC_LOG(LS_INFO) << uma_prefix << ".InterframeDelayInMs" << uma_suffix
+ << " " << interframe_delay_ms;
}
int interframe_delay_max_ms = stats.interframe_delay_counter.Max();
if (interframe_delay_max_ms != -1 && interframe_delay_ms != -1) {
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
uma_prefix + ".InterframeDelayMaxInMs" + uma_suffix,
interframe_delay_max_ms);
- LOG(LS_INFO) << uma_prefix << ".InterframeDelayMaxInMs" << uma_suffix
- << " " << interframe_delay_max_ms;
+ RTC_LOG(LS_INFO) << uma_prefix << ".InterframeDelayMaxInMs" << uma_suffix
+ << " " << interframe_delay_max_ms;
}
rtc::Optional<uint32_t> interframe_delay_95p_ms =
@@ -294,24 +294,24 @@
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
uma_prefix + ".InterframeDelay95PercentileInMs" + uma_suffix,
*interframe_delay_95p_ms);
- LOG(LS_INFO) << uma_prefix << ".InterframeDelay95PercentileInMs"
- << uma_suffix << " " << *interframe_delay_95p_ms;
+ RTC_LOG(LS_INFO) << uma_prefix << ".InterframeDelay95PercentileInMs"
+ << uma_suffix << " " << *interframe_delay_95p_ms;
}
int width = stats.received_width.Avg(kMinRequiredSamples);
if (width != -1) {
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
uma_prefix + ".ReceivedWidthInPixels" + uma_suffix, width);
- LOG(LS_INFO) << uma_prefix << ".ReceivedWidthInPixels" << uma_suffix
- << " " << width;
+ RTC_LOG(LS_INFO) << uma_prefix << ".ReceivedWidthInPixels" << uma_suffix
+ << " " << width;
}
int height = stats.received_height.Avg(kMinRequiredSamples);
if (height != -1) {
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
uma_prefix + ".ReceivedHeightInPixels" + uma_suffix, height);
- LOG(LS_INFO) << uma_prefix << ".ReceivedHeightInPixels" << uma_suffix
- << " " << height;
+ RTC_LOG(LS_INFO) << uma_prefix << ".ReceivedHeightInPixels" << uma_suffix
+ << " " << height;
}
if (content_type != VideoContentType::UNSPECIFIED) {
@@ -324,8 +324,8 @@
RTC_HISTOGRAM_COUNTS_SPARSE_10000(
uma_prefix + ".MediaBitrateReceivedInKbps" + uma_suffix,
media_bitrate_kbps);
- LOG(LS_INFO) << uma_prefix << ".MediaBitrateReceivedInKbps"
- << uma_suffix << " " << media_bitrate_kbps;
+ RTC_LOG(LS_INFO) << uma_prefix << ".MediaBitrateReceivedInKbps"
+ << uma_suffix << " " << media_bitrate_kbps;
}
int num_total_frames =
@@ -337,16 +337,16 @@
RTC_HISTOGRAM_COUNTS_SPARSE_1000(
uma_prefix + ".KeyFramesReceivedInPermille" + uma_suffix,
key_frames_permille);
- LOG(LS_INFO) << uma_prefix << ".KeyFramesReceivedInPermille"
- << uma_suffix << " " << key_frames_permille;
+ RTC_LOG(LS_INFO) << uma_prefix << ".KeyFramesReceivedInPermille"
+ << uma_suffix << " " << key_frames_permille;
}
int qp = stats.qp_counter.Avg(kMinRequiredSamples);
if (qp != -1) {
RTC_HISTOGRAM_COUNTS_SPARSE_200(
uma_prefix + ".Decoded.Vp8.Qp" + uma_suffix, qp);
- LOG(LS_INFO) << uma_prefix << ".Decoded.Vp8.Qp" << uma_suffix << " "
- << qp;
+ RTC_LOG(LS_INFO) << uma_prefix << ".Decoded.Vp8.Qp" << uma_suffix << " "
+ << qp;
}
}
}
@@ -368,8 +368,8 @@
static_cast<int>(rtp.MediaPayloadBytes() * 8 / elapsed_sec / 1000);
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.MediaBitrateReceivedInKbps",
media_bitrate_kbs);
- LOG(LS_INFO) << "WebRTC.Video.MediaBitrateReceivedInKbps "
- << media_bitrate_kbs;
+ RTC_LOG(LS_INFO) << "WebRTC.Video.MediaBitrateReceivedInKbps "
+ << media_bitrate_kbs;
RTC_HISTOGRAM_COUNTS_10000(
"WebRTC.Video.PaddingBitrateReceivedInKbps",
static_cast<int>(rtp_rtx.transmitted.padding_bytes * 8 / elapsed_sec /
@@ -454,33 +454,34 @@
bool any_bad = fps_bad || qp_bad || variance_bad;
if (!prev_any_bad && any_bad) {
- LOG(LS_INFO) << "Bad call (any) start: " << now;
+ RTC_LOG(LS_INFO) << "Bad call (any) start: " << now;
} else if (prev_any_bad && !any_bad) {
- LOG(LS_INFO) << "Bad call (any) end: " << now;
+ RTC_LOG(LS_INFO) << "Bad call (any) end: " << now;
}
if (!prev_fps_bad && fps_bad) {
- LOG(LS_INFO) << "Bad call (fps) start: " << now;
+ RTC_LOG(LS_INFO) << "Bad call (fps) start: " << now;
} else if (prev_fps_bad && !fps_bad) {
- LOG(LS_INFO) << "Bad call (fps) end: " << now;
+ RTC_LOG(LS_INFO) << "Bad call (fps) end: " << now;
}
if (!prev_qp_bad && qp_bad) {
- LOG(LS_INFO) << "Bad call (qp) start: " << now;
+ RTC_LOG(LS_INFO) << "Bad call (qp) start: " << now;
} else if (prev_qp_bad && !qp_bad) {
- LOG(LS_INFO) << "Bad call (qp) end: " << now;
+ RTC_LOG(LS_INFO) << "Bad call (qp) end: " << now;
}
if (!prev_variance_bad && variance_bad) {
- LOG(LS_INFO) << "Bad call (variance) start: " << now;
+ RTC_LOG(LS_INFO) << "Bad call (variance) start: " << now;
} else if (prev_variance_bad && !variance_bad) {
- LOG(LS_INFO) << "Bad call (variance) end: " << now;
+ RTC_LOG(LS_INFO) << "Bad call (variance) end: " << now;
}
- LOG(LS_VERBOSE) << "SAMPLE: sample_length: " << (now - last_sample_time_)
- << " fps: " << fps << " fps_bad: " << fps_bad << " qp: " << qp
- << " qp_bad: " << qp_bad << " variance_bad: " << variance_bad
- << " fps_variance: " << fps_variance;
+ RTC_LOG(LS_VERBOSE) << "SAMPLE: sample_length: " << (now - last_sample_time_)
+ << " fps: " << fps << " fps_bad: " << fps_bad
+ << " qp: " << qp << " qp_bad: " << qp_bad
+ << " variance_bad: " << variance_bad
+ << " fps_variance: " << fps_variance;
last_sample_time_ = now;
qp_sample_.Reset();
@@ -640,7 +641,7 @@
if (qp) {
if (!stats_.qp_sum) {
if (stats_.frames_decoded != 1) {
- LOG(LS_WARNING)
+ RTC_LOG(LS_WARNING)
<< "Frames decoded was not 1 when first qp value was received.";
stats_.frames_decoded = 1;
}
@@ -649,7 +650,7 @@
*stats_.qp_sum += *qp;
content_specific_stats->qp_counter.Add(*qp);
} else if (stats_.qp_sum) {
- LOG(LS_WARNING)
+ RTC_LOG(LS_WARNING)
<< "QP sum was already set and no QP was given for a frame.";
stats_.qp_sum = rtc::Optional<uint64_t>();
}
diff --git a/video/rtp_video_stream_receiver.cc b/video/rtp_video_stream_receiver.cc
index 5778682..238eaf3 100644
--- a/video/rtp_video_stream_receiver.cc
+++ b/video/rtp_video_stream_receiver.cc
@@ -321,7 +321,7 @@
if (packet.GetExtension<AbsoluteSendTime>(&send_time)) {
ss << ", abs send time: " << send_time;
}
- LOG(LS_INFO) << ss.str();
+ RTC_LOG(LS_INFO) << ss.str();
last_packet_log_ms_ = now_ms;
}
}
@@ -434,7 +434,7 @@
// We might be rolling-back a call whose setup failed mid-way. In such a
// case, it's simpler to remove "everything" rather than remember what
// has already been added.
- LOG(LS_WARNING) << "Removal of unknown sink.";
+ RTC_LOG(LS_WARNING) << "Removal of unknown sink.";
return;
}
secondary_sinks_.erase(it);
@@ -482,7 +482,7 @@
int8_t last_media_payload_type =
rtp_payload_registry_.last_received_media_payload_type();
if (last_media_payload_type < 0) {
- LOG(LS_WARNING) << "Failed to get last media payload type.";
+ RTC_LOG(LS_WARNING) << "Failed to get last media payload type.";
return;
}
// Fake an empty media packet.
@@ -493,7 +493,7 @@
const auto pl =
rtp_payload_registry_.PayloadTypeToPayload(last_media_payload_type);
if (!pl) {
- LOG(LS_WARNING) << "Failed to get payload specifics.";
+ RTC_LOG(LS_WARNING) << "Failed to get payload specifics.";
return;
}
rtp_header.type.Video.codec = pl->typeSpecific.video_payload().videoCodecType;
@@ -649,8 +649,8 @@
if (codec_params_it == pt_codec_params_.end())
return;
- LOG(LS_INFO) << "Found out of band supplied codec parameters for"
- << " payload type: " << static_cast<int>(payload_type);
+ RTC_LOG(LS_INFO) << "Found out of band supplied codec parameters for"
+ << " payload type: " << static_cast<int>(payload_type);
H264SpropParameterSets sprop_decoder;
auto sprop_base64_it =
diff --git a/video/send_delay_stats.cc b/video/send_delay_stats.cc
index 09b60cd..a243eda 100644
--- a/video/send_delay_stats.cc
+++ b/video/send_delay_stats.cc
@@ -32,9 +32,10 @@
SendDelayStats::~SendDelayStats() {
if (num_old_packets_ > 0 || num_skipped_packets_ > 0) {
- LOG(LS_WARNING) << "Delay stats: number of old packets " << num_old_packets_
- << ", skipped packets " << num_skipped_packets_
- << ". Number of streams " << send_delay_counters_.size();
+ RTC_LOG(LS_WARNING) << "Delay stats: number of old packets "
+ << num_old_packets_ << ", skipped packets "
+ << num_skipped_packets_ << ". Number of streams "
+ << send_delay_counters_.size();
}
UpdateHistograms();
}
@@ -45,7 +46,7 @@
AggregatedStats stats = it.second->GetStats();
if (stats.num_samples >= kMinRequiredPeriodicSamples) {
RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.SendDelayInMs", stats.average);
- LOG(LS_INFO) << "WebRTC.Video.SendDelayInMs, " << stats.ToString();
+ RTC_LOG(LS_INFO) << "WebRTC.Video.SendDelayInMs, " << stats.ToString();
}
}
}
diff --git a/video/send_statistics_proxy.cc b/video/send_statistics_proxy.cc
index cf277e3..233cbb6 100644
--- a/video/send_statistics_proxy.cc
+++ b/video/send_statistics_proxy.cc
@@ -240,14 +240,15 @@
in_width);
RTC_HISTOGRAMS_COUNTS_10000(kIndex, uma_prefix_ + "InputHeightInPixels",
in_height);
- LOG(LS_INFO) << uma_prefix_ << "InputWidthInPixels " << in_width;
- LOG(LS_INFO) << uma_prefix_ << "InputHeightInPixels " << in_height;
+ RTC_LOG(LS_INFO) << uma_prefix_ << "InputWidthInPixels " << in_width;
+ RTC_LOG(LS_INFO) << uma_prefix_ << "InputHeightInPixels " << in_height;
}
AggregatedStats in_fps = input_fps_counter_.GetStats();
if (in_fps.num_samples >= kMinRequiredPeriodicSamples) {
RTC_HISTOGRAMS_COUNTS_100(kIndex, uma_prefix_ + "InputFramesPerSecond",
in_fps.average);
- LOG(LS_INFO) << uma_prefix_ + "InputFramesPerSecond, " << in_fps.ToString();
+ RTC_LOG(LS_INFO) << uma_prefix_ + "InputFramesPerSecond, "
+ << in_fps.ToString();
}
int sent_width = sent_width_counter_.Avg(kMinRequiredMetricsSamples);
@@ -257,15 +258,15 @@
sent_width);
RTC_HISTOGRAMS_COUNTS_10000(kIndex, uma_prefix_ + "SentHeightInPixels",
sent_height);
- LOG(LS_INFO) << uma_prefix_ << "SentWidthInPixels " << sent_width;
- LOG(LS_INFO) << uma_prefix_ << "SentHeightInPixels " << sent_height;
+ RTC_LOG(LS_INFO) << uma_prefix_ << "SentWidthInPixels " << sent_width;
+ RTC_LOG(LS_INFO) << uma_prefix_ << "SentHeightInPixels " << sent_height;
}
AggregatedStats sent_fps = sent_fps_counter_.GetStats();
if (sent_fps.num_samples >= kMinRequiredPeriodicSamples) {
RTC_HISTOGRAMS_COUNTS_100(kIndex, uma_prefix_ + "SentFramesPerSecond",
sent_fps.average);
- LOG(LS_INFO) << uma_prefix_ + "SentFramesPerSecond, "
- << sent_fps.ToString();
+ RTC_LOG(LS_INFO) << uma_prefix_ + "SentFramesPerSecond, "
+ << sent_fps.ToString();
}
if (in_fps.num_samples > kMinRequiredPeriodicSamples &&
@@ -283,8 +284,8 @@
RTC_HISTOGRAMS_PERCENTAGE(kIndex,
uma_prefix_ + "SentToInputFpsRatioPercent",
sent_to_in_fps_ratio_percent);
- LOG(LS_INFO) << uma_prefix_ << "SentToInputFpsRatioPercent "
- << sent_to_in_fps_ratio_percent;
+ RTC_LOG(LS_INFO) << uma_prefix_ << "SentToInputFpsRatioPercent "
+ << sent_to_in_fps_ratio_percent;
}
}
@@ -292,15 +293,15 @@
if (encode_ms != -1) {
RTC_HISTOGRAMS_COUNTS_1000(kIndex, uma_prefix_ + "EncodeTimeInMs",
encode_ms);
- LOG(LS_INFO) << uma_prefix_ << "EncodeTimeInMs " << encode_ms;
+ RTC_LOG(LS_INFO) << uma_prefix_ << "EncodeTimeInMs " << encode_ms;
}
int key_frames_permille =
key_frame_counter_.Permille(kMinRequiredMetricsSamples);
if (key_frames_permille != -1) {
RTC_HISTOGRAMS_COUNTS_1000(kIndex, uma_prefix_ + "KeyFramesSentInPermille",
key_frames_permille);
- LOG(LS_INFO) << uma_prefix_ << "KeyFramesSentInPermille "
- << key_frames_permille;
+ RTC_LOG(LS_INFO) << uma_prefix_ << "KeyFramesSentInPermille "
+ << key_frames_permille;
}
int quality_limited =
quality_limited_frame_counter_.Percent(kMinRequiredMetricsSamples);
@@ -308,8 +309,8 @@
RTC_HISTOGRAMS_PERCENTAGE(kIndex,
uma_prefix_ + "QualityLimitedResolutionInPercent",
quality_limited);
- LOG(LS_INFO) << uma_prefix_ << "QualityLimitedResolutionInPercent "
- << quality_limited;
+ RTC_LOG(LS_INFO) << uma_prefix_ << "QualityLimitedResolutionInPercent "
+ << quality_limited;
}
int downscales = quality_downscales_counter_.Avg(kMinRequiredMetricsSamples);
if (downscales != -1) {
@@ -365,8 +366,8 @@
RTC_HISTOGRAMS_COUNTS_200(kIndex, uma_prefix_ + "Encoded.Qp.Vp8.S2",
qp_vp8);
} else {
- LOG(LS_WARNING) << "QP stats not recorded for VP8 spatial idx "
- << spatial_idx;
+ RTC_LOG(LS_WARNING)
+ << "QP stats not recorded for VP8 spatial idx " << spatial_idx;
}
}
int qp_vp9 = it.second.vp9.Avg(kMinRequiredMetricsSamples);
@@ -385,8 +386,8 @@
RTC_HISTOGRAMS_COUNTS_500(kIndex, uma_prefix_ + "Encoded.Qp.Vp9.S2",
qp_vp9);
} else {
- LOG(LS_WARNING) << "QP stats not recorded for VP9 spatial layer "
- << spatial_idx;
+ RTC_LOG(LS_WARNING)
+ << "QP stats not recorded for VP9 spatial layer " << spatial_idx;
}
}
int qp_h264 = it.second.h264.Avg(kMinRequiredMetricsSamples);
@@ -427,8 +428,8 @@
if (fraction_lost != -1) {
RTC_HISTOGRAMS_PERCENTAGE(
kIndex, uma_prefix_ + "SentPacketsLostInPercent", fraction_lost);
- LOG(LS_INFO) << uma_prefix_ << "SentPacketsLostInPercent "
- << fraction_lost;
+ RTC_LOG(LS_INFO) << uma_prefix_ << "SentPacketsLostInPercent "
+ << fraction_lost;
}
// The RTCP packet type counters, delivered via the
@@ -475,16 +476,16 @@
if (elapsed_sec >= metrics::kMinRunTimeInSeconds) {
RTC_HISTOGRAMS_COUNTS_100(kIndex, uma_prefix_ + "NumberOfPauseEvents",
target_rate_updates_.pause_resume_events);
- LOG(LS_INFO) << uma_prefix_ << "NumberOfPauseEvents "
- << target_rate_updates_.pause_resume_events;
+ RTC_LOG(LS_INFO) << uma_prefix_ << "NumberOfPauseEvents "
+ << target_rate_updates_.pause_resume_events;
int paused_time_percent =
paused_time_counter_.Percent(metrics::kMinRunTimeInSeconds * 1000);
if (paused_time_percent != -1) {
RTC_HISTOGRAMS_PERCENTAGE(kIndex, uma_prefix_ + "PausedTimeInPercent",
paused_time_percent);
- LOG(LS_INFO) << uma_prefix_ << "PausedTimeInPercent "
- << paused_time_percent;
+ RTC_LOG(LS_INFO) << uma_prefix_ << "PausedTimeInPercent "
+ << paused_time_percent;
}
}
}
@@ -508,23 +509,23 @@
if (total_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) {
RTC_HISTOGRAMS_COUNTS_10000(kIndex, uma_prefix_ + "BitrateSentInKbps",
total_bytes_per_sec.average * 8 / 1000);
- LOG(LS_INFO) << uma_prefix_ << "BitrateSentInBps, "
- << total_bytes_per_sec.ToStringWithMultiplier(8);
+ RTC_LOG(LS_INFO) << uma_prefix_ << "BitrateSentInBps, "
+ << total_bytes_per_sec.ToStringWithMultiplier(8);
}
AggregatedStats media_bytes_per_sec = media_byte_counter_.GetStats();
if (media_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) {
RTC_HISTOGRAMS_COUNTS_10000(kIndex, uma_prefix_ + "MediaBitrateSentInKbps",
media_bytes_per_sec.average * 8 / 1000);
- LOG(LS_INFO) << uma_prefix_ << "MediaBitrateSentInBps, "
- << media_bytes_per_sec.ToStringWithMultiplier(8);
+ RTC_LOG(LS_INFO) << uma_prefix_ << "MediaBitrateSentInBps, "
+ << media_bytes_per_sec.ToStringWithMultiplier(8);
}
AggregatedStats padding_bytes_per_sec = padding_byte_counter_.GetStats();
if (padding_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) {
RTC_HISTOGRAMS_COUNTS_10000(kIndex,
uma_prefix_ + "PaddingBitrateSentInKbps",
padding_bytes_per_sec.average * 8 / 1000);
- LOG(LS_INFO) << uma_prefix_ << "PaddingBitrateSentInBps, "
- << padding_bytes_per_sec.ToStringWithMultiplier(8);
+ RTC_LOG(LS_INFO) << uma_prefix_ << "PaddingBitrateSentInBps, "
+ << padding_bytes_per_sec.ToStringWithMultiplier(8);
}
AggregatedStats retransmit_bytes_per_sec =
retransmit_byte_counter_.GetStats();
@@ -532,16 +533,16 @@
RTC_HISTOGRAMS_COUNTS_10000(kIndex,
uma_prefix_ + "RetransmittedBitrateSentInKbps",
retransmit_bytes_per_sec.average * 8 / 1000);
- LOG(LS_INFO) << uma_prefix_ << "RetransmittedBitrateSentInBps, "
- << retransmit_bytes_per_sec.ToStringWithMultiplier(8);
+ RTC_LOG(LS_INFO) << uma_prefix_ << "RetransmittedBitrateSentInBps, "
+ << retransmit_bytes_per_sec.ToStringWithMultiplier(8);
}
if (!rtp_config.rtx.ssrcs.empty()) {
AggregatedStats rtx_bytes_per_sec = rtx_byte_counter_.GetStats();
int rtx_bytes_per_sec_avg = -1;
if (rtx_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) {
rtx_bytes_per_sec_avg = rtx_bytes_per_sec.average;
- LOG(LS_INFO) << uma_prefix_ << "RtxBitrateSentInBps, "
- << rtx_bytes_per_sec.ToStringWithMultiplier(8);
+ RTC_LOG(LS_INFO) << uma_prefix_ << "RtxBitrateSentInBps, "
+ << rtx_bytes_per_sec.ToStringWithMultiplier(8);
} else if (total_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) {
rtx_bytes_per_sec_avg = 0; // RTX enabled but no RTX data sent, record 0.
}
@@ -556,25 +557,25 @@
if (fec_bytes_per_sec.num_samples > kMinRequiredPeriodicSamples) {
RTC_HISTOGRAMS_COUNTS_10000(kIndex, uma_prefix_ + "FecBitrateSentInKbps",
fec_bytes_per_sec.average * 8 / 1000);
- LOG(LS_INFO) << uma_prefix_ << "FecBitrateSentInBps, "
- << fec_bytes_per_sec.ToStringWithMultiplier(8);
+ RTC_LOG(LS_INFO) << uma_prefix_ << "FecBitrateSentInBps, "
+ << fec_bytes_per_sec.ToStringWithMultiplier(8);
}
}
- LOG(LS_INFO) << "Frames encoded " << current_stats.frames_encoded;
- LOG(LS_INFO) << uma_prefix_ << "DroppedFrames.Capturer "
- << current_stats.frames_dropped_by_capturer;
+ RTC_LOG(LS_INFO) << "Frames encoded " << current_stats.frames_encoded;
+ RTC_LOG(LS_INFO) << uma_prefix_ << "DroppedFrames.Capturer "
+ << current_stats.frames_dropped_by_capturer;
RTC_HISTOGRAMS_COUNTS_1000(kIndex, uma_prefix_ + "DroppedFrames.Capturer",
current_stats.frames_dropped_by_capturer);
- LOG(LS_INFO) << uma_prefix_ << "DroppedFrames.EncoderQueue "
- << current_stats.frames_dropped_by_encoder_queue;
+ RTC_LOG(LS_INFO) << uma_prefix_ << "DroppedFrames.EncoderQueue "
+ << current_stats.frames_dropped_by_encoder_queue;
RTC_HISTOGRAMS_COUNTS_1000(kIndex, uma_prefix_ + "DroppedFrames.EncoderQueue",
current_stats.frames_dropped_by_encoder_queue);
- LOG(LS_INFO) << uma_prefix_ << "DroppedFrames.Encoder "
- << current_stats.frames_dropped_by_encoder;
+ RTC_LOG(LS_INFO) << uma_prefix_ << "DroppedFrames.Encoder "
+ << current_stats.frames_dropped_by_encoder;
RTC_HISTOGRAMS_COUNTS_1000(kIndex, uma_prefix_ + "DroppedFrames.Encoder",
current_stats.frames_dropped_by_encoder);
- LOG(LS_INFO) << uma_prefix_ << "DroppedFrames.Ratelimiter "
- << current_stats.frames_dropped_by_rate_limiter;
+ RTC_LOG(LS_INFO) << uma_prefix_ << "DroppedFrames.Ratelimiter "
+ << current_stats.frames_dropped_by_rate_limiter;
RTC_HISTOGRAMS_COUNTS_1000(kIndex, uma_prefix_ + "DroppedFrames.Ratelimiter",
current_stats.frames_dropped_by_rate_limiter);
}
@@ -797,8 +798,9 @@
}
if (simulcast_idx >= rtp_config_.ssrcs.size()) {
- LOG(LS_ERROR) << "Encoded image outside simulcast range (" << simulcast_idx
- << " >= " << rtp_config_.ssrcs.size() << ").";
+ RTC_LOG(LS_ERROR) << "Encoded image outside simulcast range ("
+ << simulcast_idx << " >= " << rtp_config_.ssrcs.size()
+ << ").";
return;
}
uint32_t ssrc = rtp_config_.ssrcs[simulcast_idx];
diff --git a/video/stream_synchronization.cc b/video/stream_synchronization.cc
index f47037d..6b800d1 100644
--- a/video/stream_synchronization.cc
+++ b/video/stream_synchronization.cc
@@ -70,9 +70,9 @@
assert(total_audio_delay_target_ms && total_video_delay_target_ms);
int current_video_delay_ms = *total_video_delay_target_ms;
- LOG(LS_VERBOSE) << "Audio delay: " << current_audio_delay_ms
- << " current diff: " << relative_delay_ms
- << " for stream " << audio_stream_id_;
+ RTC_LOG(LS_VERBOSE) << "Audio delay: " << current_audio_delay_ms
+ << " current diff: " << relative_delay_ms
+ << " for stream " << audio_stream_id_;
// Calculate the difference between the lowest possible video delay and
// the current audio delay.
int current_diff_ms = current_video_delay_ms - current_audio_delay_ms +
@@ -165,10 +165,11 @@
channel_delay_.last_video_delay_ms = new_video_delay_ms;
channel_delay_.last_audio_delay_ms = new_audio_delay_ms;
- LOG(LS_VERBOSE) << "Sync video delay " << new_video_delay_ms
- << " for video stream " << video_stream_id_
- << " and audio delay " << channel_delay_.extra_audio_delay_ms
- << " for audio stream " << audio_stream_id_;
+ RTC_LOG(LS_VERBOSE) << "Sync video delay " << new_video_delay_ms
+ << " for video stream " << video_stream_id_
+ << " and audio delay "
+ << channel_delay_.extra_audio_delay_ms
+ << " for audio stream " << audio_stream_id_;
// Return values.
*total_video_delay_target_ms = new_video_delay_ms;
diff --git a/video/video_quality_test.cc b/video/video_quality_test.cc
index 6428dc2..d300d11 100644
--- a/video/video_quality_test.cc
+++ b/video/video_quality_test.cc
@@ -844,7 +844,7 @@
test::GetTestArtifactsDir(&output_dir);
std::string output_path =
rtc::Pathname(output_dir, test_label_ + ".jpg").pathname();
- LOG(LS_INFO) << "Saving worst frame to " << output_path;
+ RTC_LOG(LS_INFO) << "Saving worst frame to " << output_path;
test::JpegFrameWriter frame_writer(output_path);
RTC_CHECK(frame_writer.WriteFrame(worst_frame_->frame,
100 /*best quality*/));
diff --git a/video/video_receive_stream.cc b/video/video_receive_stream.cc
index cca0511..5f6b5cf 100644
--- a/video/video_receive_stream.cc
+++ b/video/video_receive_stream.cc
@@ -106,7 +106,7 @@
this, // OnCompleteFrameCallback
timing_.get()),
rtp_stream_sync_(this) {
- LOG(LS_INFO) << "VideoReceiveStream: " << config_.ToString();
+ RTC_LOG(LS_INFO) << "VideoReceiveStream: " << config_.ToString();
RTC_DCHECK(process_thread_);
RTC_DCHECK(call_stats_);
@@ -146,7 +146,7 @@
VideoReceiveStream::~VideoReceiveStream() {
RTC_DCHECK_CALLED_SEQUENTIALLY(&worker_sequence_checker_);
- LOG(LS_INFO) << "~VideoReceiveStream: " << config_.ToString();
+ RTC_LOG(LS_INFO) << "~VideoReceiveStream: " << config_.ToString();
Stop();
process_thread_->DeRegisterModule(&rtp_stream_sync_);
@@ -451,8 +451,8 @@
now_ms - *last_keyframe_packet_ms < kMaxWaitForKeyFrameMs;
if (stream_is_active && !receiving_keyframe) {
- LOG(LS_WARNING) << "No decodable frame in " << wait_ms
- << " ms, requesting keyframe.";
+ RTC_LOG(LS_WARNING) << "No decodable frame in " << wait_ms
+ << " ms, requesting keyframe.";
RequestKeyFrame();
}
}
diff --git a/video/video_send_stream.cc b/video/video_send_stream.cc
index 982cd53..d161025 100644
--- a/video/video_send_stream.cc
+++ b/video/video_send_stream.cc
@@ -104,25 +104,27 @@
RTC_DCHECK_GE(config.rtp.flexfec.payload_type, 0);
RTC_DCHECK_LE(config.rtp.flexfec.payload_type, 127);
if (config.rtp.flexfec.ssrc == 0) {
- LOG(LS_WARNING) << "FlexFEC is enabled, but no FlexFEC SSRC given. "
- "Therefore disabling FlexFEC.";
+ RTC_LOG(LS_WARNING) << "FlexFEC is enabled, but no FlexFEC SSRC given. "
+ "Therefore disabling FlexFEC.";
return nullptr;
}
if (config.rtp.flexfec.protected_media_ssrcs.empty()) {
- LOG(LS_WARNING) << "FlexFEC is enabled, but no protected media SSRC given. "
- "Therefore disabling FlexFEC.";
+ RTC_LOG(LS_WARNING)
+ << "FlexFEC is enabled, but no protected media SSRC given. "
+ "Therefore disabling FlexFEC.";
return nullptr;
}
if (config.rtp.ssrcs.size() > 1) {
- LOG(LS_WARNING) << "Both FlexFEC and simulcast are enabled. This "
- "combination is however not supported by our current "
- "FlexFEC implementation. Therefore disabling FlexFEC.";
+ RTC_LOG(LS_WARNING)
+ << "Both FlexFEC and simulcast are enabled. This "
+ "combination is however not supported by our current "
+ "FlexFEC implementation. Therefore disabling FlexFEC.";
return nullptr;
}
if (config.rtp.flexfec.protected_media_ssrcs.size() > 1) {
- LOG(LS_WARNING)
+ RTC_LOG(LS_WARNING)
<< "The supplied FlexfecConfig contained multiple protected "
"media streams, but our implementation currently only "
"supports protecting a single media stream. "
@@ -563,7 +565,7 @@
void VideoSendStream::Start() {
RTC_DCHECK_RUN_ON(&thread_checker_);
- LOG(LS_INFO) << "VideoSendStream::Start";
+ RTC_LOG(LS_INFO) << "VideoSendStream::Start";
VideoSendStreamImpl* send_stream = send_stream_.get();
worker_queue_->PostTask([this, send_stream] {
send_stream->Start();
@@ -578,7 +580,7 @@
void VideoSendStream::Stop() {
RTC_DCHECK_RUN_ON(&thread_checker_);
- LOG(LS_INFO) << "VideoSendStream::Stop";
+ RTC_LOG(LS_INFO) << "VideoSendStream::Stop";
VideoSendStreamImpl* send_stream = send_stream_.get();
worker_queue_->PostTask([send_stream] { send_stream->Stop(); });
}
@@ -707,7 +709,7 @@
overhead_bytes_per_packet_(0),
transport_overhead_bytes_per_packet_(0) {
RTC_DCHECK_RUN_ON(worker_queue_);
- LOG(LS_INFO) << "VideoSendStreamInternal: " << config_->ToString();
+ RTC_LOG(LS_INFO) << "VideoSendStreamInternal: " << config_->ToString();
weak_ptr_ = weak_ptr_factory_.GetWeakPtr();
module_process_thread_checker_.DetachFromThread();
@@ -822,7 +824,7 @@
RTC_DCHECK_RUN_ON(worker_queue_);
RTC_DCHECK(!payload_router_.IsActive())
<< "VideoSendStreamImpl::Stop not called";
- LOG(LS_INFO) << "~VideoSendStreamInternal: " << config_->ToString();
+ RTC_LOG(LS_INFO) << "~VideoSendStreamInternal: " << config_->ToString();
for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
transport_->packet_router()->RemoveSendRtpModule(rtp_rtcp);
@@ -840,7 +842,7 @@
void VideoSendStreamImpl::Start() {
RTC_DCHECK_RUN_ON(worker_queue_);
- LOG(LS_INFO) << "VideoSendStream::Start";
+ RTC_LOG(LS_INFO) << "VideoSendStream::Start";
if (payload_router_.IsActive())
return;
TRACE_EVENT_INSTANT0("webrtc", "VideoSendStream::Start");
@@ -866,7 +868,7 @@
void VideoSendStreamImpl::Stop() {
RTC_DCHECK_RUN_ON(worker_queue_);
- LOG(LS_INFO) << "VideoSendStream::Stop";
+ RTC_LOG(LS_INFO) << "VideoSendStream::Stop";
if (!payload_router_.IsActive())
return;
TRACE_EVENT_INSTANT0("webrtc", "VideoSendStream::Stop");
@@ -887,7 +889,7 @@
// is supposed to, deregister as BitrateAllocatorObserver. This can happen
// if a camera stops producing frames.
if (encoder_target_rate_bps_ > 0) {
- LOG(LS_INFO) << "SignalEncoderTimedOut, Encoder timed out.";
+ RTC_LOG(LS_INFO) << "SignalEncoderTimedOut, Encoder timed out.";
bitrate_allocator_->RemoveObserver(this);
}
}
@@ -899,7 +901,7 @@
void VideoSendStreamImpl::SignalEncoderActive() {
RTC_DCHECK_RUN_ON(worker_queue_);
- LOG(LS_INFO) << "SignalEncoderActive, Encoder is active.";
+ RTC_LOG(LS_INFO) << "SignalEncoderActive, Encoder is active.";
bitrate_allocator_->AddObserver(
this, encoder_min_bitrate_bps_, encoder_max_bitrate_bps_,
max_padding_bitrate_, !config_->suspend_below_min_bitrate,
@@ -1011,7 +1013,7 @@
auto DisableUlpfec = [&]() { ulpfec_payload_type = -1; };
if (webrtc::field_trial::IsEnabled("WebRTC-DisableUlpFecExperiment")) {
- LOG(LS_INFO) << "Experiment to disable sending ULPFEC is enabled.";
+ RTC_LOG(LS_INFO) << "Experiment to disable sending ULPFEC is enabled.";
DisableUlpfec();
}
@@ -1021,11 +1023,11 @@
// we know that it has a receiver without the RED/RTX workaround.
// See http://crbug.com/webrtc/6650 for more information.
if (IsRedEnabled()) {
- LOG(LS_INFO) << "Both FlexFEC and RED are configured. Disabling RED.";
+ RTC_LOG(LS_INFO) << "Both FlexFEC and RED are configured. Disabling RED.";
DisableRed();
}
if (IsUlpfecEnabled()) {
- LOG(LS_INFO)
+ RTC_LOG(LS_INFO)
<< "Both FlexFEC and ULPFEC are configured. Disabling ULPFEC.";
DisableUlpfec();
}
@@ -1038,7 +1040,7 @@
if (nack_enabled && IsUlpfecEnabled() &&
!PayloadTypeSupportsSkippingFecPackets(
config_->encoder_settings.payload_name)) {
- LOG(LS_WARNING)
+ RTC_LOG(LS_WARNING)
<< "Transmitting payload type without picture ID using "
"NACK+ULPFEC is a waste of bandwidth since ULPFEC packets "
"also have to be retransmitted. Disabling ULPFEC.";
@@ -1061,7 +1063,7 @@
RTC_DCHECK_GE(ulpfec_payload_type, 0);
RTC_DCHECK_LE(ulpfec_payload_type, 127);
if (!IsRedEnabled()) {
- LOG(LS_WARNING)
+ RTC_LOG(LS_WARNING)
<< "ULPFEC is enabled but RED is disabled. Disabling ULPFEC.";
DisableUlpfec();
}
@@ -1269,7 +1271,7 @@
void VideoSendStreamImpl::SetTransportOverhead(
size_t transport_overhead_bytes_per_packet) {
if (transport_overhead_bytes_per_packet >= static_cast<int>(kPathMTU)) {
- LOG(LS_ERROR) << "Transport overhead exceeds size of ethernet frame";
+ RTC_LOG(LS_ERROR) << "Transport overhead exceeds size of ethernet frame";
return;
}
diff --git a/video/video_send_stream_tests.cc b/video/video_send_stream_tests.cc
index 93df93f..52699db 100644
--- a/video/video_send_stream_tests.cc
+++ b/video/video_send_stream_tests.cc
@@ -152,8 +152,9 @@
// unpopulated value we'll wait for a packet with non-zero send time.
observation_complete_.Set();
} else {
- LOG(LS_WARNING) << "Got a packet with zero absoluteSendTime, waiting"
- " for another packet...";
+ RTC_LOG(LS_WARNING)
+ << "Got a packet with zero absoluteSendTime, waiting"
+ " for another packet...";
}
return SEND_PACKET;
diff --git a/video/video_stream_encoder.cc b/video/video_stream_encoder.cc
index 4b67304..6c59670 100644
--- a/video/video_stream_encoder.cc
+++ b/video/video_stream_encoder.cc
@@ -147,18 +147,17 @@
video_stream_encoder_->EncodeVideoFrame(frame_, time_when_posted_us_);
} else {
// There is a newer frame in flight. Do not encode this frame.
- LOG(LS_VERBOSE)
+ RTC_LOG(LS_VERBOSE)
<< "Incoming frame dropped due to that the encoder is blocked.";
++video_stream_encoder_->dropped_frame_count_;
video_stream_encoder_->stats_proxy_->OnFrameDroppedInEncoderQueue();
}
if (log_stats_) {
- LOG(LS_INFO) << "Number of frames: captured "
- << video_stream_encoder_->captured_frame_count_
- << ", dropped (due to encoder blocked) "
- << video_stream_encoder_->dropped_frame_count_
- << ", interval_ms "
- << kFrameLogIntervalMs;
+ RTC_LOG(LS_INFO) << "Number of frames: captured "
+ << video_stream_encoder_->captured_frame_count_
+ << ", dropped (due to encoder blocked) "
+ << video_stream_encoder_->dropped_frame_count_
+ << ", interval_ms " << kFrameLogIntervalMs;
video_stream_encoder_->captured_frame_count_ = 0;
video_stream_encoder_->dropped_frame_count_ = 0;
}
@@ -244,7 +243,8 @@
pixels_wanted >= sink_wants_.max_pixel_count) {
return false;
}
- LOG(LS_INFO) << "Scaling down resolution, max pixels: " << pixels_wanted;
+ RTC_LOG(LS_INFO) << "Scaling down resolution, max pixels: "
+ << pixels_wanted;
sink_wants_.max_pixel_count = pixels_wanted;
sink_wants_.target_pixel_count = rtc::Optional<int>();
source_->AddOrUpdateSink(video_stream_encoder_,
@@ -288,7 +288,8 @@
sink_wants_.target_pixel_count =
rtc::Optional<int>((pixel_count * 5) / 3);
}
- LOG(LS_INFO) << "Scaling up resolution, max pixels: " << max_pixels_wanted;
+ RTC_LOG(LS_INFO) << "Scaling up resolution, max pixels: "
+ << max_pixels_wanted;
source_->AddOrUpdateSink(video_stream_encoder_,
GetActiveSinkWantsInternal());
return true;
@@ -318,7 +319,7 @@
if (fps_wanted >= sink_wants_.max_framerate_fps)
return false;
- LOG(LS_INFO) << "Scaling down framerate: " << fps_wanted;
+ RTC_LOG(LS_INFO) << "Scaling down framerate: " << fps_wanted;
sink_wants_.max_framerate_fps = fps_wanted;
source_->AddOrUpdateSink(video_stream_encoder_,
GetActiveSinkWantsInternal());
@@ -335,7 +336,7 @@
if (fps_wanted <= sink_wants_.max_framerate_fps)
return false;
- LOG(LS_INFO) << "Scaling up framerate: " << fps_wanted;
+ RTC_LOG(LS_INFO) << "Scaling up framerate: " << fps_wanted;
sink_wants_.max_framerate_fps = fps_wanted;
source_->AddOrUpdateSink(video_stream_encoder_,
GetActiveSinkWantsInternal());
@@ -540,7 +541,7 @@
bool nack_enabled) {
RTC_DCHECK_RUN_ON(&encoder_queue_);
RTC_DCHECK(sink_);
- LOG(LS_INFO) << "ConfigureEncoder requested.";
+ RTC_LOG(LS_INFO) << "ConfigureEncoder requested.";
max_data_payload_length_ = max_data_payload_length;
nack_enabled_ = nack_enabled;
@@ -585,7 +586,7 @@
if (!VideoCodecInitializer::SetupCodec(encoder_config_, settings_, streams,
nack_enabled_, &codec,
&rate_allocator_)) {
- LOG(LS_ERROR) << "Failed to create encoder configuration.";
+ RTC_LOG(LS_ERROR) << "Failed to create encoder configuration.";
}
codec.startBitrate =
@@ -599,7 +600,7 @@
&codec, number_of_cores_,
static_cast<uint32_t>(max_data_payload_length_)) == VCM_OK;
if (!success) {
- LOG(LS_ERROR) << "Failed to configure encoder.";
+ RTC_LOG(LS_ERROR) << "Failed to configure encoder.";
rate_allocator_.reset();
}
@@ -693,10 +694,10 @@
if (incoming_frame.ntp_time_ms() <= last_captured_timestamp_) {
// We don't allow the same capture time for two frames, drop this one.
- LOG(LS_WARNING) << "Same/old NTP timestamp ("
- << incoming_frame.ntp_time_ms()
- << " <= " << last_captured_timestamp_
- << ") for incoming frame. Dropping.";
+ RTC_LOG(LS_WARNING) << "Same/old NTP timestamp ("
+ << incoming_frame.ntp_time_ms()
+ << " <= " << last_captured_timestamp_
+ << ") for incoming frame. Dropping.";
return;
}
@@ -755,15 +756,16 @@
pending_encoder_reconfiguration_ = true;
last_frame_info_ = rtc::Optional<VideoFrameInfo>(VideoFrameInfo(
video_frame.width(), video_frame.height(), video_frame.is_texture()));
- LOG(LS_INFO) << "Video frame parameters changed: dimensions="
- << last_frame_info_->width << "x" << last_frame_info_->height
- << ", texture=" << last_frame_info_->is_texture << ".";
+ RTC_LOG(LS_INFO) << "Video frame parameters changed: dimensions="
+ << last_frame_info_->width << "x"
+ << last_frame_info_->height
+ << ", texture=" << last_frame_info_->is_texture << ".";
}
if (initial_rampup_ < kMaxInitialFramedrop &&
video_frame.size() >
MaximumFrameSizeForBitrate(encoder_start_bitrate_bps_ / 1000)) {
- LOG(LS_INFO) << "Dropping frame. Too large for target bitrate.";
+ RTC_LOG(LS_INFO) << "Dropping frame. Too large for target bitrate.";
AdaptDown(kQuality);
++initial_rampup_;
return;
@@ -894,9 +896,9 @@
RTC_DCHECK_RUN_ON(&encoder_queue_);
RTC_DCHECK(sink_) << "sink_ must be set before the encoder is active.";
- LOG(LS_VERBOSE) << "OnBitrateUpdated, bitrate " << bitrate_bps
- << " packet loss " << static_cast<int>(fraction_lost)
- << " rtt " << round_trip_time_ms;
+ RTC_LOG(LS_VERBOSE) << "OnBitrateUpdated, bitrate " << bitrate_bps
+ << " packet loss " << static_cast<int>(fraction_lost)
+ << " rtt " << round_trip_time_ms;
video_sender_.SetChannelParameters(bitrate_bps, fraction_lost,
round_trip_time_ms, rate_allocator_.get(),
@@ -909,8 +911,8 @@
last_observed_bitrate_bps_ = bitrate_bps;
if (video_suspension_changed) {
- LOG(LS_INFO) << "Video suspend state changed to: "
- << (video_is_suspended ? "suspended" : "not suspended");
+ RTC_LOG(LS_INFO) << "Video suspend state changed to: "
+ << (video_is_suspended ? "suspended" : "not suspended");
stats_proxy_->OnSuspendChange(video_is_suspended);
}
}
@@ -1004,7 +1006,7 @@
UpdateAdaptationStats(reason);
- LOG(LS_INFO) << GetConstAdaptCounter().ToString();
+ RTC_LOG(LS_INFO) << GetConstAdaptCounter().ToString();
}
void VideoStreamEncoder::AdaptUp(AdaptReason reason) {
@@ -1045,7 +1047,7 @@
// Reset framerate in case of fewer fps steps down than up.
if (adapt_counter.FramerateCount() == 0 &&
fps != std::numeric_limits<int>::max()) {
- LOG(LS_INFO) << "Removing framerate down-scaling setting.";
+ RTC_LOG(LS_INFO) << "Removing framerate down-scaling setting.";
source_proxy_->IncreaseFramerate(std::numeric_limits<int>::max());
}
break;
@@ -1057,7 +1059,7 @@
// Scale up resolution.
int pixel_count = adaptation_request.input_pixel_count_;
if (adapt_counter.ResolutionCount() == 1) {
- LOG(LS_INFO) << "Removing resolution down-scaling setting.";
+ RTC_LOG(LS_INFO) << "Removing resolution down-scaling setting.";
pixel_count = std::numeric_limits<int>::max();
}
if (!source_proxy_->RequestHigherResolutionThan(pixel_count))
@@ -1069,7 +1071,7 @@
// Scale up framerate.
int fps = adaptation_request.framerate_fps_;
if (adapt_counter.FramerateCount() == 1) {
- LOG(LS_INFO) << "Removing framerate down-scaling setting.";
+ RTC_LOG(LS_INFO) << "Removing framerate down-scaling setting.";
fps = std::numeric_limits<int>::max();
}
@@ -1092,7 +1094,7 @@
UpdateAdaptationStats(reason);
- LOG(LS_INFO) << adapt_counter.ToString();
+ RTC_LOG(LS_INFO) << adapt_counter.ToString();
}
void VideoStreamEncoder::UpdateAdaptationStats(AdaptReason reason) {