| 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 25 matching lines...) Expand all Loading... |
| 36 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" | 36 #include "webrtc/media/engine/webrtcvideoencoderfactory.h" |
| 37 #include "webrtc/media/engine/webrtcvoiceengine.h" | 37 #include "webrtc/media/engine/webrtcvoiceengine.h" |
| 38 #include "webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h" | 38 #include "webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter.h" |
| 39 #include "webrtc/system_wrappers/include/field_trial.h" | 39 #include "webrtc/system_wrappers/include/field_trial.h" |
| 40 | 40 |
| 41 using DegradationPreference = webrtc::VideoSendStream::DegradationPreference; | 41 using DegradationPreference = webrtc::VideoSendStream::DegradationPreference; |
| 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. |
| 47 // is enabled whenever FlexFEC has been negotiated. | 47 // FlexFEC can only be negotiated when the "flexfec-03" SDP codec is enabled, |
| 48 // which is done by enabling the "WebRTC-FlexFEC-03-Advertised" field trial; see |
| 49 // internalencoderfactory.cc. |
| 48 bool IsFlexfecFieldTrialEnabled() { | 50 bool IsFlexfecFieldTrialEnabled() { |
| 49 return webrtc::field_trial::FindFullName("WebRTC-FlexFEC-03") == "Enabled"; | 51 return webrtc::field_trial::IsEnabled("WebRTC-FlexFEC-03"); |
| 50 } | 52 } |
| 51 | 53 |
| 52 // If this field trial is enabled, we will report VideoContentType RTP extension | 54 // If this field trial is enabled, we will report VideoContentType RTP extension |
| 53 // in capabilities (thus, it will end up in the default SDP and extension will | 55 // in capabilities (thus, it will end up in the default SDP and extension will |
| 54 // be sent for all key-frames). | 56 // be sent for all key-frames). |
| 55 bool IsVideoContentTypeExtensionFieldTrialEnabled() { | 57 bool IsVideoContentTypeExtensionFieldTrialEnabled() { |
| 56 return webrtc::field_trial::IsEnabled("WebRTC-VideoContentTypeExtension"); | 58 return webrtc::field_trial::IsEnabled("WebRTC-VideoContentTypeExtension"); |
| 57 } | 59 } |
| 58 | 60 |
| 59 // Wrap cricket::WebRtcVideoEncoderFactory as a webrtc::VideoEncoderFactory. | 61 // Wrap cricket::WebRtcVideoEncoderFactory as a webrtc::VideoEncoderFactory. |
| (...skipping 2537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2597 rtx_mapping[video_codecs[i].codec.id] != | 2599 rtx_mapping[video_codecs[i].codec.id] != |
| 2598 ulpfec_config.red_payload_type) { | 2600 ulpfec_config.red_payload_type) { |
| 2599 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2601 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
| 2600 } | 2602 } |
| 2601 } | 2603 } |
| 2602 | 2604 |
| 2603 return video_codecs; | 2605 return video_codecs; |
| 2604 } | 2606 } |
| 2605 | 2607 |
| 2606 } // namespace cricket | 2608 } // namespace cricket |
| OLD | NEW |