OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 | 42 |
43 namespace cricket { | 43 namespace cricket { |
44 namespace { | 44 namespace { |
45 // If this field trial is enabled, we will enable sending FlexFEC and disable | 45 // If this field trial is enabled, we will enable sending FlexFEC and disable |
46 // sending ULPFEC whenever the former has been negotiated. Receiving FlexFEC | 46 // sending ULPFEC whenever the former has been negotiated. Receiving FlexFEC |
47 // is enabled whenever FlexFEC has been negotiated. | 47 // is enabled whenever FlexFEC has been negotiated. |
48 bool IsFlexfecFieldTrialEnabled() { | 48 bool IsFlexfecFieldTrialEnabled() { |
49 return webrtc::field_trial::FindFullName("WebRTC-FlexFEC-03") == "Enabled"; | 49 return webrtc::field_trial::FindFullName("WebRTC-FlexFEC-03") == "Enabled"; |
50 } | 50 } |
51 | 51 |
52 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.
| |
53 return webrtc::field_trial::FindFullName( | |
54 "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.
| |
55 } | |
56 | |
52 // Wrap cricket::WebRtcVideoEncoderFactory as a webrtc::VideoEncoderFactory. | 57 // Wrap cricket::WebRtcVideoEncoderFactory as a webrtc::VideoEncoderFactory. |
53 class EncoderFactoryAdapter : public webrtc::VideoEncoderFactory { | 58 class EncoderFactoryAdapter : public webrtc::VideoEncoderFactory { |
54 public: | 59 public: |
55 // EncoderFactoryAdapter doesn't take ownership of |factory|, which is owned | 60 // EncoderFactoryAdapter doesn't take ownership of |factory|, which is owned |
56 // by e.g. PeerConnectionFactory. | 61 // by e.g. PeerConnectionFactory. |
57 explicit EncoderFactoryAdapter(cricket::WebRtcVideoEncoderFactory* factory) | 62 explicit EncoderFactoryAdapter(cricket::WebRtcVideoEncoderFactory* factory) |
58 : factory_(factory) {} | 63 : factory_(factory) {} |
59 virtual ~EncoderFactoryAdapter() {} | 64 virtual ~EncoderFactoryAdapter() {} |
60 | 65 |
61 // Implement webrtc::VideoEncoderFactory. | 66 // Implement webrtc::VideoEncoderFactory. |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
496 webrtc::RtpExtension::kAbsSendTimeDefaultId)); | 501 webrtc::RtpExtension::kAbsSendTimeDefaultId)); |
497 capabilities.header_extensions.push_back( | 502 capabilities.header_extensions.push_back( |
498 webrtc::RtpExtension(webrtc::RtpExtension::kVideoRotationUri, | 503 webrtc::RtpExtension(webrtc::RtpExtension::kVideoRotationUri, |
499 webrtc::RtpExtension::kVideoRotationDefaultId)); | 504 webrtc::RtpExtension::kVideoRotationDefaultId)); |
500 capabilities.header_extensions.push_back(webrtc::RtpExtension( | 505 capabilities.header_extensions.push_back(webrtc::RtpExtension( |
501 webrtc::RtpExtension::kTransportSequenceNumberUri, | 506 webrtc::RtpExtension::kTransportSequenceNumberUri, |
502 webrtc::RtpExtension::kTransportSequenceNumberDefaultId)); | 507 webrtc::RtpExtension::kTransportSequenceNumberDefaultId)); |
503 capabilities.header_extensions.push_back( | 508 capabilities.header_extensions.push_back( |
504 webrtc::RtpExtension(webrtc::RtpExtension::kPlayoutDelayUri, | 509 webrtc::RtpExtension(webrtc::RtpExtension::kPlayoutDelayUri, |
505 webrtc::RtpExtension::kPlayoutDelayDefaultId)); | 510 webrtc::RtpExtension::kPlayoutDelayDefaultId)); |
511 if (IsVideoContentTypeExtensionEnabled()) { | |
512 capabilities.header_extensions.push_back( | |
513 webrtc::RtpExtension(webrtc::RtpExtension::kVideoContentTypeUri, | |
514 webrtc::RtpExtension::kVideoContentTypeDefaultId)); | |
515 } | |
506 return capabilities; | 516 return capabilities; |
507 } | 517 } |
508 | 518 |
509 void WebRtcVideoEngine2::SetExternalDecoderFactory( | 519 void WebRtcVideoEngine2::SetExternalDecoderFactory( |
510 WebRtcVideoDecoderFactory* decoder_factory) { | 520 WebRtcVideoDecoderFactory* decoder_factory) { |
511 RTC_DCHECK(!initialized_); | 521 RTC_DCHECK(!initialized_); |
512 external_decoder_factory_ = decoder_factory; | 522 external_decoder_factory_ = decoder_factory; |
513 } | 523 } |
514 | 524 |
515 void WebRtcVideoEngine2::SetExternalEncoderFactory( | 525 void WebRtcVideoEngine2::SetExternalEncoderFactory( |
(...skipping 2045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2561 rtx_mapping[video_codecs[i].codec.id] != | 2571 rtx_mapping[video_codecs[i].codec.id] != |
2562 ulpfec_config.red_payload_type) { | 2572 ulpfec_config.red_payload_type) { |
2563 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2573 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2564 } | 2574 } |
2565 } | 2575 } |
2566 | 2576 |
2567 return video_codecs; | 2577 return video_codecs; |
2568 } | 2578 } |
2569 | 2579 |
2570 } // namespace cricket | 2580 } // namespace cricket |
OLD | NEW |