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 22 matching lines...) Expand all Loading... |
33 | 33 |
34 enum class MediaType; | 34 enum class MediaType; |
35 | 35 |
36 enum PacketDirection { kIncomingPacket = 0, kOutgoingPacket }; | 36 enum PacketDirection { kIncomingPacket = 0, kOutgoingPacket }; |
37 | 37 |
38 class RtcEventLog { | 38 class RtcEventLog { |
39 public: | 39 public: |
40 virtual ~RtcEventLog() {} | 40 virtual ~RtcEventLog() {} |
41 | 41 |
42 // Factory method to create an RtcEventLog object. | 42 // Factory method to create an RtcEventLog object. |
43 static std::unique_ptr<RtcEventLog> Create(const Clock* clock); | 43 static std::unique_ptr<RtcEventLog> Create(); |
| 44 // TODO(nisse): webrtc::Clock is deprecated. Delete this method and |
| 45 // above forward declaration of Clock when |
| 46 // webrtc/system_wrappers/include/clock.h is deleted. |
| 47 static std::unique_ptr<RtcEventLog> Create(const Clock* clock) { |
| 48 return Create(); |
| 49 } |
44 | 50 |
45 // Create an RtcEventLog object that does nothing. | 51 // Create an RtcEventLog object that does nothing. |
46 static std::unique_ptr<RtcEventLog> CreateNull(); | 52 static std::unique_ptr<RtcEventLog> CreateNull(); |
47 | 53 |
48 // Starts logging a maximum of max_size_bytes bytes to the specified file. | 54 // Starts logging a maximum of max_size_bytes bytes to the specified file. |
49 // If the file already exists it will be overwritten. | 55 // If the file already exists it will be overwritten. |
50 // If max_size_bytes <= 0, logging will be active until StopLogging is called. | 56 // If max_size_bytes <= 0, logging will be active until StopLogging is called. |
51 // The function has no effect and returns false if we can't start a new log | 57 // The function has no effect and returns false if we can't start a new log |
52 // e.g. because we are already logging or the file cannot be opened. | 58 // e.g. because we are already logging or the file cannot be opened. |
53 virtual bool StartLogging(const std::string& file_name, | 59 virtual bool StartLogging(const std::string& file_name, |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 size_t length) override {} | 153 size_t length) override {} |
148 void LogAudioPlayout(uint32_t ssrc) override {} | 154 void LogAudioPlayout(uint32_t ssrc) override {} |
149 void LogBwePacketLossEvent(int32_t bitrate, | 155 void LogBwePacketLossEvent(int32_t bitrate, |
150 uint8_t fraction_loss, | 156 uint8_t fraction_loss, |
151 int32_t total_packets) override {} | 157 int32_t total_packets) override {} |
152 }; | 158 }; |
153 | 159 |
154 } // namespace webrtc | 160 } // namespace webrtc |
155 | 161 |
156 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_ | 162 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_ |
OLD | NEW |