Explicitly only add transport-cc RTCP feedback param to default FlexFEC codec.

Earlier, the FlexFEC codec would receive the same default RTCP feedback
params as the media codecs. Since most of these are not used, there is
no point negotiating them.

BUG=webrtc:5654

Review-Url: https://codereview.webrtc.org/2623513002
Cr-Commit-Position: refs/heads/master@{#16057}
This commit is contained in:
brandtr 2017-01-13 07:15:54 -08:00 committed by Commit bot
parent bf0845201a
commit 36e7d70410
3 changed files with 15 additions and 2 deletions

View File

@ -53,6 +53,10 @@ InternalEncoderFactory::InternalEncoderFactory() {
// we never use the actual value anywhere in our code however.
// TODO(brandtr): Consider honouring this value in the sender and receiver.
flexfec_codec.SetParam(kFlexfecFmtpRepairWindow, "10000000");
flexfec_codec.AddFeedbackParam(
FeedbackParam(kRtcpFbParamTransportCc, kParamValueEmpty));
flexfec_codec.AddFeedbackParam(
FeedbackParam(kRtcpFbParamRemb, kParamValueEmpty));
supported_codecs_.push_back(flexfec_codec);
}
}

View File

@ -571,7 +571,7 @@ static rtc::Optional<int> NextFreePayloadType(
// This is a helper function for GetSupportedCodecs below. It will append new
// unique codecs from |input_codecs| to |unified_codecs|. It will add default
// feedback params to the codecs and will also add an associated RTX codec for
// recognized codecs (VP8, VP9, H264, and Red).
// recognized codecs (VP8, VP9, H264, and RED).
static void AppendVideoCodecs(const std::vector<VideoCodec>& input_codecs,
std::vector<VideoCodec>* unified_codecs) {
for (VideoCodec codec : input_codecs) {
@ -582,7 +582,8 @@ static void AppendVideoCodecs(const std::vector<VideoCodec>& input_codecs,
codec.id = *payload_type;
// TODO(magjed): Move the responsibility of setting these parameters to the
// encoder factories instead.
if (codec.name != kRedCodecName && codec.name != kUlpfecCodecName)
if (codec.name != kRedCodecName && codec.name != kUlpfecCodecName &&
codec.name != kFlexfecCodecName)
AddDefaultFeedbackParams(&codec);
// Don't add same codec twice.
if (FindMatchingCodec(*unified_codecs, codec))

View File

@ -2367,6 +2367,14 @@ class WebRtcVideoChannel2FlexfecTest : public WebRtcVideoChannel2Test {
: WebRtcVideoChannel2Test("WebRTC-FlexFEC-03/Enabled/") {}
};
// TODO(brandtr): Merge into "non-field trial" test when FlexFEC is enabled
// by default.
TEST_F(WebRtcVideoChannel2FlexfecTest,
DefaultFlexfecCodecHasTransportCcAndRembFeedbackParam) {
EXPECT_TRUE(cricket::HasTransportCc(GetEngineCodec("flexfec-03")));
EXPECT_TRUE(cricket::HasRemb(GetEngineCodec("flexfec-03")));
}
// TODO(brandtr): Merge into "non-field trial" test when FlexFEC is enabled
// by default.
TEST_F(WebRtcVideoChannel2FlexfecTest, SetDefaultSendCodecsWithoutSsrc) {