| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 int32_t Release() override; | 89 int32_t Release() override; |
| 90 | 90 |
| 91 int32_t Reset() override; | 91 int32_t Reset() override; |
| 92 | 92 |
| 93 bool PrefersLateDecoding() const override { return true; } | 93 bool PrefersLateDecoding() const override { return true; } |
| 94 | 94 |
| 95 // rtc::MessageHandler implementation. | 95 // rtc::MessageHandler implementation. |
| 96 void OnMessage(rtc::Message* msg) override; | 96 void OnMessage(rtc::Message* msg) override; |
| 97 | 97 |
| 98 const char* ImplementationName() const override; |
| 99 |
| 98 private: | 100 private: |
| 99 // CHECK-fail if not running on |codec_thread_|. | 101 // CHECK-fail if not running on |codec_thread_|. |
| 100 void CheckOnCodecThread(); | 102 void CheckOnCodecThread(); |
| 101 | 103 |
| 102 int32_t InitDecodeOnCodecThread(); | 104 int32_t InitDecodeOnCodecThread(); |
| 103 int32_t ReleaseOnCodecThread(); | 105 int32_t ReleaseOnCodecThread(); |
| 104 int32_t DecodeOnCodecThread(const EncodedImage& inputImage); | 106 int32_t DecodeOnCodecThread(const EncodedImage& inputImage); |
| 105 // Deliver any outputs pending in the MediaCodec to our |callback_| and return | 107 // Deliver any outputs pending in the MediaCodec to our |callback_| and return |
| 106 // true on success. | 108 // true on success. |
| 107 bool DeliverPendingOutputs(JNIEnv* jni, int dequeue_timeout_us); | 109 bool DeliverPendingOutputs(JNIEnv* jni, int dequeue_timeout_us); |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 899 ALOGW << "Can not find HW video decoder for type " << (int)type; | 901 ALOGW << "Can not find HW video decoder for type " << (int)type; |
| 900 return NULL; | 902 return NULL; |
| 901 } | 903 } |
| 902 | 904 |
| 903 void MediaCodecVideoDecoderFactory::DestroyVideoDecoder( | 905 void MediaCodecVideoDecoderFactory::DestroyVideoDecoder( |
| 904 webrtc::VideoDecoder* decoder) { | 906 webrtc::VideoDecoder* decoder) { |
| 905 ALOGD << "Destroy video decoder."; | 907 ALOGD << "Destroy video decoder."; |
| 906 delete decoder; | 908 delete decoder; |
| 907 } | 909 } |
| 908 | 910 |
| 911 const char* MediaCodecVideoDecoder::ImplementationName() const { |
| 912 return "MediaCodec"; |
| 913 } |
| 914 |
| 909 } // namespace webrtc_jni | 915 } // namespace webrtc_jni |
| 910 | 916 |
| OLD | NEW |