| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 int32_t ret = InitDecode(&codec_, 1); | 467 int32_t ret = InitDecode(&codec_, 1); |
| 468 if (ret < 0) { | 468 if (ret < 0) { |
| 469 ALOGE << "InitDecode failure: " << ret << " - fallback to SW codec"; | 469 ALOGE << "InitDecode failure: " << ret << " - fallback to SW codec"; |
| 470 sw_fallback_required_ = true; | 470 sw_fallback_required_ = true; |
| 471 return WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE; | 471 return WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE; |
| 472 } | 472 } |
| 473 } | 473 } |
| 474 | 474 |
| 475 // Always start with a complete key frame. | 475 // Always start with a complete key frame. |
| 476 if (key_frame_required_) { | 476 if (key_frame_required_) { |
| 477 if (inputImage._frameType != webrtc::kKeyFrame) { | 477 if (inputImage._frameType != webrtc::kVideoFrameKey) { |
| 478 ALOGE << "Decode() - key frame is required"; | 478 ALOGE << "Decode() - key frame is required"; |
| 479 return WEBRTC_VIDEO_CODEC_ERROR; | 479 return WEBRTC_VIDEO_CODEC_ERROR; |
| 480 } | 480 } |
| 481 if (!inputImage._completeFrame) { | 481 if (!inputImage._completeFrame) { |
| 482 ALOGE << "Decode() - complete frame is required"; | 482 ALOGE << "Decode() - complete frame is required"; |
| 483 return WEBRTC_VIDEO_CODEC_ERROR; | 483 return WEBRTC_VIDEO_CODEC_ERROR; |
| 484 } | 484 } |
| 485 key_frame_required_ = false; | 485 key_frame_required_ = false; |
| 486 } | 486 } |
| 487 if (inputImage._length == 0) { | 487 if (inputImage._length == 0) { |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 } | 847 } |
| 848 | 848 |
| 849 void MediaCodecVideoDecoderFactory::DestroyVideoDecoder( | 849 void MediaCodecVideoDecoderFactory::DestroyVideoDecoder( |
| 850 webrtc::VideoDecoder* decoder) { | 850 webrtc::VideoDecoder* decoder) { |
| 851 ALOGD << "Destroy video decoder."; | 851 ALOGD << "Destroy video decoder."; |
| 852 delete decoder; | 852 delete decoder; |
| 853 } | 853 } |
| 854 | 854 |
| 855 } // namespace webrtc_jni | 855 } // namespace webrtc_jni |
| 856 | 856 |
| OLD | NEW |