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 mirror |
32 // from MediaCodecVideoEncoder.java | 32 // supportedColorList from MediaCodecVideoEncoder.java and |
33 // MediaCodecVideoDecoder.java | |
33 enum COLOR_FORMATTYPE { | 34 enum COLOR_FORMATTYPE { |
34 COLOR_FormatYUV420Planar = 0x13, | 35 COLOR_FormatYUV420Planar = 0x13, |
35 COLOR_FormatYUV420SemiPlanar = 0x15, | 36 COLOR_FormatYUV420SemiPlanar = 0x15, |
36 COLOR_QCOM_FormatYUV420SemiPlanar = 0x7FA30C00, | 37 COLOR_QCOM_FormatYUV420SemiPlanar = 0x7FA30C00, |
37 // NV12 color format supported by QCOM codec, but not declared in MediaCodec - | 38 // NV12 color format supported by QCOM codec, but not declared in MediaCodec - |
38 // see /hardware/qcom/media/mm-core/inc/OMX_QCOMExtns.h | 39 // see /hardware/qcom/media/mm-core/inc/OMX_QCOMExtns.h |
39 // This format is presumably similar to COLOR_FormatYUV420SemiPlanar, | 40 // This format is presumably similar to COLOR_FormatYUV420SemiPlanar, |
40 // but requires some (16, 32?) byte alignment. | 41 // but requires some (16, 32?) byte alignment. |
42 COLOR_QCOM_FORMATYVU420PackedSemiPlanar32m4ka = 0x7FA30C01, | |
magjed_webrtc
2016/09/17 08:52:30
Don't you need to add these formats to the switch
AlexG
2016/09/19 20:28:45
I don't think so. For decoder we request some spec
magjed_webrtc
2016/09/20 09:12:41
Right. Is the plan to update the encoder in a foll
AlexG
2016/09/20 22:29:16
No, I don't plan to update the encoder. Supported
magjed_webrtc
2016/09/22 09:13:10
Ok, sgtm.
| |
43 COLOR_QCOM_FORMATYVU420PackedSemiPlanar16m4ka = 0x7FA30C02, | |
44 COLOR_QCOM_FORMATYVU420PackedSemiPlanar64x32Tile2m8ka = 0x7FA30C03, | |
41 COLOR_QCOM_FORMATYUV420PackedSemiPlanar32m = 0x7FA30C04 | 45 COLOR_QCOM_FORMATYUV420PackedSemiPlanar32m = 0x7FA30C04 |
42 }; | 46 }; |
43 | 47 |
44 // Arbitrary interval to poll the codec for new outputs. | 48 // Arbitrary interval to poll the codec for new outputs. |
45 enum { kMediaCodecPollMs = 10 }; | 49 enum { kMediaCodecPollMs = 10 }; |
46 // Arbitrary interval to poll at when there should be no more frames. | 50 // Arbitrary interval to poll at when there should be no more frames. |
47 enum { kMediaCodecPollNoFramesMs = 100 }; | 51 enum { kMediaCodecPollNoFramesMs = 100 }; |
48 // Media codec maximum output buffer ready timeout. | 52 // Media codec maximum output buffer ready timeout. |
49 enum { kMediaCodecTimeoutMs = 1000 }; | 53 enum { kMediaCodecTimeoutMs = 1000 }; |
50 // Interval to print codec statistics (bitrate, fps, encoding/decoding time). | 54 // 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(); | 87 jni->ExceptionDescribe(); |
84 jni->ExceptionClear(); | 88 jni->ExceptionClear(); |
85 return true; | 89 return true; |
86 } | 90 } |
87 return false; | 91 return false; |
88 } | 92 } |
89 | 93 |
90 } // namespace webrtc_jni | 94 } // namespace webrtc_jni |
91 | 95 |
92 #endif // WEBRTC_API_JAVA_JNI_ANDROIDMEDIACODECCOMMON_H_ | 96 #endif // WEBRTC_API_JAVA_JNI_ANDROIDMEDIACODECCOMMON_H_ |
OLD | NEW |