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 20 matching lines...) Expand all Loading... | |
31 | 31 |
32 class RtcEventLog { | 32 class RtcEventLog { |
33 public: | 33 public: |
34 // The types of debug events that are currently supported for logging. | 34 // The types of debug events that are currently supported for logging. |
35 enum class DebugEvent { kLogStart, kLogEnd, kAudioPlayout }; | 35 enum class DebugEvent { kLogStart, kLogEnd, kAudioPlayout }; |
36 | 36 |
37 virtual ~RtcEventLog() {} | 37 virtual ~RtcEventLog() {} |
38 | 38 |
39 static rtc::scoped_ptr<RtcEventLog> Create(); | 39 static rtc::scoped_ptr<RtcEventLog> Create(); |
40 | 40 |
41 // Sets the time that events are stored in the internal event buffer | |
42 // before the user calls StartLogging. The default is 10'000'000 us = 10 s | |
43 virtual void SetBufferDuration(int64_t recent_log_duration_us) = 0; | |
ivoc
2015/08/25 08:03:21
How useful is it to be able to change the size of
terelius
2015/08/25 16:41:44
At the moment it is only used for testing purposes
ivoc
2015/08/26 08:15:28
Hmm, I don't really see why there no good way to c
terelius
2015/08/26 08:43:37
Using a function you can choose a new name, e.g. S
ivoc
2015/09/25 15:30:23
How about creating multiple variants of the Create
terelius
2015/10/15 13:28:21
Following the discussions we had last week with Ji
ivoc
2015/10/15 15:52:06
Okay, sounds good.
| |
44 | |
41 // Starts logging for the specified duration to the specified file. | 45 // Starts logging for the specified duration to the specified file. |
42 // The logging will stop automatically after the specified duration. | 46 // The logging will stop automatically after the specified duration. |
43 // If the file already exists it will be overwritten. | 47 // If the file already exists it will be overwritten. |
44 // If the file cannot be opened, the RtcEventLog will not start logging. | 48 // If the file cannot be opened, the RtcEventLog will not start logging. |
45 virtual void StartLogging(const std::string& file_name, int duration_ms) = 0; | 49 virtual void StartLogging(const std::string& file_name, int duration_ms) = 0; |
46 | 50 |
47 virtual void StopLogging() = 0; | 51 virtual void StopLogging() = 0; |
48 | 52 |
49 // Logs configuration information for webrtc::VideoReceiveStream | 53 // Logs configuration information for webrtc::VideoReceiveStream |
50 virtual void LogVideoReceiveStreamConfig( | 54 virtual void LogVideoReceiveStreamConfig( |
(...skipping 21 matching lines...) Expand all Loading... | |
72 | 76 |
73 // Reads an RtcEventLog file and returns true when reading was successful. | 77 // Reads an RtcEventLog file and returns true when reading was successful. |
74 // The result is stored in the given EventStream object. | 78 // The result is stored in the given EventStream object. |
75 static bool ParseRtcEventLog(const std::string& file_name, | 79 static bool ParseRtcEventLog(const std::string& file_name, |
76 rtclog::EventStream* result); | 80 rtclog::EventStream* result); |
77 }; | 81 }; |
78 | 82 |
79 } // namespace webrtc | 83 } // namespace webrtc |
80 | 84 |
81 #endif // WEBRTC_VIDEO_RTC_EVENT_LOG_H_ | 85 #endif // WEBRTC_VIDEO_RTC_EVENT_LOG_H_ |
OLD | NEW |