| 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 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1351     ALOGE << "error calling NewGlobalRef for EGL Context."; | 1351     ALOGE << "error calling NewGlobalRef for EGL Context."; | 
| 1352   } | 1352   } | 
| 1353 } | 1353 } | 
| 1354 | 1354 | 
| 1355 webrtc::VideoEncoder* MediaCodecVideoEncoderFactory::CreateVideoEncoder( | 1355 webrtc::VideoEncoder* MediaCodecVideoEncoderFactory::CreateVideoEncoder( | 
| 1356     const cricket::VideoCodec& codec) { | 1356     const cricket::VideoCodec& codec) { | 
| 1357   if (supported_codecs_.empty()) { | 1357   if (supported_codecs_.empty()) { | 
| 1358     ALOGW << "No HW video encoder for codec " << codec.name; | 1358     ALOGW << "No HW video encoder for codec " << codec.name; | 
| 1359     return nullptr; | 1359     return nullptr; | 
| 1360   } | 1360   } | 
| 1361   if (IsCodecSupported(supported_codecs_, codec)) { | 1361   if (FindMatchingCodec(supported_codecs_, codec)) { | 
| 1362     ALOGD << "Create HW video encoder for " << codec.name; | 1362     ALOGD << "Create HW video encoder for " << codec.name; | 
| 1363     const VideoCodecType type = cricket::CodecTypeFromName(codec.name); | 1363     const VideoCodecType type = cricket::CodecTypeFromName(codec.name); | 
| 1364     return new MediaCodecVideoEncoder(AttachCurrentThreadIfNeeded(), type, | 1364     return new MediaCodecVideoEncoder(AttachCurrentThreadIfNeeded(), type, | 
| 1365                                       egl_context_); | 1365                                       egl_context_); | 
| 1366   } | 1366   } | 
| 1367   ALOGW << "Can not find HW video encoder for type " << codec.name; | 1367   ALOGW << "Can not find HW video encoder for type " << codec.name; | 
| 1368   return nullptr; | 1368   return nullptr; | 
| 1369 } | 1369 } | 
| 1370 | 1370 | 
| 1371 const std::vector<cricket::VideoCodec>& | 1371 const std::vector<cricket::VideoCodec>& | 
| 1372 MediaCodecVideoEncoderFactory::supported_codecs() const { | 1372 MediaCodecVideoEncoderFactory::supported_codecs() const { | 
| 1373   return supported_codecs_; | 1373   return supported_codecs_; | 
| 1374 } | 1374 } | 
| 1375 | 1375 | 
| 1376 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder( | 1376 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder( | 
| 1377     webrtc::VideoEncoder* encoder) { | 1377     webrtc::VideoEncoder* encoder) { | 
| 1378   ALOGD << "Destroy video encoder."; | 1378   ALOGD << "Destroy video encoder."; | 
| 1379   delete encoder; | 1379   delete encoder; | 
| 1380 } | 1380 } | 
| 1381 | 1381 | 
| 1382 }  // namespace webrtc_jni | 1382 }  // namespace webrtc_jni | 
| OLD | NEW | 
|---|