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

Unified Diff: webrtc/video/send_statistics_proxy.cc

Issue 2498393002: Make SendStatisticsProxy let through FlexFEC packets. (Closed)
Patch Set: Rebase. Created 4 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/send_statistics_proxy.cc
diff --git a/webrtc/video/send_statistics_proxy.cc b/webrtc/video/send_statistics_proxy.cc
index a996976e5d48aa8fa0ea33be0bba100f129ef94a..1f0ee2cb7a8e0806a3cf3b2b53168ff9a7520687 100644
--- a/webrtc/video/send_statistics_proxy.cc
+++ b/webrtc/video/send_statistics_proxy.cc
@@ -344,7 +344,8 @@ void SendStatisticsProxy::UmaSamplesContainer::UpdateHistograms(
static_cast<int>(rtx.transmitted.TotalBytes() * 8 / elapsed_sec /
1000));
}
- if (rtp_config.ulpfec.red_payload_type != -1) {
+ if (rtp_config.flexfec.flexfec_payload_type != -1 ||
+ rtp_config.ulpfec.red_payload_type != -1) {
RTC_HISTOGRAMS_COUNTS_10000(kIndex,
uma_prefix_ + "FecBitrateSentInKbps",
static_cast<int>(rtp_rtx.fec.TotalBytes() *
@@ -418,15 +419,15 @@ VideoSendStream::StreamStats* SendStatisticsProxy::GetStatsEntry(
if (it != stats_.substreams.end())
return &it->second;
- bool is_rtx = false;
- if (std::find(rtp_config_.ssrcs.begin(), rtp_config_.ssrcs.end(), ssrc) ==
- rtp_config_.ssrcs.end()) {
- if (std::find(rtp_config_.rtx.ssrcs.begin(), rtp_config_.rtx.ssrcs.end(),
- ssrc) == rtp_config_.rtx.ssrcs.end()) {
- return nullptr;
- }
- is_rtx = true;
- }
+ bool is_media = std::find(rtp_config_.ssrcs.begin(), rtp_config_.ssrcs.end(),
+ ssrc) != rtp_config_.ssrcs.end();
+ bool is_flexfec = rtp_config_.flexfec.flexfec_payload_type != -1 &&
+ ssrc == rtp_config_.flexfec.flexfec_ssrc;
+ bool is_rtx =
+ std::find(rtp_config_.rtx.ssrcs.begin(), rtp_config_.rtx.ssrcs.end(),
+ ssrc) != rtp_config_.rtx.ssrcs.end();
+ if (!is_media && !is_flexfec && !is_rtx)
+ return nullptr;
// Insert new entry and return ptr.
VideoSendStream::StreamStats* entry = &stats_.substreams[ssrc];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698