Advertise dependency descriptor rtp header extension behind a field trial

Bug: webrtc:10342
Change-Id: I7020f9a56e09e90e78850935765da5e4dff8ff66
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188382
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32401}
This commit is contained in:
Danil Chapovalov
2020-10-14 11:11:49 +02:00
committed by Commit Bot
parent 0c83e15c6b
commit 44f749dac6
2 changed files with 18 additions and 0 deletions

View File

@ -633,6 +633,11 @@ WebRtcVideoEngine::GetRtpHeaderExtensions() const {
IsEnabled(trials_, "WebRTC-GenericDescriptorAdvertised")
? webrtc::RtpTransceiverDirection::kSendRecv
: webrtc::RtpTransceiverDirection::kStopped);
result.emplace_back(
webrtc::RtpExtension::kDependencyDescriptorUri, id,
IsEnabled(trials_, "WebRTC-DependencyDescriptorAdvertised")
? webrtc::RtpTransceiverDirection::kSendRecv
: webrtc::RtpTransceiverDirection::kStopped);
return result;
}

View File

@ -368,6 +368,19 @@ TEST_F(WebRtcVideoEngineTestWithGenericDescriptor,
ExpectRtpCapabilitySupport(RtpExtension::kGenericFrameDescriptorUri00, true);
}
class WebRtcVideoEngineTestWithDependencyDescriptor
: public WebRtcVideoEngineTest {
public:
WebRtcVideoEngineTestWithDependencyDescriptor()
: WebRtcVideoEngineTest(
"WebRTC-DependencyDescriptorAdvertised/Enabled/") {}
};
TEST_F(WebRtcVideoEngineTestWithDependencyDescriptor,
AdvertiseDependencyDescriptor) {
ExpectRtpCapabilitySupport(RtpExtension::kDependencyDescriptorUri, true);
}
TEST_F(WebRtcVideoEngineTest, CVOSetHeaderExtensionBeforeCapturer) {
// Allocate the source first to prevent early destruction before channel's
// dtor is called.