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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 int32_t RegisterDecodeCompleteCallback(DecodedImageCallback* callback) | 86 int32_t RegisterDecodeCompleteCallback(DecodedImageCallback* callback) |
87 override; | 87 override; |
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 // rtc::MessageHandler implementation. | 92 // rtc::MessageHandler implementation. |
93 void OnMessage(rtc::Message* msg) override; | 93 void OnMessage(rtc::Message* msg) override; |
94 | 94 |
| 95 const char* ImplementationName() const override; |
| 96 |
95 private: | 97 private: |
96 // CHECK-fail if not running on |codec_thread_|. | 98 // CHECK-fail if not running on |codec_thread_|. |
97 void CheckOnCodecThread(); | 99 void CheckOnCodecThread(); |
98 | 100 |
99 int32_t InitDecodeOnCodecThread(); | 101 int32_t InitDecodeOnCodecThread(); |
100 int32_t ReleaseOnCodecThread(); | 102 int32_t ReleaseOnCodecThread(); |
101 int32_t DecodeOnCodecThread(const EncodedImage& inputImage); | 103 int32_t DecodeOnCodecThread(const EncodedImage& inputImage); |
102 // Deliver any outputs pending in the MediaCodec to our |callback_| and return | 104 // Deliver any outputs pending in the MediaCodec to our |callback_| and return |
103 // true on success. | 105 // true on success. |
104 bool DeliverPendingOutputs(JNIEnv* jni, int dequeue_timeout_us); | 106 bool DeliverPendingOutputs(JNIEnv* jni, int dequeue_timeout_us); |
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
887 ALOGW << "Can not find HW video decoder for type " << (int)type; | 889 ALOGW << "Can not find HW video decoder for type " << (int)type; |
888 return NULL; | 890 return NULL; |
889 } | 891 } |
890 | 892 |
891 void MediaCodecVideoDecoderFactory::DestroyVideoDecoder( | 893 void MediaCodecVideoDecoderFactory::DestroyVideoDecoder( |
892 webrtc::VideoDecoder* decoder) { | 894 webrtc::VideoDecoder* decoder) { |
893 ALOGD << "Destroy video decoder."; | 895 ALOGD << "Destroy video decoder."; |
894 delete decoder; | 896 delete decoder; |
895 } | 897 } |
896 | 898 |
| 899 const char* MediaCodecVideoDecoder::ImplementationName() const { |
| 900 return "MediaCodec"; |
| 901 } |
| 902 |
897 } // namespace webrtc_jni | 903 } // namespace webrtc_jni |
898 | 904 |
OLD | NEW |