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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 if (ret_val < 0) { | 338 if (ret_val < 0) { |
339 ALOGE << "Release failure: " << ret_val << " - fallback to SW codec"; | 339 ALOGE << "Release failure: " << ret_val << " - fallback to SW codec"; |
340 sw_fallback_required_ = true; | 340 sw_fallback_required_ = true; |
341 return WEBRTC_VIDEO_CODEC_ERROR; | 341 return WEBRTC_VIDEO_CODEC_ERROR; |
342 } | 342 } |
343 | 343 |
344 ResetVariables(); | 344 ResetVariables(); |
345 | 345 |
346 if (use_surface_) { | 346 if (use_surface_) { |
347 surface_texture_helper_ = new rtc::RefCountedObject<SurfaceTextureHelper>( | 347 surface_texture_helper_ = new rtc::RefCountedObject<SurfaceTextureHelper>( |
348 jni, render_egl_context_); | 348 jni, "Decoder SurfaceTextureHelper", render_egl_context_); |
349 } | 349 } |
350 | 350 |
351 jobject j_video_codec_enum = JavaEnumFromIndexAndClassName( | 351 jobject j_video_codec_enum = JavaEnumFromIndexAndClassName( |
352 jni, "MediaCodecVideoDecoder$VideoCodecType", codecType_); | 352 jni, "MediaCodecVideoDecoder$VideoCodecType", codecType_); |
353 bool success = jni->CallBooleanMethod( | 353 bool success = jni->CallBooleanMethod( |
354 *j_media_codec_video_decoder_, | 354 *j_media_codec_video_decoder_, |
355 j_init_decode_method_, | 355 j_init_decode_method_, |
356 j_video_codec_enum, | 356 j_video_codec_enum, |
357 codec_.width, | 357 codec_.width, |
358 codec_.height, | 358 codec_.height, |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 ALOGD << "Destroy video decoder."; | 982 ALOGD << "Destroy video decoder."; |
983 delete decoder; | 983 delete decoder; |
984 } | 984 } |
985 | 985 |
986 const char* MediaCodecVideoDecoder::ImplementationName() const { | 986 const char* MediaCodecVideoDecoder::ImplementationName() const { |
987 return "MediaCodec"; | 987 return "MediaCodec"; |
988 } | 988 } |
989 | 989 |
990 } // namespace webrtc_jni | 990 } // namespace webrtc_jni |
991 | 991 |
OLD | NEW |