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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 int32_t RegisterDecodeCompleteCallback(DecodedImageCallback* callback) | 84 int32_t RegisterDecodeCompleteCallback(DecodedImageCallback* callback) |
85 override; | 85 override; |
86 | 86 |
87 int32_t Release() override; | 87 int32_t Release() override; |
88 | 88 |
89 int32_t Reset() override; | 89 int32_t Reset() override; |
90 // rtc::MessageHandler implementation. | 90 // rtc::MessageHandler implementation. |
91 void OnMessage(rtc::Message* msg) override; | 91 void OnMessage(rtc::Message* msg) override; |
92 | 92 |
| 93 const char* ImplementationName() const override; |
| 94 |
93 private: | 95 private: |
94 // CHECK-fail if not running on |codec_thread_|. | 96 // CHECK-fail if not running on |codec_thread_|. |
95 void CheckOnCodecThread(); | 97 void CheckOnCodecThread(); |
96 | 98 |
97 int32_t InitDecodeOnCodecThread(); | 99 int32_t InitDecodeOnCodecThread(); |
98 int32_t ReleaseOnCodecThread(); | 100 int32_t ReleaseOnCodecThread(); |
99 int32_t DecodeOnCodecThread(const EncodedImage& inputImage); | 101 int32_t DecodeOnCodecThread(const EncodedImage& inputImage); |
100 // Deliver any outputs pending in the MediaCodec to our |callback_| and return | 102 // Deliver any outputs pending in the MediaCodec to our |callback_| and return |
101 // true on success. | 103 // true on success. |
102 bool DeliverPendingOutputs(JNIEnv* jni, int dequeue_timeout_us); | 104 bool DeliverPendingOutputs(JNIEnv* jni, int dequeue_timeout_us); |
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
844 ALOGE << "Can not find HW video decoder for type " << (int)type; | 846 ALOGE << "Can not find HW video decoder for type " << (int)type; |
845 return NULL; | 847 return NULL; |
846 } | 848 } |
847 | 849 |
848 void MediaCodecVideoDecoderFactory::DestroyVideoDecoder( | 850 void MediaCodecVideoDecoderFactory::DestroyVideoDecoder( |
849 webrtc::VideoDecoder* decoder) { | 851 webrtc::VideoDecoder* decoder) { |
850 ALOGD << "Destroy video decoder."; | 852 ALOGD << "Destroy video decoder."; |
851 delete decoder; | 853 delete decoder; |
852 } | 854 } |
853 | 855 |
| 856 const char* MediaCodecVideoDecoder::ImplementationName() const { |
| 857 return "MediaCodec"; |
| 858 } |
| 859 |
854 } // namespace webrtc_jni | 860 } // namespace webrtc_jni |
855 | 861 |
OLD | NEW |