Make SendStatisticsProxy let through FlexFEC packets.

This is initial work to get the stats working for FlexFEC.

BUG=webrtc:5654

Review-Url: https://codereview.webrtc.org/2498393002
Cr-Commit-Position: refs/heads/master@{#15089}
This commit is contained in:
brandtr 2016-11-15 08:21:52 -08:00 committed by Commit bot
parent 43cb716e55
commit cd188f6031

View File

@ -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];