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

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

Issue 2997883002: Video/Screenshare loopback tool.
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) 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 rtc::Optional<uint64_t> bitrate_bps; 53 rtc::Optional<uint64_t> bitrate_bps;
54 rtc::Optional<ProbeFailureReason> failure_reason; 54 rtc::Optional<ProbeFailureReason> failure_reason;
55 }; 55 };
56 56
57 struct BweDelayBasedUpdate { 57 struct BweDelayBasedUpdate {
58 uint64_t timestamp; 58 uint64_t timestamp;
59 int32_t bitrate_bps; 59 int32_t bitrate_bps;
60 BandwidthUsage detector_state; 60 BandwidthUsage detector_state;
61 }; 61 };
62 62
63 struct BweAckedBitrateEvent {
64 uint64_t timestamp;
65 int32_t bitrate_bps;
66 };
67
68 struct AlrStateEvent {
69 uint64_t timestamp;
70 bool in_alr;
71 uint32_t usage_bps;
72 };
73
74 struct PacketQueueTime {
75 uint64_t timestamp;
76 uint32_t ssrc;
77 int64_t queue_time_ms;
78 };
79
63 enum EventType { 80 enum EventType {
64 UNKNOWN_EVENT = 0, 81 UNKNOWN_EVENT = 0,
65 LOG_START = 1, 82 LOG_START = 1,
66 LOG_END = 2, 83 LOG_END = 2,
67 RTP_EVENT = 3, 84 RTP_EVENT = 3,
68 RTCP_EVENT = 4, 85 RTCP_EVENT = 4,
69 AUDIO_PLAYOUT_EVENT = 5, 86 AUDIO_PLAYOUT_EVENT = 5,
70 LOSS_BASED_BWE_UPDATE = 6, 87 LOSS_BASED_BWE_UPDATE = 6,
71 DELAY_BASED_BWE_UPDATE = 7, 88 DELAY_BASED_BWE_UPDATE = 7,
72 VIDEO_RECEIVER_CONFIG_EVENT = 8, 89 VIDEO_RECEIVER_CONFIG_EVENT = 8,
73 VIDEO_SENDER_CONFIG_EVENT = 9, 90 VIDEO_SENDER_CONFIG_EVENT = 9,
74 AUDIO_RECEIVER_CONFIG_EVENT = 10, 91 AUDIO_RECEIVER_CONFIG_EVENT = 10,
75 AUDIO_SENDER_CONFIG_EVENT = 11, 92 AUDIO_SENDER_CONFIG_EVENT = 11,
76 AUDIO_NETWORK_ADAPTATION_EVENT = 16, 93 AUDIO_NETWORK_ADAPTATION_EVENT = 16,
77 BWE_PROBE_CLUSTER_CREATED_EVENT = 17, 94 BWE_PROBE_CLUSTER_CREATED_EVENT = 17,
78 BWE_PROBE_RESULT_EVENT = 18 95 BWE_PROBE_RESULT_EVENT = 18,
96 BWE_ACKED_BITRATE_EVENT = 19,
97 ALR_STATE_EVENT = 20,
98 PACKET_QUEUE_TIME = 21
79 }; 99 };
80 100
81 enum class MediaType { ANY, AUDIO, VIDEO, DATA }; 101 enum class MediaType { ANY, AUDIO, VIDEO, DATA };
82 102
83 // Reads an RtcEventLog file and returns true if parsing was successful. 103 // Reads an RtcEventLog file and returns true if parsing was successful.
84 bool ParseFile(const std::string& file_name); 104 bool ParseFile(const std::string& file_name);
85 105
86 // Reads an RtcEventLog from a string and returns true if successful. 106 // Reads an RtcEventLog from a string and returns true if successful.
87 bool ParseString(const std::string& s); 107 bool ParseString(const std::string& s);
88 108
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // stored in the protobuf will be written. 187 // stored in the protobuf will be written.
168 void GetAudioNetworkAdaptation(size_t index, 188 void GetAudioNetworkAdaptation(size_t index,
169 AudioEncoderRuntimeConfig* config) const; 189 AudioEncoderRuntimeConfig* config) const;
170 190
171 BweProbeClusterCreatedEvent GetBweProbeClusterCreated(size_t index) const; 191 BweProbeClusterCreatedEvent GetBweProbeClusterCreated(size_t index) const;
172 192
173 BweProbeResultEvent GetBweProbeResult(size_t index) const; 193 BweProbeResultEvent GetBweProbeResult(size_t index) const;
174 194
175 MediaType GetMediaType(uint32_t ssrc, PacketDirection direction) const; 195 MediaType GetMediaType(uint32_t ssrc, PacketDirection direction) const;
176 196
197 BweAckedBitrateEvent GetAckedBitrate(size_t index) const;
198
199 AlrStateEvent GetAlrState(size_t index) const;
200
201 PacketQueueTime GetQueueTime(size_t index) const;
202
177 private: 203 private:
178 rtclog::StreamConfig GetVideoReceiveConfig(const rtclog::Event& event) const; 204 rtclog::StreamConfig GetVideoReceiveConfig(const rtclog::Event& event) const;
179 std::vector<rtclog::StreamConfig> GetVideoSendConfig( 205 std::vector<rtclog::StreamConfig> GetVideoSendConfig(
180 const rtclog::Event& event) const; 206 const rtclog::Event& event) const;
181 rtclog::StreamConfig GetAudioReceiveConfig(const rtclog::Event& event) const; 207 rtclog::StreamConfig GetAudioReceiveConfig(const rtclog::Event& event) const;
182 rtclog::StreamConfig GetAudioSendConfig(const rtclog::Event& event) const; 208 rtclog::StreamConfig GetAudioSendConfig(const rtclog::Event& event) const;
183 209
184 std::vector<rtclog::Event> events_; 210 std::vector<rtclog::Event> events_;
185 211
186 struct Stream { 212 struct Stream {
(...skipping 16 matching lines...) Expand all
203 229
204 // To find configured extensions map for given stream, what are needed to 230 // To find configured extensions map for given stream, what are needed to
205 // parse a header. 231 // parse a header.
206 typedef std::pair<uint32_t, webrtc::PacketDirection> StreamId; 232 typedef std::pair<uint32_t, webrtc::PacketDirection> StreamId;
207 std::map<StreamId, webrtc::RtpHeaderExtensionMap*> rtp_extensions_maps_; 233 std::map<StreamId, webrtc::RtpHeaderExtensionMap*> rtp_extensions_maps_;
208 }; 234 };
209 235
210 } // namespace webrtc 236 } // namespace webrtc
211 237
212 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_ 238 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_
OLDNEW
« no previous file with comments | « webrtc/logging/rtc_event_log/rtc_event_log.proto ('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