OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 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 18 matching lines...) Expand all Loading... |
29 class RtcEventLogImpl; | 29 class RtcEventLogImpl; |
30 | 30 |
31 enum class MediaType; | 31 enum class MediaType; |
32 | 32 |
33 class RtcEventLog { | 33 class RtcEventLog { |
34 public: | 34 public: |
35 virtual ~RtcEventLog() {} | 35 virtual ~RtcEventLog() {} |
36 | 36 |
37 static rtc::scoped_ptr<RtcEventLog> Create(); | 37 static rtc::scoped_ptr<RtcEventLog> Create(); |
38 | 38 |
| 39 // Sets the time that events are stored in the internal event buffer |
| 40 // before the user calls StartLogging. The default is 10 000 000 us = 10 s |
| 41 virtual void SetBufferDuration(int64_t buffer_duration_us) = 0; |
| 42 |
39 // Starts logging for the specified duration to the specified file. | 43 // Starts logging for the specified duration to the specified file. |
40 // The logging will stop automatically after the specified duration. | 44 // The logging will stop automatically after the specified duration. |
41 // If the file already exists it will be overwritten. | 45 // If the file already exists it will be overwritten. |
42 // If the file cannot be opened, the RtcEventLog will not start logging. | 46 // If the file cannot be opened, the RtcEventLog will not start logging. |
43 virtual void StartLogging(const std::string& file_name, int duration_ms) = 0; | 47 virtual void StartLogging(const std::string& file_name, int duration_ms) = 0; |
44 | 48 |
45 // Starts logging until either the 10 minute timer runs out or the StopLogging | 49 // Starts logging until either the 10 minute timer runs out or the StopLogging |
46 // function is called. The RtcEventLog takes ownership of the supplied | 50 // function is called. The RtcEventLog takes ownership of the supplied |
47 // rtc::PlatformFile. | 51 // rtc::PlatformFile. |
48 virtual bool StartLogging(rtc::PlatformFile log_file) = 0; | 52 virtual bool StartLogging(rtc::PlatformFile log_file) = 0; |
(...skipping 26 matching lines...) Expand all Loading... |
75 | 79 |
76 // Reads an RtcEventLog file and returns true when reading was successful. | 80 // Reads an RtcEventLog file and returns true when reading was successful. |
77 // The result is stored in the given EventStream object. | 81 // The result is stored in the given EventStream object. |
78 static bool ParseRtcEventLog(const std::string& file_name, | 82 static bool ParseRtcEventLog(const std::string& file_name, |
79 rtclog::EventStream* result); | 83 rtclog::EventStream* result); |
80 }; | 84 }; |
81 | 85 |
82 } // namespace webrtc | 86 } // namespace webrtc |
83 | 87 |
84 #endif // WEBRTC_CALL_RTC_EVENT_LOG_H_ | 88 #endif // WEBRTC_CALL_RTC_EVENT_LOG_H_ |
OLD | NEW |