Default enable content type rtp header extension
BUG=webrtc:7420 Review-Url: https://codereview.webrtc.org/2998843002 Cr-Commit-Position: refs/heads/master@{#19346}
This commit is contained in:
@ -55,13 +55,6 @@ bool IsFlexfecAdvertisedFieldTrialEnabled() {
|
||||
return webrtc::field_trial::IsEnabled("WebRTC-FlexFEC-03-Advertised");
|
||||
}
|
||||
|
||||
// If this field trial is enabled, we will report VideoContentType RTP extension
|
||||
// in capabilities (thus, it will end up in the default SDP and extension will
|
||||
// be sent for all key-frames).
|
||||
bool IsVideoContentTypeExtensionFieldTrialEnabled() {
|
||||
return webrtc::field_trial::IsEnabled("WebRTC-VideoContentTypeExtension");
|
||||
}
|
||||
|
||||
// An encoder factory that wraps Create requests for simulcastable codec types
|
||||
// with a webrtc::SimulcastEncoderAdapter. Non simulcastable codec type
|
||||
// requests are just passed through to the contained encoder factory.
|
||||
@ -430,11 +423,9 @@ RtpCapabilities WebRtcVideoEngine::GetCapabilities() const {
|
||||
capabilities.header_extensions.push_back(
|
||||
webrtc::RtpExtension(webrtc::RtpExtension::kPlayoutDelayUri,
|
||||
webrtc::RtpExtension::kPlayoutDelayDefaultId));
|
||||
if (IsVideoContentTypeExtensionFieldTrialEnabled()) {
|
||||
capabilities.header_extensions.push_back(
|
||||
webrtc::RtpExtension(webrtc::RtpExtension::kVideoContentTypeUri,
|
||||
webrtc::RtpExtension::kVideoContentTypeDefaultId));
|
||||
}
|
||||
capabilities.header_extensions.push_back(
|
||||
webrtc::RtpExtension(webrtc::RtpExtension::kVideoContentTypeUri,
|
||||
webrtc::RtpExtension::kVideoContentTypeDefaultId));
|
||||
// TODO(ilnik): Add kVideoTimingUri/kVideoTimingDefaultId to capabilities.
|
||||
// Possibly inside field trial.
|
||||
return capabilities;
|
||||
|
||||
@ -273,29 +273,6 @@ TEST_F(WebRtcVideoEngineTest, CVOSetHeaderExtensionBeforeCapturer) {
|
||||
EXPECT_TRUE(capturer.apply_rotation());
|
||||
}
|
||||
|
||||
|
||||
// TODO(ilnik): Remove this test once field trial is gone.
|
||||
TEST_F(WebRtcVideoEngineTest, SupportsVideoContentTypeHeaderExtension) {
|
||||
// Extension shound not be reported outside of the field trial.
|
||||
RtpCapabilities capabilities = engine_.GetCapabilities();
|
||||
EXPECT_FALSE(capabilities.header_extensions.empty());
|
||||
for (const RtpExtension& extension : capabilities.header_extensions) {
|
||||
EXPECT_NE(extension.uri, RtpExtension::kVideoContentTypeUri);
|
||||
}
|
||||
webrtc::test::ScopedFieldTrials override_field_trials_(
|
||||
"WebRTC-VideoContentTypeExtension/Enabled/");
|
||||
// Should be reported within field trial.
|
||||
capabilities = engine_.GetCapabilities();
|
||||
EXPECT_FALSE(capabilities.header_extensions.empty());
|
||||
for (const RtpExtension& extension : capabilities.header_extensions) {
|
||||
if (extension.uri == RtpExtension::kVideoContentTypeUri) {
|
||||
EXPECT_EQ(RtpExtension::kVideoContentTypeDefaultId, extension.id);
|
||||
return;
|
||||
}
|
||||
}
|
||||
FAIL() << "Video Content Type extension not in header-extension list.";
|
||||
}
|
||||
|
||||
TEST_F(WebRtcVideoEngineTest, CVOSetHeaderExtensionBeforeAddSendStream) {
|
||||
// Allocate the capturer first to prevent early destruction before channel's
|
||||
// dtor is called.
|
||||
|
||||
Reference in New Issue
Block a user