Chromium Code Reviews| Index: webrtc/modules/audio_device/audio_device_buffer.h |
| diff --git a/webrtc/modules/audio_device/audio_device_buffer.h b/webrtc/modules/audio_device/audio_device_buffer.h |
| index ee6b2297c77e8e3a981615e52d3c0ccf0db7c767..ba1b43c4c10b9e0a08ef02a55f3b6e7c34675162 100644 |
| --- a/webrtc/modules/audio_device/audio_device_buffer.h |
| +++ b/webrtc/modules/audio_device/audio_device_buffer.h |
| @@ -11,6 +11,8 @@ |
| #ifndef WEBRTC_MODULES_AUDIO_DEVICE_AUDIO_DEVICE_BUFFER_H_ |
| #define WEBRTC_MODULES_AUDIO_DEVICE_AUDIO_DEVICE_BUFFER_H_ |
| +#include <map> |
| + |
| #include "webrtc/base/criticalsection.h" |
| #include "webrtc/base/task_queue.h" |
| #include "webrtc/base/thread_checker.h" |
| @@ -167,6 +169,15 @@ class AudioDeviceBuffer { |
| // Time stamp of last stat report. |
| uint64_t last_log_stat_time_; |
| + |
| + uint64_t last_playout_time_; |
| + |
| + // A map where the key value corresponds to time differences (in milliseconds) |
| + // between two successive playout callbacks, and the mapped element represents |
| + // the number of times a given time difference was found. |
| + // Writing to the map is done without a lock since it is only read once at |
| + // destruction when no audio is running. |
| + std::map<int, int> playout_diff_time_map_; |
|
magjed_webrtc
2016/07/29 10:07:11
You can consider using std::unordered_map instead
henrika_webrtc
2016/07/29 11:11:00
I think it only affects reading and not writing. A
magjed_webrtc
2016/07/29 12:16:07
It affects both reading and writing, a map will us
henrika_webrtc
2016/07/29 12:50:24
Acknowledged.
|
| }; |
| } // namespace webrtc |