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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 int32_t RegisterDecodeCompleteCallback(DecodedImageCallback* callback) | 85 int32_t RegisterDecodeCompleteCallback(DecodedImageCallback* callback) |
86 override; | 86 override; |
87 | 87 |
88 int32_t Release() override; | 88 int32_t Release() override; |
89 | 89 |
90 int32_t Reset() override; | 90 int32_t Reset() override; |
91 // rtc::MessageHandler implementation. | 91 // rtc::MessageHandler implementation. |
92 void OnMessage(rtc::Message* msg) override; | 92 void OnMessage(rtc::Message* msg) override; |
93 | 93 |
| 94 const char* ImplementationName() const override; |
| 95 |
94 private: | 96 private: |
95 // CHECK-fail if not running on |codec_thread_|. | 97 // CHECK-fail if not running on |codec_thread_|. |
96 void CheckOnCodecThread(); | 98 void CheckOnCodecThread(); |
97 | 99 |
98 int32_t InitDecodeOnCodecThread(); | 100 int32_t InitDecodeOnCodecThread(); |
99 int32_t ReleaseOnCodecThread(); | 101 int32_t ReleaseOnCodecThread(); |
100 int32_t DecodeOnCodecThread(const EncodedImage& inputImage); | 102 int32_t DecodeOnCodecThread(const EncodedImage& inputImage); |
101 // Deliver any outputs pending in the MediaCodec to our |callback_| and return | 103 // Deliver any outputs pending in the MediaCodec to our |callback_| and return |
102 // true on success. | 104 // true on success. |
103 bool DeliverPendingOutputs(JNIEnv* jni, int dequeue_timeout_us); | 105 bool DeliverPendingOutputs(JNIEnv* jni, int dequeue_timeout_us); |
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 ALOGE << "Can not find HW video decoder for type " << (int)type; | 832 ALOGE << "Can not find HW video decoder for type " << (int)type; |
831 return NULL; | 833 return NULL; |
832 } | 834 } |
833 | 835 |
834 void MediaCodecVideoDecoderFactory::DestroyVideoDecoder( | 836 void MediaCodecVideoDecoderFactory::DestroyVideoDecoder( |
835 webrtc::VideoDecoder* decoder) { | 837 webrtc::VideoDecoder* decoder) { |
836 ALOGD << "Destroy video decoder."; | 838 ALOGD << "Destroy video decoder."; |
837 delete decoder; | 839 delete decoder; |
838 } | 840 } |
839 | 841 |
| 842 const char* MediaCodecVideoDecoder::ImplementationName() const { |
| 843 return "MediaCodec"; |
| 844 } |
| 845 |
840 } // namespace webrtc_jni | 846 } // namespace webrtc_jni |
841 | 847 |
OLD | NEW |