Reland of Protect new header extension by field trial experiment to allow hardcoding it in SDP (patchset #1 id:1 of https://codereview.webrtc.org/2922723002/ )

Reland is done after fixes in downstream projects.

TBR=sprang@webrtc.org,asapersson@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chrome:718738

Review-Url: https://codereview.webrtc.org/2922953002
Cr-Commit-Position: refs/heads/master@{#18498}
This commit is contained in:
ilnik 2017-06-08 06:18:53 -07:00 committed by Commit Bot
parent cdafeda1cb
commit cf705c5f13
3 changed files with 10 additions and 0 deletions

View File

@ -2791,6 +2791,8 @@ TEST_F(EndToEndTest, MAYBE_ContentTypeSwitches) {
int num_frames_received_ GUARDED_BY(&crit_);
} test;
test::ScopedFieldTrials override_field_trials(
"WebRTC-VideoContentTypeExtension/Enabled/");
metrics::Reset();
Call::Config send_config(test.GetSenderCallConfig());
@ -2875,6 +2877,8 @@ TEST_F(EndToEndTest, VerifyHistogramStatsWithScreenshare) {
const bool kEnabledRtx = false;
const bool kEnabledRed = false;
const bool kScreenshare = true;
test::ScopedFieldTrials override_field_trials(
"WebRTC-VideoContentTypeExtension/Enabled/");
VerifyHistogramStats(kEnabledRtx, kEnabledRed, kScreenshare);
}

View File

@ -828,6 +828,10 @@ VideoSendStreamImpl::VideoSendStreamImpl(
RTC_DCHECK_GE(id, 1);
RTC_DCHECK_LE(id, 14);
RTC_DCHECK(RtpExtension::IsSupportedForVideo(extension));
if (StringToRtpExtensionType(extension) == kRtpExtensionVideoContentType &&
!field_trial::IsEnabled("WebRTC-VideoContentTypeExtension")) {
continue;
}
for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
RTC_CHECK_EQ(0, rtp_rtcp->RegisterSendRtpHeaderExtension(
StringToRtpExtensionType(extension), id));

View File

@ -332,6 +332,8 @@ TEST_F(VideoSendStreamTest, SupportsVideoContentType) {
}
} test;
test::ScopedFieldTrials override_field_trials(
"WebRTC-VideoContentTypeExtension/Enabled/");
RunBaseTest(&test);
}