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

Side by Side Diff: webrtc/media/engine/webrtcvideoengine2.cc

Issue 2717973005: Test field trial group with startswith rather than equals. (Closed)
Patch Set: Added IsEnabled() convenience function Created 3 years, 9 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 unified diff | Download patch
OLDNEW
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 // Three things happen when the FlexFEC field trial is enabled: 44 // Three things happen when the FlexFEC field trial is enabled:
45 // 1) FlexFEC is exposed in the default codec list, eventually showing up 45 // 1) FlexFEC is exposed in the default codec list, eventually showing up
46 // in the default SDP. (See InternalEncoderFactory ctor.) 46 // in the default SDP. (See InternalEncoderFactory ctor.)
47 // 2) FlexFEC send parameters are set in the VideoSendStream config. 47 // 2) FlexFEC send parameters are set in the VideoSendStream config.
48 // 3) FlexFEC receive parameters are set in the FlexfecReceiveStream config, 48 // 3) FlexFEC receive parameters are set in the FlexfecReceiveStream config,
49 // and the corresponding object is instantiated. 49 // and the corresponding object is instantiated.
50 const char kFlexfecFieldTrialName[] = "WebRTC-FlexFEC-03"; 50 const char kFlexfecFieldTrialName[] = "WebRTC-FlexFEC-03";
51 51
52 bool IsFlexfecFieldTrialEnabled() { 52 bool IsFlexfecFieldTrialEnabled() {
53 return webrtc::field_trial::FindFullName(kFlexfecFieldTrialName) == "Enabled"; 53 return webrtc::field_trial::IsEnabled(kFlexfecFieldTrialName);
54 } 54 }
55 55
56 // Wrap cricket::WebRtcVideoEncoderFactory as a webrtc::VideoEncoderFactory. 56 // Wrap cricket::WebRtcVideoEncoderFactory as a webrtc::VideoEncoderFactory.
57 class EncoderFactoryAdapter : public webrtc::VideoEncoderFactory { 57 class EncoderFactoryAdapter : public webrtc::VideoEncoderFactory {
58 public: 58 public:
59 // EncoderFactoryAdapter doesn't take ownership of |factory|, which is owned 59 // EncoderFactoryAdapter doesn't take ownership of |factory|, which is owned
60 // by e.g. PeerConnectionFactory. 60 // by e.g. PeerConnectionFactory.
61 explicit EncoderFactoryAdapter(cricket::WebRtcVideoEncoderFactory* factory) 61 explicit EncoderFactoryAdapter(cricket::WebRtcVideoEncoderFactory* factory)
62 : factory_(factory) {} 62 : factory_(factory) {}
63 virtual ~EncoderFactoryAdapter() {} 63 virtual ~EncoderFactoryAdapter() {}
(...skipping 2463 matching lines...) Expand 10 before | Expand all | Expand 10 after
2527 rtx_mapping[video_codecs[i].codec.id] != 2527 rtx_mapping[video_codecs[i].codec.id] !=
2528 ulpfec_config.red_payload_type) { 2528 ulpfec_config.red_payload_type) {
2529 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2529 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2530 } 2530 }
2531 } 2531 }
2532 2532
2533 return video_codecs; 2533 return video_codecs;
2534 } 2534 }
2535 2535
2536 } // namespace cricket 2536 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698