Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(735)

Unified Diff: webrtc/media/engine/webrtcvideoengine2.cc

Issue 2817553004: Add content type extension to capabilities (Closed)
Patch Set: Fix test to account for field trial Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvideoengine2.cc
diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc
index 087fc4e011d7a7066534e4a892238a93f0ee4be5..a5e6eb69940d649db5a8570563f38e96535ab74b 100644
--- a/webrtc/media/engine/webrtcvideoengine2.cc
+++ b/webrtc/media/engine/webrtcvideoengine2.cc
@@ -49,6 +49,11 @@ bool IsFlexfecFieldTrialEnabled() {
return webrtc::field_trial::FindFullName("WebRTC-FlexFEC-03") == "Enabled";
}
+bool IsVideoContentTypeExtensionEnabled() {
brandtr 2017/04/13 09:42:50 Nits: 1) Add "FieldTrial" to the name of this fun
ilnik 2017/04/13 09:47:44 Done.
+ return webrtc::field_trial::FindFullName(
+ "WebRTC-VideoContentTypeExtension") == "Enabled";
brandtr 2017/04/13 09:42:50 Replace with a call to this function instead: http
ilnik 2017/04/13 09:47:44 Done.
+}
+
// Wrap cricket::WebRtcVideoEncoderFactory as a webrtc::VideoEncoderFactory.
class EncoderFactoryAdapter : public webrtc::VideoEncoderFactory {
public:
@@ -503,6 +508,11 @@ RtpCapabilities WebRtcVideoEngine2::GetCapabilities() const {
capabilities.header_extensions.push_back(
webrtc::RtpExtension(webrtc::RtpExtension::kPlayoutDelayUri,
webrtc::RtpExtension::kPlayoutDelayDefaultId));
+ if (IsVideoContentTypeExtensionEnabled()) {
+ capabilities.header_extensions.push_back(
+ webrtc::RtpExtension(webrtc::RtpExtension::kVideoContentTypeUri,
+ webrtc::RtpExtension::kVideoContentTypeDefaultId));
+ }
return capabilities;
}
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698