OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 // This file contains the helper classes for the DataLog APIs. See data_log.h | 11 // This file contains the helper classes for the DataLog APIs. See data_log.h |
12 // for the APIs. | 12 // for the APIs. |
13 // | 13 // |
14 // These classes are helper classes used for logging data for offline | 14 // These classes are helper classes used for logging data for offline |
15 // processing. Data logged with these classes can conveniently be parsed and | 15 // processing. Data logged with these classes can conveniently be parsed and |
16 // processed with e.g. Matlab. | 16 // processed with e.g. Matlab. |
17 #ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_DATA_LOG_IMPL_H_ | 17 #ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_DATA_LOG_IMPL_H_ |
18 #define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_DATA_LOG_IMPL_H_ | 18 #define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_DATA_LOG_IMPL_H_ |
19 | 19 |
20 #include <map> | 20 #include <map> |
21 #include <sstream> | 21 #include <sstream> |
22 #include <string> | 22 #include <string> |
23 #include <vector> | 23 #include <vector> |
24 | 24 |
| 25 #include "webrtc/base/platform_thread.h" |
25 #include "webrtc/base/scoped_ptr.h" | 26 #include "webrtc/base/scoped_ptr.h" |
26 #include "webrtc/system_wrappers/include/thread_wrapper.h" | |
27 #include "webrtc/typedefs.h" | 27 #include "webrtc/typedefs.h" |
28 | 28 |
29 namespace webrtc { | 29 namespace webrtc { |
30 | 30 |
31 class CriticalSectionWrapper; | 31 class CriticalSectionWrapper; |
32 class EventWrapper; | 32 class EventWrapper; |
33 class LogTable; | 33 class LogTable; |
34 class RWLockWrapper; | 34 class RWLockWrapper; |
35 | 35 |
36 // All container classes need to implement a ToString-function to be | 36 // All container classes need to implement a ToString-function to be |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 139 |
140 // Collection of tables indexed by the table name as std::string. | 140 // Collection of tables indexed by the table name as std::string. |
141 typedef std::map<std::string, LogTable*> TableMap; | 141 typedef std::map<std::string, LogTable*> TableMap; |
142 typedef rtc::scoped_ptr<CriticalSectionWrapper> CritSectScopedPtr; | 142 typedef rtc::scoped_ptr<CriticalSectionWrapper> CritSectScopedPtr; |
143 | 143 |
144 static CritSectScopedPtr crit_sect_; | 144 static CritSectScopedPtr crit_sect_; |
145 static DataLogImpl* instance_; | 145 static DataLogImpl* instance_; |
146 int counter_; | 146 int counter_; |
147 TableMap tables_; | 147 TableMap tables_; |
148 EventWrapper* flush_event_; | 148 EventWrapper* flush_event_; |
149 rtc::scoped_ptr<ThreadWrapper> file_writer_thread_; | 149 rtc::scoped_ptr<PlatformThread> file_writer_thread_; |
150 RWLockWrapper* tables_lock_; | 150 RWLockWrapper* tables_lock_; |
151 }; | 151 }; |
152 | 152 |
153 } // namespace webrtc | 153 } // namespace webrtc |
154 | 154 |
155 #endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_DATA_LOG_IMPL_H_ | 155 #endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_DATA_LOG_IMPL_H_ |
OLD | NEW |