| 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 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "webrtc/base/thread.h" | 21 #include "webrtc/base/thread.h" |
| 22 | 22 |
| 23 namespace webrtc_jni { | 23 namespace webrtc_jni { |
| 24 | 24 |
| 25 // Uncomment this define to enable verbose logging for every encoded/decoded | 25 // Uncomment this define to enable verbose logging for every encoded/decoded |
| 26 // video frame. | 26 // video frame. |
| 27 //#define TRACK_BUFFER_TIMING | 27 //#define TRACK_BUFFER_TIMING |
| 28 | 28 |
| 29 #define TAG_COMMON "MediaCodecVideo" | 29 #define TAG_COMMON "MediaCodecVideo" |
| 30 | 30 |
| 31 // Color formats supported by encoder - should mirror supportedColorList | 31 // Color formats supported by encoder or decoder - should include all |
| 32 // from MediaCodecVideoEncoder.java | 32 // colors from supportedColorList in MediaCodecVideoEncoder.java and |
| 33 // MediaCodecVideoDecoder.java. Supported color format set in encoder |
| 34 // and decoder could be different. |
| 33 enum COLOR_FORMATTYPE { | 35 enum COLOR_FORMATTYPE { |
| 34 COLOR_FormatYUV420Planar = 0x13, | 36 COLOR_FormatYUV420Planar = 0x13, |
| 35 COLOR_FormatYUV420SemiPlanar = 0x15, | 37 COLOR_FormatYUV420SemiPlanar = 0x15, |
| 36 COLOR_QCOM_FormatYUV420SemiPlanar = 0x7FA30C00, | 38 COLOR_QCOM_FormatYUV420SemiPlanar = 0x7FA30C00, |
| 37 // NV12 color format supported by QCOM codec, but not declared in MediaCodec - | 39 // NV12 color format supported by QCOM codec, but not declared in MediaCodec - |
| 38 // see /hardware/qcom/media/mm-core/inc/OMX_QCOMExtns.h | 40 // see /hardware/qcom/media/mm-core/inc/OMX_QCOMExtns.h |
| 39 // This format is presumably similar to COLOR_FormatYUV420SemiPlanar, | 41 // This format is presumably similar to COLOR_FormatYUV420SemiPlanar, |
| 40 // but requires some (16, 32?) byte alignment. | 42 // but requires some (16, 32?) byte alignment. |
| 43 COLOR_QCOM_FORMATYVU420PackedSemiPlanar32m4ka = 0x7FA30C01, |
| 44 COLOR_QCOM_FORMATYVU420PackedSemiPlanar16m4ka = 0x7FA30C02, |
| 45 COLOR_QCOM_FORMATYVU420PackedSemiPlanar64x32Tile2m8ka = 0x7FA30C03, |
| 41 COLOR_QCOM_FORMATYUV420PackedSemiPlanar32m = 0x7FA30C04 | 46 COLOR_QCOM_FORMATYUV420PackedSemiPlanar32m = 0x7FA30C04 |
| 42 }; | 47 }; |
| 43 | 48 |
| 44 // Arbitrary interval to poll the codec for new outputs. | 49 // Arbitrary interval to poll the codec for new outputs. |
| 45 enum { kMediaCodecPollMs = 10 }; | 50 enum { kMediaCodecPollMs = 10 }; |
| 46 // Arbitrary interval to poll at when there should be no more frames. | 51 // Arbitrary interval to poll at when there should be no more frames. |
| 47 enum { kMediaCodecPollNoFramesMs = 100 }; | 52 enum { kMediaCodecPollNoFramesMs = 100 }; |
| 48 // Media codec maximum output buffer ready timeout. | 53 // Media codec maximum output buffer ready timeout. |
| 49 enum { kMediaCodecTimeoutMs = 1000 }; | 54 enum { kMediaCodecTimeoutMs = 1000 }; |
| 50 // Interval to print codec statistics (bitrate, fps, encoding/decoding time). | 55 // Interval to print codec statistics (bitrate, fps, encoding/decoding time). |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 jni->ExceptionDescribe(); | 88 jni->ExceptionDescribe(); |
| 84 jni->ExceptionClear(); | 89 jni->ExceptionClear(); |
| 85 return true; | 90 return true; |
| 86 } | 91 } |
| 87 return false; | 92 return false; |
| 88 } | 93 } |
| 89 | 94 |
| 90 } // namespace webrtc_jni | 95 } // namespace webrtc_jni |
| 91 | 96 |
| 92 #endif // WEBRTC_API_JAVA_JNI_ANDROIDMEDIACODECCOMMON_H_ | 97 #endif // WEBRTC_API_JAVA_JNI_ANDROIDMEDIACODECCOMMON_H_ |
| OLD | NEW |