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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // The result is stored in the given EventStream object. | 102 // The result is stored in the given EventStream object. |
103 // The order of the events in the EventStream is implementation defined. | 103 // The order of the events in the EventStream is implementation defined. |
104 // The current implementation writes a LOG_START event, then the old | 104 // The current implementation writes a LOG_START event, then the old |
105 // configurations, then the remaining events in timestamp order and finally | 105 // configurations, then the remaining events in timestamp order and finally |
106 // a LOG_END event. However, this might change without further notice. | 106 // a LOG_END event. However, this might change without further notice. |
107 // TODO(terelius): Change result type to a vector? | 107 // TODO(terelius): Change result type to a vector? |
108 static bool ParseRtcEventLog(const std::string& file_name, | 108 static bool ParseRtcEventLog(const std::string& file_name, |
109 rtclog::EventStream* result); | 109 rtclog::EventStream* result); |
110 }; | 110 }; |
111 | 111 |
| 112 // No-op implementation is used if flag is not set, or in tests. |
| 113 class RtcEventLogNullImpl final : public RtcEventLog { |
| 114 public: |
| 115 bool StartLogging(const std::string& file_name, |
| 116 int64_t max_size_bytes) override { |
| 117 return false; |
| 118 } |
| 119 bool StartLogging(rtc::PlatformFile platform_file, |
| 120 int64_t max_size_bytes) override; |
| 121 void StopLogging() override {} |
| 122 void LogVideoReceiveStreamConfig( |
| 123 const VideoReceiveStream::Config& config) override {} |
| 124 void LogVideoSendStreamConfig( |
| 125 const VideoSendStream::Config& config) override {} |
| 126 void LogRtpHeader(PacketDirection direction, |
| 127 MediaType media_type, |
| 128 const uint8_t* header, |
| 129 size_t packet_length) override {} |
| 130 void LogRtcpPacket(PacketDirection direction, |
| 131 MediaType media_type, |
| 132 const uint8_t* packet, |
| 133 size_t length) override {} |
| 134 void LogAudioPlayout(uint32_t ssrc) override {} |
| 135 void LogBwePacketLossEvent(int32_t bitrate, |
| 136 uint8_t fraction_loss, |
| 137 int32_t total_packets) override {} |
| 138 }; |
| 139 |
112 } // namespace webrtc | 140 } // namespace webrtc |
113 | 141 |
114 #endif // WEBRTC_CALL_RTC_EVENT_LOG_H_ | 142 #endif // WEBRTC_CALL_RTC_EVENT_LOG_H_ |
OLD | NEW |