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

Side by Side Diff: webrtc/media/engine/internalencoderfactory.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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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
11 #include "webrtc/media/engine/internalencoderfactory.h" 11 #include "webrtc/media/engine/internalencoderfactory.h"
12 12
13 #include <utility> 13 #include <utility>
14 14
15 #include "webrtc/modules/video_coding/codecs/h264/include/h264.h" 15 #include "webrtc/modules/video_coding/codecs/h264/include/h264.h"
16 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" 16 #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
17 #include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h" 17 #include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h"
18 #include "webrtc/system_wrappers/include/field_trial.h" 18 #include "webrtc/system_wrappers/include/field_trial.h"
19 19
20 namespace cricket { 20 namespace cricket {
21 21
22 namespace { 22 namespace {
23 23
24 const char kFlexfecFieldTrialName[] = "WebRTC-FlexFEC-03"; 24 const char kFlexfecFieldTrialName[] = "WebRTC-FlexFEC-03";
25 25
26 bool IsFlexfecFieldTrialEnabled() { 26 bool IsFlexfecFieldTrialEnabled() {
27 return webrtc::field_trial::FindFullName(kFlexfecFieldTrialName) == "Enabled"; 27 return webrtc::field_trial::IsEnabled(kFlexfecFieldTrialName);
28 } 28 }
29 29
30 } // namespace 30 } // namespace
31 31
32 InternalEncoderFactory::InternalEncoderFactory() { 32 InternalEncoderFactory::InternalEncoderFactory() {
33 supported_codecs_.push_back(cricket::VideoCodec(kVp8CodecName)); 33 supported_codecs_.push_back(cricket::VideoCodec(kVp8CodecName));
34 if (webrtc::VP9Encoder::IsSupported()) 34 if (webrtc::VP9Encoder::IsSupported())
35 supported_codecs_.push_back(cricket::VideoCodec(kVp9CodecName)); 35 supported_codecs_.push_back(cricket::VideoCodec(kVp9CodecName));
36 if (webrtc::H264Encoder::IsSupported()) { 36 if (webrtc::H264Encoder::IsSupported()) {
37 cricket::VideoCodec codec(kH264CodecName); 37 cricket::VideoCodec codec(kH264CodecName);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 InternalEncoderFactory::supported_codecs() const { 85 InternalEncoderFactory::supported_codecs() const {
86 return supported_codecs_; 86 return supported_codecs_;
87 } 87 }
88 88
89 void InternalEncoderFactory::DestroyVideoEncoder( 89 void InternalEncoderFactory::DestroyVideoEncoder(
90 webrtc::VideoEncoder* encoder) { 90 webrtc::VideoEncoder* encoder) {
91 delete encoder; 91 delete encoder;
92 } 92 }
93 93
94 } // namespace cricket 94 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698