OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 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 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1291 JNIEnv* jni = AttachCurrentThreadIfNeeded(); | 1291 JNIEnv* jni = AttachCurrentThreadIfNeeded(); |
1292 ScopedLocalRefFrame local_ref_frame(jni); | 1292 ScopedLocalRefFrame local_ref_frame(jni); |
1293 return new MediaCodecVideoEncoder(jni, codec, egl_context_); | 1293 return new MediaCodecVideoEncoder(jni, codec, egl_context_); |
1294 } | 1294 } |
1295 ALOGW << "Can not find HW video encoder for type " << codec.name; | 1295 ALOGW << "Can not find HW video encoder for type " << codec.name; |
1296 return nullptr; | 1296 return nullptr; |
1297 } | 1297 } |
1298 | 1298 |
1299 const std::vector<cricket::VideoCodec>& | 1299 const std::vector<cricket::VideoCodec>& |
1300 MediaCodecVideoEncoderFactory::supported_codecs() const { | 1300 MediaCodecVideoEncoderFactory::supported_codecs() const { |
1301 if (webrtc::field_trial::FindFullName(kH264HighProfileFieldTrial) == | 1301 if (webrtc::field_trial::IsEnabled(kH264HighProfileFieldTrial)) { |
1302 "Enabled") | |
1303 return supported_codecs_with_h264_hp_; | 1302 return supported_codecs_with_h264_hp_; |
1304 else | 1303 } else { |
1305 return supported_codecs_; | 1304 return supported_codecs_; |
| 1305 } |
1306 } | 1306 } |
1307 | 1307 |
1308 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder( | 1308 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder( |
1309 webrtc::VideoEncoder* encoder) { | 1309 webrtc::VideoEncoder* encoder) { |
1310 ALOGD << "Destroy video encoder."; | 1310 ALOGD << "Destroy video encoder."; |
1311 delete encoder; | 1311 delete encoder; |
1312 } | 1312 } |
1313 | 1313 |
1314 } // namespace webrtc_jni | 1314 } // namespace webrtc_jni |
OLD | NEW |