| 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/api/array_view.h" |
| 18 // TODO(eladalon): Get rid of this later in the CL-stack. | 19 // TODO(eladalon): Get rid of this later in the CL-stack. |
| 19 #include "webrtc/api/rtpparameters.h" | 20 #include "webrtc/api/rtpparameters.h" |
| 20 #include "webrtc/common_types.h" | 21 #include "webrtc/common_types.h" |
| 21 #include "webrtc/rtc_base/platform_file.h" | 22 #include "webrtc/rtc_base/platform_file.h" |
| 22 | 23 |
| 23 namespace webrtc { | 24 namespace webrtc { |
| 24 | 25 |
| 25 namespace rtclog { | 26 namespace rtclog { |
| 26 class EventStream; // Storage class automatically generated from protobuf. | 27 class EventStream; // Storage class automatically generated from protobuf. |
| 27 // TODO(eladalon): Get rid of this when deprecated methods are removed. | 28 // TODO(eladalon): Get rid of this when deprecated methods are removed. |
| 28 struct StreamConfig; | 29 struct StreamConfig; |
| 29 } // namespace rtclog | 30 } // namespace rtclog |
| 30 | 31 |
| 31 class Clock; | 32 class Clock; |
| 32 struct AudioEncoderRuntimeConfig; | 33 struct AudioEncoderRuntimeConfig; |
| 34 class RtpPacketReceived; |
| 35 class RtpPacketToSend; |
| 33 | 36 |
| 34 enum class MediaType; | 37 enum class MediaType; |
| 35 enum class BandwidthUsage; | 38 enum class BandwidthUsage; |
| 36 | 39 |
| 37 enum PacketDirection { kIncomingPacket = 0, kOutgoingPacket }; | 40 enum PacketDirection { kIncomingPacket = 0, kOutgoingPacket }; |
| 38 enum ProbeFailureReason { | 41 enum ProbeFailureReason { |
| 39 kInvalidSendReceiveInterval, | 42 kInvalidSendReceiveInterval, |
| 40 kInvalidSendReceiveRatio, | 43 kInvalidSendReceiveRatio, |
| 41 kTimeout | 44 kTimeout |
| 42 }; | 45 }; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // Logs configuration information for a video send stream. | 94 // Logs configuration information for a video send stream. |
| 92 virtual void LogVideoSendStreamConfig(const rtclog::StreamConfig& config) = 0; | 95 virtual void LogVideoSendStreamConfig(const rtclog::StreamConfig& config) = 0; |
| 93 | 96 |
| 94 // Logs configuration information for an audio receive stream. | 97 // Logs configuration information for an audio receive stream. |
| 95 virtual void LogAudioReceiveStreamConfig( | 98 virtual void LogAudioReceiveStreamConfig( |
| 96 const rtclog::StreamConfig& config) = 0; | 99 const rtclog::StreamConfig& config) = 0; |
| 97 | 100 |
| 98 // Logs configuration information for an audio send stream. | 101 // Logs configuration information for an audio send stream. |
| 99 virtual void LogAudioSendStreamConfig(const rtclog::StreamConfig& config) = 0; | 102 virtual void LogAudioSendStreamConfig(const rtclog::StreamConfig& config) = 0; |
| 100 | 103 |
| 101 // Logs the header of an incoming or outgoing RTP packet. packet_length | 104 RTC_DEPRECATED virtual void LogRtpHeader(PacketDirection direction, |
| 105 const uint8_t* header, |
| 106 size_t packet_length) {} |
| 107 |
| 108 RTC_DEPRECATED virtual void LogRtpHeader(PacketDirection direction, |
| 109 const uint8_t* header, |
| 110 size_t packet_length, |
| 111 int probe_cluster_id) {} |
| 112 |
| 113 // Logs the header of an incoming RTP packet. |packet_length| |
| 102 // is the total length of the packet, including both header and payload. | 114 // is the total length of the packet, including both header and payload. |
| 103 virtual void LogRtpHeader(PacketDirection direction, | 115 virtual void LogIncomingRtpHeader(const RtpPacketReceived& packet) = 0; |
| 104 const uint8_t* header, | |
| 105 size_t packet_length) = 0; | |
| 106 | 116 |
| 107 // Same as above but used on the sender side to log packets that are part of | 117 // Logs the header of an incoming RTP packet. |packet_length| |
| 108 // a probe cluster. | 118 // is the total length of the packet, including both header and payload. |
| 109 virtual void LogRtpHeader(PacketDirection direction, | 119 virtual void LogOutgoingRtpHeader(const RtpPacketToSend& packet, |
| 110 const uint8_t* header, | 120 int probe_cluster_id) = 0; |
| 111 size_t packet_length, | |
| 112 int probe_cluster_id) = 0; | |
| 113 | 121 |
| 114 // Logs an incoming or outgoing RTCP packet. | 122 RTC_DEPRECATED virtual void LogRtcpPacket(PacketDirection direction, |
| 115 virtual void LogRtcpPacket(PacketDirection direction, | 123 const uint8_t* header, |
| 116 const uint8_t* packet, | 124 size_t packet_length) {} |
| 117 size_t length) = 0; | 125 |
| 126 // Logs an incoming RTCP packet. |
| 127 virtual void LogIncomingRtcpPacket(rtc::ArrayView<const uint8_t> packet) = 0; |
| 128 |
| 129 // Logs an outgoing RTCP packet. |
| 130 virtual void LogOutgoingRtcpPacket(rtc::ArrayView<const uint8_t> packet) = 0; |
| 118 | 131 |
| 119 // Logs an audio playout event. | 132 // Logs an audio playout event. |
| 120 virtual void LogAudioPlayout(uint32_t ssrc) = 0; | 133 virtual void LogAudioPlayout(uint32_t ssrc) = 0; |
| 121 | 134 |
| 122 // Logs a bitrate update from the bandwidth estimator based on packet loss. | 135 // Logs a bitrate update from the bandwidth estimator based on packet loss. |
| 123 virtual void LogLossBasedBweUpdate(int32_t bitrate_bps, | 136 virtual void LogLossBasedBweUpdate(int32_t bitrate_bps, |
| 124 uint8_t fraction_loss, | 137 uint8_t fraction_loss, |
| 125 int32_t total_packets) = 0; | 138 int32_t total_packets) = 0; |
| 126 | 139 |
| 127 // Logs a bitrate update from the bandwidth estimator based on delay changes. | 140 // Logs a bitrate update from the bandwidth estimator based on delay changes. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 157 int64_t max_size_bytes) override { | 170 int64_t max_size_bytes) override { |
| 158 return false; | 171 return false; |
| 159 } | 172 } |
| 160 void StopLogging() override {} | 173 void StopLogging() override {} |
| 161 void LogVideoReceiveStreamConfig( | 174 void LogVideoReceiveStreamConfig( |
| 162 const rtclog::StreamConfig& config) override {} | 175 const rtclog::StreamConfig& config) override {} |
| 163 void LogVideoSendStreamConfig(const rtclog::StreamConfig& config) override {} | 176 void LogVideoSendStreamConfig(const rtclog::StreamConfig& config) override {} |
| 164 void LogAudioReceiveStreamConfig( | 177 void LogAudioReceiveStreamConfig( |
| 165 const rtclog::StreamConfig& config) override {} | 178 const rtclog::StreamConfig& config) override {} |
| 166 void LogAudioSendStreamConfig(const rtclog::StreamConfig& config) override {} | 179 void LogAudioSendStreamConfig(const rtclog::StreamConfig& config) override {} |
| 167 void LogRtpHeader(PacketDirection direction, | 180 void LogIncomingRtpHeader(const RtpPacketReceived& packet) override {} |
| 168 const uint8_t* header, | 181 void LogOutgoingRtpHeader(const RtpPacketToSend& packet, |
| 169 size_t packet_length) override {} | 182 int probe_cluster_id) override {} |
| 170 void LogRtpHeader(PacketDirection direction, | 183 void LogIncomingRtcpPacket(rtc::ArrayView<const uint8_t> packet) override {} |
| 171 const uint8_t* header, | 184 void LogOutgoingRtcpPacket(rtc::ArrayView<const uint8_t> packet) override {} |
| 172 size_t packet_length, | |
| 173 int probe_cluster_id) override {} | |
| 174 void LogRtcpPacket(PacketDirection direction, | |
| 175 const uint8_t* packet, | |
| 176 size_t length) override {} | |
| 177 void LogAudioPlayout(uint32_t ssrc) override {} | 185 void LogAudioPlayout(uint32_t ssrc) override {} |
| 178 void LogLossBasedBweUpdate(int32_t bitrate_bps, | 186 void LogLossBasedBweUpdate(int32_t bitrate_bps, |
| 179 uint8_t fraction_loss, | 187 uint8_t fraction_loss, |
| 180 int32_t total_packets) override {} | 188 int32_t total_packets) override {} |
| 181 void LogDelayBasedBweUpdate(int32_t bitrate_bps, | 189 void LogDelayBasedBweUpdate(int32_t bitrate_bps, |
| 182 BandwidthUsage detector_state) override {} | 190 BandwidthUsage detector_state) override {} |
| 183 void LogAudioNetworkAdaptation( | 191 void LogAudioNetworkAdaptation( |
| 184 const AudioEncoderRuntimeConfig& config) override {} | 192 const AudioEncoderRuntimeConfig& config) override {} |
| 185 void LogProbeClusterCreated(int id, | 193 void LogProbeClusterCreated(int id, |
| 186 int bitrate_bps, | 194 int bitrate_bps, |
| 187 int min_probes, | 195 int min_probes, |
| 188 int min_bytes) override{}; | 196 int min_bytes) override{}; |
| 189 void LogProbeResultSuccess(int id, int bitrate_bps) override{}; | 197 void LogProbeResultSuccess(int id, int bitrate_bps) override{}; |
| 190 void LogProbeResultFailure(int id, | 198 void LogProbeResultFailure(int id, |
| 191 ProbeFailureReason failure_reason) override{}; | 199 ProbeFailureReason failure_reason) override{}; |
| 192 }; | 200 }; |
| 193 | 201 |
| 194 } // namespace webrtc | 202 } // namespace webrtc |
| 195 | 203 |
| 196 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_ | 204 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_ |
| OLD | NEW |