| 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 rtc::MessageQueueManager::Clear(this); | 456 rtc::MessageQueueManager::Clear(this); |
| 457 if (CheckException(jni)) { | 457 if (CheckException(jni)) { |
| 458 ALOGE << "Decoder release exception"; | 458 ALOGE << "Decoder release exception"; |
| 459 return WEBRTC_VIDEO_CODEC_ERROR; | 459 return WEBRTC_VIDEO_CODEC_ERROR; |
| 460 } | 460 } |
| 461 ALOGD << "DecoderReleaseOnCodecThread done"; | 461 ALOGD << "DecoderReleaseOnCodecThread done"; |
| 462 return WEBRTC_VIDEO_CODEC_OK; | 462 return WEBRTC_VIDEO_CODEC_OK; |
| 463 } | 463 } |
| 464 | 464 |
| 465 void MediaCodecVideoDecoder::CheckOnCodecThread() { | 465 void MediaCodecVideoDecoder::CheckOnCodecThread() { |
| 466 RTC_CHECK(codec_thread_ == ThreadManager::Instance()->CurrentThread()) | 466 RTC_CHECK(codec_thread_.get() == ThreadManager::Instance()->CurrentThread()) |
| 467 << "Running on wrong thread!"; | 467 << "Running on wrong thread!"; |
| 468 } | 468 } |
| 469 | 469 |
| 470 void MediaCodecVideoDecoder::EnableFrameLogOnWarning() { | 470 void MediaCodecVideoDecoder::EnableFrameLogOnWarning() { |
| 471 // Log next 2 output frames. | 471 // Log next 2 output frames. |
| 472 frames_decoded_logged_ = std::max( | 472 frames_decoded_logged_ = std::max( |
| 473 frames_decoded_logged_, frames_decoded_ + kMaxWarningLogFrames); | 473 frames_decoded_logged_, frames_decoded_ + kMaxWarningLogFrames); |
| 474 } | 474 } |
| 475 | 475 |
| 476 int32_t MediaCodecVideoDecoder::ProcessHWErrorOnCodecThread() { | 476 int32_t MediaCodecVideoDecoder::ProcessHWErrorOnCodecThread() { |
| (...skipping 505 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 |