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

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

Issue 2996933003: Add logging of host lookups made by TurnPort to the RtcEventLog. (Closed)
Patch Set: review 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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 #ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_ 10 #ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 RTCP_EVENT = 4, 68 RTCP_EVENT = 4,
69 AUDIO_PLAYOUT_EVENT = 5, 69 AUDIO_PLAYOUT_EVENT = 5,
70 LOSS_BASED_BWE_UPDATE = 6, 70 LOSS_BASED_BWE_UPDATE = 6,
71 DELAY_BASED_BWE_UPDATE = 7, 71 DELAY_BASED_BWE_UPDATE = 7,
72 VIDEO_RECEIVER_CONFIG_EVENT = 8, 72 VIDEO_RECEIVER_CONFIG_EVENT = 8,
73 VIDEO_SENDER_CONFIG_EVENT = 9, 73 VIDEO_SENDER_CONFIG_EVENT = 9,
74 AUDIO_RECEIVER_CONFIG_EVENT = 10, 74 AUDIO_RECEIVER_CONFIG_EVENT = 10,
75 AUDIO_SENDER_CONFIG_EVENT = 11, 75 AUDIO_SENDER_CONFIG_EVENT = 11,
76 AUDIO_NETWORK_ADAPTATION_EVENT = 16, 76 AUDIO_NETWORK_ADAPTATION_EVENT = 16,
77 BWE_PROBE_CLUSTER_CREATED_EVENT = 17, 77 BWE_PROBE_CLUSTER_CREATED_EVENT = 17,
78 BWE_PROBE_RESULT_EVENT = 18 78 BWE_PROBE_RESULT_EVENT = 18,
79 HOST_LOOKUP_EVENT = 19
79 }; 80 };
80 81
81 enum class MediaType { ANY, AUDIO, VIDEO, DATA }; 82 enum class MediaType { ANY, AUDIO, VIDEO, DATA };
82 83
83 // Reads an RtcEventLog file and returns true if parsing was successful. 84 // Reads an RtcEventLog file and returns true if parsing was successful.
84 bool ParseFile(const std::string& file_name); 85 bool ParseFile(const std::string& file_name);
85 86
86 // Reads an RtcEventLog from a string and returns true if successful. 87 // Reads an RtcEventLog from a string and returns true if successful.
87 bool ParseString(const std::string& s); 88 bool ParseString(const std::string& s);
88 89
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // stored in the protobuf will be written. 168 // stored in the protobuf will be written.
168 void GetAudioNetworkAdaptation(size_t index, 169 void GetAudioNetworkAdaptation(size_t index,
169 AudioEncoderRuntimeConfig* config) const; 170 AudioEncoderRuntimeConfig* config) const;
170 171
171 BweProbeClusterCreatedEvent GetBweProbeClusterCreated(size_t index) const; 172 BweProbeClusterCreatedEvent GetBweProbeClusterCreated(size_t index) const;
172 173
173 BweProbeResultEvent GetBweProbeResult(size_t index) const; 174 BweProbeResultEvent GetBweProbeResult(size_t index) const;
174 175
175 MediaType GetMediaType(uint32_t ssrc, PacketDirection direction) const; 176 MediaType GetMediaType(uint32_t ssrc, PacketDirection direction) const;
176 177
178 // Reads info from a HostLookupResult.
179 void GetHostLookup(size_t index,
180 int* error, int64_t* host_lookup_time_ms) const;
181
177 private: 182 private:
178 rtclog::StreamConfig GetVideoReceiveConfig(const rtclog::Event& event) const; 183 rtclog::StreamConfig GetVideoReceiveConfig(const rtclog::Event& event) const;
179 std::vector<rtclog::StreamConfig> GetVideoSendConfig( 184 std::vector<rtclog::StreamConfig> GetVideoSendConfig(
180 const rtclog::Event& event) const; 185 const rtclog::Event& event) const;
181 rtclog::StreamConfig GetAudioReceiveConfig(const rtclog::Event& event) const; 186 rtclog::StreamConfig GetAudioReceiveConfig(const rtclog::Event& event) const;
182 rtclog::StreamConfig GetAudioSendConfig(const rtclog::Event& event) const; 187 rtclog::StreamConfig GetAudioSendConfig(const rtclog::Event& event) const;
183 188
184 std::vector<rtclog::Event> events_; 189 std::vector<rtclog::Event> events_;
185 190
186 struct Stream { 191 struct Stream {
(...skipping 16 matching lines...) Expand all
203 208
204 // To find configured extensions map for given stream, what are needed to 209 // To find configured extensions map for given stream, what are needed to
205 // parse a header. 210 // parse a header.
206 typedef std::pair<uint32_t, webrtc::PacketDirection> StreamId; 211 typedef std::pair<uint32_t, webrtc::PacketDirection> StreamId;
207 std::map<StreamId, webrtc::RtpHeaderExtensionMap*> rtp_extensions_maps_; 212 std::map<StreamId, webrtc::RtpHeaderExtensionMap*> rtp_extensions_maps_;
208 }; 213 };
209 214
210 } // namespace webrtc 215 } // namespace webrtc
211 216
212 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_ 217 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_
OLDNEW
« no previous file with comments | « webrtc/logging/rtc_event_log/rtc_event_log2text.cc ('k') | webrtc/logging/rtc_event_log/rtc_event_log_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698