| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef WEBRTC_SDK_ANDROID_SRC_JNI_ANDROIDMEDIACODECCOMMON_H_ | 11 #ifndef WEBRTC_SDK_ANDROID_SRC_JNI_ANDROIDMEDIACODECCOMMON_H_ |
| 12 #define WEBRTC_SDK_ANDROID_SRC_JNI_ANDROIDMEDIACODECCOMMON_H_ | 12 #define WEBRTC_SDK_ANDROID_SRC_JNI_ANDROIDMEDIACODECCOMMON_H_ |
| 13 | 13 |
| 14 #include <android/log.h> | 14 #include <android/log.h> |
| 15 #include <string> | 15 #include <string> |
| 16 | 16 |
| 17 #include "webrtc/rtc_base/logging.h" | 17 #include "webrtc/rtc_base/logging.h" |
| 18 #include "webrtc/rtc_base/thread.h" | 18 #include "webrtc/rtc_base/thread.h" |
| 19 #include "webrtc/sdk/android/src/jni/classreferenceholder.h" | 19 #include "webrtc/sdk/android/src/jni/classreferenceholder.h" |
| 20 #include "webrtc/sdk/android/src/jni/jni_helpers.h" | 20 #include "webrtc/sdk/android/src/jni/jni_helpers.h" |
| 21 | 21 |
| 22 namespace webrtc_jni { | 22 namespace webrtc { |
| 23 namespace jni { |
| 23 | 24 |
| 24 // Uncomment this define to enable verbose logging for every encoded/decoded | 25 // Uncomment this define to enable verbose logging for every encoded/decoded |
| 25 // video frame. | 26 // video frame. |
| 26 //#define TRACK_BUFFER_TIMING | 27 //#define TRACK_BUFFER_TIMING |
| 27 | 28 |
| 28 #define TAG_COMMON "MediaCodecVideo" | 29 #define TAG_COMMON "MediaCodecVideo" |
| 29 | 30 |
| 30 // Color formats supported by encoder or decoder - should include all | 31 // Color formats supported by encoder or decoder - should include all |
| 31 // colors from supportedColorList in MediaCodecVideoEncoder.java and | 32 // colors from supportedColorList in MediaCodecVideoEncoder.java and |
| 32 // MediaCodecVideoDecoder.java. Supported color format set in encoder | 33 // MediaCodecVideoDecoder.java. Supported color format set in encoder |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 static inline bool CheckException(JNIEnv* jni) { | 76 static inline bool CheckException(JNIEnv* jni) { |
| 76 if (jni->ExceptionCheck()) { | 77 if (jni->ExceptionCheck()) { |
| 77 LOG_TAG(rtc::LS_ERROR, TAG_COMMON) << "Java JNI exception."; | 78 LOG_TAG(rtc::LS_ERROR, TAG_COMMON) << "Java JNI exception."; |
| 78 jni->ExceptionDescribe(); | 79 jni->ExceptionDescribe(); |
| 79 jni->ExceptionClear(); | 80 jni->ExceptionClear(); |
| 80 return true; | 81 return true; |
| 81 } | 82 } |
| 82 return false; | 83 return false; |
| 83 } | 84 } |
| 84 | 85 |
| 85 } // namespace webrtc_jni | 86 } // namespace jni |
| 87 } // namespace webrtc |
| 86 | 88 |
| 87 #endif // WEBRTC_SDK_ANDROID_SRC_JNI_ANDROIDMEDIACODECCOMMON_H_ | 89 #endif // WEBRTC_SDK_ANDROID_SRC_JNI_ANDROIDMEDIACODECCOMMON_H_ |
| OLD | NEW |