| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 using webrtc::RTPFragmentationHeader; | 60 using webrtc::RTPFragmentationHeader; |
| 61 using webrtc::TickTime; | 61 using webrtc::TickTime; |
| 62 using webrtc::VideoCodec; | 62 using webrtc::VideoCodec; |
| 63 using webrtc::VideoCodecType; | 63 using webrtc::VideoCodecType; |
| 64 using webrtc::kVideoCodecH264; | 64 using webrtc::kVideoCodecH264; |
| 65 using webrtc::kVideoCodecVP8; | 65 using webrtc::kVideoCodecVP8; |
| 66 using webrtc::kVideoCodecVP9; | 66 using webrtc::kVideoCodecVP9; |
| 67 | 67 |
| 68 namespace webrtc_jni { | 68 namespace webrtc_jni { |
| 69 | 69 |
| 70 // Logging macros. |
| 71 #define TAG_DECODER "MediaCodecVideoDecoder" |
| 72 #ifdef TRACK_BUFFER_TIMING |
| 73 #define ALOGV(...) |
| 74 __android_log_print(ANDROID_LOG_VERBOSE, TAG_DECODER, __VA_ARGS__) |
| 75 #else |
| 76 #define ALOGV(...) |
| 77 #endif |
| 78 #define ALOGD LOG_TAG(rtc::LS_INFO, TAG_DECODER) |
| 79 #define ALOGW LOG_TAG(rtc::LS_WARNING, TAG_DECODER) |
| 80 #define ALOGE LOG_TAG(rtc::LS_ERROR, TAG_DECODER) |
| 81 |
| 70 class MediaCodecVideoDecoder : public webrtc::VideoDecoder, | 82 class MediaCodecVideoDecoder : public webrtc::VideoDecoder, |
| 71 public rtc::MessageHandler { | 83 public rtc::MessageHandler { |
| 72 public: | 84 public: |
| 73 explicit MediaCodecVideoDecoder( | 85 explicit MediaCodecVideoDecoder( |
| 74 JNIEnv* jni, VideoCodecType codecType, jobject render_egl_context); | 86 JNIEnv* jni, VideoCodecType codecType, jobject render_egl_context); |
| 75 virtual ~MediaCodecVideoDecoder(); | 87 virtual ~MediaCodecVideoDecoder(); |
| 76 | 88 |
| 77 int32_t InitDecode(const VideoCodec* codecSettings, int32_t numberOfCores) | 89 int32_t InitDecode(const VideoCodec* codecSettings, int32_t numberOfCores) |
| 78 override; | 90 override; |
| 79 | 91 |
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 ALOGD << "Destroy video decoder."; | 919 ALOGD << "Destroy video decoder."; |
| 908 delete decoder; | 920 delete decoder; |
| 909 } | 921 } |
| 910 | 922 |
| 911 const char* MediaCodecVideoDecoder::ImplementationName() const { | 923 const char* MediaCodecVideoDecoder::ImplementationName() const { |
| 912 return "MediaCodec"; | 924 return "MediaCodec"; |
| 913 } | 925 } |
| 914 | 926 |
| 915 } // namespace webrtc_jni | 927 } // namespace webrtc_jni |
| 916 | 928 |
| OLD | NEW |