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

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

Issue 2817553004: Add content type extension to capabilities (Closed)
Patch Set: Implement Brandtr@ comments 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..24135ee9216456d52f7d1529440fb1f8b0306738 100644
--- a/webrtc/media/engine/webrtcvideoengine2.cc
+++ b/webrtc/media/engine/webrtcvideoengine2.cc
@@ -49,6 +49,12 @@ bool IsFlexfecFieldTrialEnabled() {
return webrtc::field_trial::FindFullName("WebRTC-FlexFEC-03") == "Enabled";
}
+// If this field trial is enabled, we will report VideoContentType RTP extension
brandtr 2017/04/13 10:00:25 But the effect of adding this extension to the cap
ilnik 2017/04/13 10:12:28 Yes. I have updated the comment to be more detaile
+// in capabilities.
+bool IsVideoContentTypeExtensionFieldTrialEnabled() {
+ return webrtc::field_trial::IsEnabled("WebRTC-VideoContentTypeExtension");
+}
+
// Wrap cricket::WebRtcVideoEncoderFactory as a webrtc::VideoEncoderFactory.
class EncoderFactoryAdapter : public webrtc::VideoEncoderFactory {
public:
@@ -503,6 +509,11 @@ RtpCapabilities WebRtcVideoEngine2::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));
+ }
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