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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 enum { kMediaCodecPollMs = 10 }; | 63 enum { kMediaCodecPollMs = 10 }; |
64 // Media codec maximum output buffer ready timeout. | 64 // Media codec maximum output buffer ready timeout. |
65 enum { kMediaCodecTimeoutMs = 1000 }; | 65 enum { kMediaCodecTimeoutMs = 1000 }; |
66 // Interval to print codec statistics (bitrate, fps, encoding/decoding time). | 66 // Interval to print codec statistics (bitrate, fps, encoding/decoding time). |
67 enum { kMediaCodecStatisticsIntervalMs = 3000 }; | 67 enum { kMediaCodecStatisticsIntervalMs = 3000 }; |
68 // Maximum amount of pending frames for VP8 decoder. | 68 // Maximum amount of pending frames for VP8 decoder. |
69 enum { kMaxPendingFramesVp8 = 1 }; | 69 enum { kMaxPendingFramesVp8 = 1 }; |
70 // Maximum amount of pending frames for VP9 decoder. | 70 // Maximum amount of pending frames for VP9 decoder. |
71 enum { kMaxPendingFramesVp9 = 1 }; | 71 enum { kMaxPendingFramesVp9 = 1 }; |
72 // Maximum amount of pending frames for H.264 decoder. | 72 // Maximum amount of pending frames for H.264 decoder. |
73 enum { kMaxPendingFramesH264 = 30 }; | 73 enum { kMaxPendingFramesH264 = 8 }; |
74 // Maximum amount of decoded frames for which per-frame logging is enabled. | 74 // Maximum amount of decoded frames for which per-frame logging is enabled. |
75 enum { kMaxDecodedLogFrames = 7 }; | 75 enum { kMaxDecodedLogFrames = 10 }; |
76 // Maximum amount of encoded frames for which per-frame logging is enabled. | 76 // Maximum amount of encoded frames for which per-frame logging is enabled. |
77 enum { kMaxEncodedLogFrames = 7 }; | 77 enum { kMaxEncodedLogFrames = 10 }; |
78 | 78 |
79 static inline int64_t GetCurrentTimeMs() { | 79 static inline int64_t GetCurrentTimeMs() { |
80 return webrtc::TickTime::Now().Ticks() / 1000000LL; | 80 return webrtc::TickTime::Now().Ticks() / 1000000LL; |
81 } | 81 } |
82 | 82 |
83 static inline void AllowBlockingCalls() { | 83 static inline void AllowBlockingCalls() { |
84 rtc::Thread* current_thread = rtc::Thread::Current(); | 84 rtc::Thread* current_thread = rtc::Thread::Current(); |
85 if (current_thread != NULL) | 85 if (current_thread != NULL) |
86 current_thread->SetAllowBlockingCalls(true); | 86 current_thread->SetAllowBlockingCalls(true); |
87 } | 87 } |
(...skipping 15 matching lines...) Expand all Loading... |
103 jni->ExceptionDescribe(); | 103 jni->ExceptionDescribe(); |
104 jni->ExceptionClear(); | 104 jni->ExceptionClear(); |
105 return true; | 105 return true; |
106 } | 106 } |
107 return false; | 107 return false; |
108 } | 108 } |
109 | 109 |
110 } // namespace webrtc_jni | 110 } // namespace webrtc_jni |
111 | 111 |
112 #endif // TALK_APP_WEBRTC_JAVA_JNI_ANDROIDMEDIACODECCOMMON_H_ | 112 #endif // TALK_APP_WEBRTC_JAVA_JNI_ANDROIDMEDIACODECCOMMON_H_ |
OLD | NEW |