Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(736)

Side by Side Diff: webrtc/logging/rtc_event_log/rtc_event_log.h

Issue 2997973002: Split LogRtpHeader and LogRtcpPacket into separate versions for incoming and outgoing packets.
Patch Set: Rebase Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/rtpparameters.h" 18 #include "webrtc/api/rtpparameters.h"
19 #include "webrtc/common_types.h" 19 #include "webrtc/common_types.h"
20 #include "webrtc/rtc_base/array_view.h"
danilchap 2017/09/05 08:47:16 just moved to webrtc/api/
terelius 2017/09/07 12:53:55 Done.
20 #include "webrtc/rtc_base/platform_file.h" 21 #include "webrtc/rtc_base/platform_file.h"
21 22
22 namespace webrtc { 23 namespace webrtc {
23 24
24 // Forward declaration of storage class that is automatically generated from 25 // Forward declaration of storage class that is automatically generated from
25 // the protobuf file. 26 // the protobuf file.
26 namespace rtclog { 27 namespace rtclog {
27 class EventStream; 28 class EventStream;
28 29
29 struct StreamConfig { 30 struct StreamConfig {
(...skipping 20 matching lines...) Expand all
50 int rtx_payload_type; 51 int rtx_payload_type;
51 }; 52 };
52 std::vector<Codec> codecs; 53 std::vector<Codec> codecs;
53 }; 54 };
54 55
55 } // namespace rtclog 56 } // namespace rtclog
56 57
57 class Clock; 58 class Clock;
58 class RtcEventLogImpl; 59 class RtcEventLogImpl;
59 struct AudioEncoderRuntimeConfig; 60 struct AudioEncoderRuntimeConfig;
61 class RtpPacketReceived;
62 class RtpPacketToSend;
60 63
61 enum class MediaType; 64 enum class MediaType;
62 enum class BandwidthUsage; 65 enum class BandwidthUsage;
63 66
64 enum PacketDirection { kIncomingPacket = 0, kOutgoingPacket }; 67 enum PacketDirection { kIncomingPacket = 0, kOutgoingPacket };
65 enum ProbeFailureReason { 68 enum ProbeFailureReason {
66 kInvalidSendReceiveInterval, 69 kInvalidSendReceiveInterval,
67 kInvalidSendReceiveRatio, 70 kInvalidSendReceiveRatio,
68 kTimeout 71 kTimeout
69 }; 72 };
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // Logs configuration information for a video send stream. 120 // Logs configuration information for a video send stream.
118 virtual void LogVideoSendStreamConfig(const rtclog::StreamConfig& config) = 0; 121 virtual void LogVideoSendStreamConfig(const rtclog::StreamConfig& config) = 0;
119 122
120 // Logs configuration information for an audio receive stream. 123 // Logs configuration information for an audio receive stream.
121 virtual void LogAudioReceiveStreamConfig( 124 virtual void LogAudioReceiveStreamConfig(
122 const rtclog::StreamConfig& config) = 0; 125 const rtclog::StreamConfig& config) = 0;
123 126
124 // Logs configuration information for an audio send stream. 127 // Logs configuration information for an audio send stream.
125 virtual void LogAudioSendStreamConfig(const rtclog::StreamConfig& config) = 0; 128 virtual void LogAudioSendStreamConfig(const rtclog::StreamConfig& config) = 0;
126 129
127 // Logs the header of an incoming or outgoing RTP packet. packet_length 130 RTC_DEPRECATED virtual void LogRtpHeader(PacketDirection direction,
131 const uint8_t* header,
132 size_t packet_length) {}
133
134 RTC_DEPRECATED virtual void LogRtpHeader(PacketDirection direction,
135 const uint8_t* header,
136 size_t packet_length,
137 int probe_cluster_id) {}
138
139 // Logs the header of an incoming RTP packet. |packet_length|
128 // is the total length of the packet, including both header and payload. 140 // is the total length of the packet, including both header and payload.
129 virtual void LogRtpHeader(PacketDirection direction, 141 virtual void LogIncomingRtpHeader(const RtpPacketReceived& packet) = 0;
130 const uint8_t* header,
131 size_t packet_length) = 0;
132 142
133 // Same as above but used on the sender side to log packets that are part of 143 // Logs the header of an incoming RTP packet. |packet_length|
134 // a probe cluster. 144 // is the total length of the packet, including both header and payload.
135 virtual void LogRtpHeader(PacketDirection direction, 145 virtual void LogOutgoingRtpHeader(const RtpPacketToSend& packet,
136 const uint8_t* header, 146 int probe_cluster_id) = 0;
137 size_t packet_length,
138 int probe_cluster_id) = 0;
139 147
140 // Logs an incoming or outgoing RTCP packet. 148 RTC_DEPRECATED virtual void LogRtcpPacket(PacketDirection direction,
141 virtual void LogRtcpPacket(PacketDirection direction, 149 const uint8_t* header,
142 const uint8_t* packet, 150 size_t packet_length) {}
143 size_t length) = 0; 151
152 // Logs an incoming RTCP packet.
153 virtual void LogIncomingRtcpPacket(rtc::ArrayView<const uint8_t> packet) = 0;
154
155 // Logs an outgoing RTCP packet.
156 virtual void LogOutgoingRtcpPacket(rtc::ArrayView<const uint8_t> packet) = 0;
144 157
145 // Logs an audio playout event. 158 // Logs an audio playout event.
146 virtual void LogAudioPlayout(uint32_t ssrc) = 0; 159 virtual void LogAudioPlayout(uint32_t ssrc) = 0;
147 160
148 // Logs a bitrate update from the bandwidth estimator based on packet loss. 161 // Logs a bitrate update from the bandwidth estimator based on packet loss.
149 virtual void LogLossBasedBweUpdate(int32_t bitrate_bps, 162 virtual void LogLossBasedBweUpdate(int32_t bitrate_bps,
150 uint8_t fraction_loss, 163 uint8_t fraction_loss,
151 int32_t total_packets) = 0; 164 int32_t total_packets) = 0;
152 165
153 // Logs a bitrate update from the bandwidth estimator based on delay changes. 166 // Logs a bitrate update from the bandwidth estimator based on delay changes.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 int64_t max_size_bytes) override { 206 int64_t max_size_bytes) override {
194 return false; 207 return false;
195 } 208 }
196 void StopLogging() override {} 209 void StopLogging() override {}
197 void LogVideoReceiveStreamConfig( 210 void LogVideoReceiveStreamConfig(
198 const rtclog::StreamConfig& config) override {} 211 const rtclog::StreamConfig& config) override {}
199 void LogVideoSendStreamConfig(const rtclog::StreamConfig& config) override {} 212 void LogVideoSendStreamConfig(const rtclog::StreamConfig& config) override {}
200 void LogAudioReceiveStreamConfig( 213 void LogAudioReceiveStreamConfig(
201 const rtclog::StreamConfig& config) override {} 214 const rtclog::StreamConfig& config) override {}
202 void LogAudioSendStreamConfig(const rtclog::StreamConfig& config) override {} 215 void LogAudioSendStreamConfig(const rtclog::StreamConfig& config) override {}
203 void LogRtpHeader(PacketDirection direction, 216 void LogIncomingRtpHeader(const RtpPacketReceived& packet) override {}
204 const uint8_t* header, 217 void LogOutgoingRtpHeader(const RtpPacketToSend& packet,
205 size_t packet_length) override {} 218 int probe_cluster_id) override {}
206 void LogRtpHeader(PacketDirection direction, 219 void LogIncomingRtcpPacket(rtc::ArrayView<const uint8_t> packet) override {}
207 const uint8_t* header, 220 void LogOutgoingRtcpPacket(rtc::ArrayView<const uint8_t> packet) override {}
208 size_t packet_length,
209 int probe_cluster_id) override {}
210 void LogRtcpPacket(PacketDirection direction,
211 const uint8_t* packet,
212 size_t length) override {}
213 void LogAudioPlayout(uint32_t ssrc) override {} 221 void LogAudioPlayout(uint32_t ssrc) override {}
214 void LogLossBasedBweUpdate(int32_t bitrate_bps, 222 void LogLossBasedBweUpdate(int32_t bitrate_bps,
215 uint8_t fraction_loss, 223 uint8_t fraction_loss,
216 int32_t total_packets) override {} 224 int32_t total_packets) override {}
217 void LogDelayBasedBweUpdate(int32_t bitrate_bps, 225 void LogDelayBasedBweUpdate(int32_t bitrate_bps,
218 BandwidthUsage detector_state) override {} 226 BandwidthUsage detector_state) override {}
219 void LogAudioNetworkAdaptation( 227 void LogAudioNetworkAdaptation(
220 const AudioEncoderRuntimeConfig& config) override {} 228 const AudioEncoderRuntimeConfig& config) override {}
221 void LogProbeClusterCreated(int id, 229 void LogProbeClusterCreated(int id,
222 int bitrate_bps, 230 int bitrate_bps,
223 int min_probes, 231 int min_probes,
224 int min_bytes) override{}; 232 int min_bytes) override{};
225 void LogProbeResultSuccess(int id, int bitrate_bps) override{}; 233 void LogProbeResultSuccess(int id, int bitrate_bps) override{};
226 void LogProbeResultFailure(int id, 234 void LogProbeResultFailure(int id,
227 ProbeFailureReason failure_reason) override{}; 235 ProbeFailureReason failure_reason) override{};
228 }; 236 };
229 237
230 } // namespace webrtc 238 } // namespace webrtc
231 239
232 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_ 240 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698