| 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 |
| 11 #ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_ | 11 #ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_ |
| 12 #define WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_ | 12 #define WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_ |
| 13 | 13 |
| 14 #include <memory> | 14 #include <memory> |
| 15 #include <string> | 15 #include <string> |
| 16 #include <vector> | 16 #include <vector> |
| 17 | 17 |
| 18 #include "webrtc/base/platform_file.h" | 18 #include "webrtc/base/platform_file.h" |
| 19 #include "webrtc/call/audio_receive_stream.h" | 19 #include "webrtc/config.h" |
| 20 #include "webrtc/call/audio_send_stream.h" | |
| 21 #include "webrtc/video_receive_stream.h" | |
| 22 #include "webrtc/video_send_stream.h" | |
| 23 | 20 |
| 24 namespace webrtc { | 21 namespace webrtc { |
| 25 | 22 |
| 26 // Forward declaration of storage class that is automatically generated from | 23 // Forward declaration of storage class that is automatically generated from |
| 27 // the protobuf file. | 24 // the protobuf file. |
| 28 namespace rtclog { | 25 namespace rtclog { |
| 29 class EventStream; | 26 class EventStream; |
| 30 | 27 |
| 31 struct StreamConfig { | 28 struct StreamConfig { |
| 32 uint32_t local_ssrc = 0; | 29 uint32_t local_ssrc = 0; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // Logs configuration information for an audio receive stream. | 119 // Logs configuration information for an audio receive stream. |
| 123 virtual void LogAudioReceiveStreamConfig( | 120 virtual void LogAudioReceiveStreamConfig( |
| 124 const rtclog::StreamConfig& config) = 0; | 121 const rtclog::StreamConfig& config) = 0; |
| 125 | 122 |
| 126 // Logs configuration information for an audio send stream. | 123 // Logs configuration information for an audio send stream. |
| 127 virtual void LogAudioSendStreamConfig(const rtclog::StreamConfig& config) = 0; | 124 virtual void LogAudioSendStreamConfig(const rtclog::StreamConfig& config) = 0; |
| 128 | 125 |
| 129 // Logs the header of an incoming or outgoing RTP packet. packet_length | 126 // Logs the header of an incoming or outgoing RTP packet. packet_length |
| 130 // is the total length of the packet, including both header and payload. | 127 // is the total length of the packet, including both header and payload. |
| 131 virtual void LogRtpHeader(PacketDirection direction, | 128 virtual void LogRtpHeader(PacketDirection direction, |
| 132 MediaType media_type, | |
| 133 const uint8_t* header, | 129 const uint8_t* header, |
| 134 size_t packet_length) = 0; | 130 size_t packet_length) = 0; |
| 135 | 131 |
| 136 // Same as above but used on the sender side to log packets that are part of | 132 // Same as above but used on the sender side to log packets that are part of |
| 137 // a probe cluster. | 133 // a probe cluster. |
| 138 virtual void LogRtpHeader(PacketDirection direction, | 134 virtual void LogRtpHeader(PacketDirection direction, |
| 139 MediaType media_type, | |
| 140 const uint8_t* header, | 135 const uint8_t* header, |
| 141 size_t packet_length, | 136 size_t packet_length, |
| 142 int probe_cluster_id) = 0; | 137 int probe_cluster_id) = 0; |
| 143 | 138 |
| 144 // Logs an incoming or outgoing RTCP packet. | 139 // Logs an incoming or outgoing RTCP packet. |
| 145 virtual void LogRtcpPacket(PacketDirection direction, | 140 virtual void LogRtcpPacket(PacketDirection direction, |
| 146 MediaType media_type, | |
| 147 const uint8_t* packet, | 141 const uint8_t* packet, |
| 148 size_t length) = 0; | 142 size_t length) = 0; |
| 149 | 143 |
| 150 // Logs an audio playout event. | 144 // Logs an audio playout event. |
| 151 virtual void LogAudioPlayout(uint32_t ssrc) = 0; | 145 virtual void LogAudioPlayout(uint32_t ssrc) = 0; |
| 152 | 146 |
| 153 // Logs a bitrate update from the bandwidth estimator based on packet loss. | 147 // Logs a bitrate update from the bandwidth estimator based on packet loss. |
| 154 virtual void LogLossBasedBweUpdate(int32_t bitrate_bps, | 148 virtual void LogLossBasedBweUpdate(int32_t bitrate_bps, |
| 155 uint8_t fraction_loss, | 149 uint8_t fraction_loss, |
| 156 int32_t total_packets) = 0; | 150 int32_t total_packets) = 0; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 bool StartLogging(rtc::PlatformFile platform_file, | 191 bool StartLogging(rtc::PlatformFile platform_file, |
| 198 int64_t max_size_bytes) override; | 192 int64_t max_size_bytes) override; |
| 199 void StopLogging() override {} | 193 void StopLogging() override {} |
| 200 void LogVideoReceiveStreamConfig( | 194 void LogVideoReceiveStreamConfig( |
| 201 const rtclog::StreamConfig& config) override {} | 195 const rtclog::StreamConfig& config) override {} |
| 202 void LogVideoSendStreamConfig(const rtclog::StreamConfig& config) override {} | 196 void LogVideoSendStreamConfig(const rtclog::StreamConfig& config) override {} |
| 203 void LogAudioReceiveStreamConfig( | 197 void LogAudioReceiveStreamConfig( |
| 204 const rtclog::StreamConfig& config) override {} | 198 const rtclog::StreamConfig& config) override {} |
| 205 void LogAudioSendStreamConfig(const rtclog::StreamConfig& config) override {} | 199 void LogAudioSendStreamConfig(const rtclog::StreamConfig& config) override {} |
| 206 void LogRtpHeader(PacketDirection direction, | 200 void LogRtpHeader(PacketDirection direction, |
| 207 MediaType media_type, | |
| 208 const uint8_t* header, | 201 const uint8_t* header, |
| 209 size_t packet_length) override {} | 202 size_t packet_length) override {} |
| 210 void LogRtpHeader(PacketDirection direction, | 203 void LogRtpHeader(PacketDirection direction, |
| 211 MediaType media_type, | |
| 212 const uint8_t* header, | 204 const uint8_t* header, |
| 213 size_t packet_length, | 205 size_t packet_length, |
| 214 int probe_cluster_id) override {} | 206 int probe_cluster_id) override {} |
| 215 void LogRtcpPacket(PacketDirection direction, | 207 void LogRtcpPacket(PacketDirection direction, |
| 216 MediaType media_type, | |
| 217 const uint8_t* packet, | 208 const uint8_t* packet, |
| 218 size_t length) override {} | 209 size_t length) override {} |
| 219 void LogAudioPlayout(uint32_t ssrc) override {} | 210 void LogAudioPlayout(uint32_t ssrc) override {} |
| 220 void LogLossBasedBweUpdate(int32_t bitrate_bps, | 211 void LogLossBasedBweUpdate(int32_t bitrate_bps, |
| 221 uint8_t fraction_loss, | 212 uint8_t fraction_loss, |
| 222 int32_t total_packets) override {} | 213 int32_t total_packets) override {} |
| 223 void LogDelayBasedBweUpdate(int32_t bitrate_bps, | 214 void LogDelayBasedBweUpdate(int32_t bitrate_bps, |
| 224 BandwidthUsage detector_state) override {} | 215 BandwidthUsage detector_state) override {} |
| 225 void LogAudioNetworkAdaptation( | 216 void LogAudioNetworkAdaptation( |
| 226 const AudioEncoderRuntimeConfig& config) override {} | 217 const AudioEncoderRuntimeConfig& config) override {} |
| 227 void LogProbeClusterCreated(int id, | 218 void LogProbeClusterCreated(int id, |
| 228 int bitrate_bps, | 219 int bitrate_bps, |
| 229 int min_probes, | 220 int min_probes, |
| 230 int min_bytes) override{}; | 221 int min_bytes) override{}; |
| 231 void LogProbeResultSuccess(int id, int bitrate_bps) override{}; | 222 void LogProbeResultSuccess(int id, int bitrate_bps) override{}; |
| 232 void LogProbeResultFailure(int id, | 223 void LogProbeResultFailure(int id, |
| 233 ProbeFailureReason failure_reason) override{}; | 224 ProbeFailureReason failure_reason) override{}; |
| 234 }; | 225 }; |
| 235 | 226 |
| 236 } // namespace webrtc | 227 } // namespace webrtc |
| 237 | 228 |
| 238 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_ | 229 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_ |
| OLD | NEW |