| OLD | NEW |
| 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 Loading... |
| 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 | |
| 80 }; | 79 }; |
| 81 | 80 |
| 82 enum class MediaType { ANY, AUDIO, VIDEO, DATA }; | 81 enum class MediaType { ANY, AUDIO, VIDEO, DATA }; |
| 83 | 82 |
| 84 // Reads an RtcEventLog file and returns true if parsing was successful. | 83 // Reads an RtcEventLog file and returns true if parsing was successful. |
| 85 bool ParseFile(const std::string& file_name); | 84 bool ParseFile(const std::string& file_name); |
| 86 | 85 |
| 87 // Reads an RtcEventLog from a string and returns true if successful. | 86 // Reads an RtcEventLog from a string and returns true if successful. |
| 88 bool ParseString(const std::string& s); | 87 bool ParseString(const std::string& s); |
| 89 | 88 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 // stored in the protobuf will be written. | 167 // stored in the protobuf will be written. |
| 169 void GetAudioNetworkAdaptation(size_t index, | 168 void GetAudioNetworkAdaptation(size_t index, |
| 170 AudioEncoderRuntimeConfig* config) const; | 169 AudioEncoderRuntimeConfig* config) const; |
| 171 | 170 |
| 172 BweProbeClusterCreatedEvent GetBweProbeClusterCreated(size_t index) const; | 171 BweProbeClusterCreatedEvent GetBweProbeClusterCreated(size_t index) const; |
| 173 | 172 |
| 174 BweProbeResultEvent GetBweProbeResult(size_t index) const; | 173 BweProbeResultEvent GetBweProbeResult(size_t index) const; |
| 175 | 174 |
| 176 MediaType GetMediaType(uint32_t ssrc, PacketDirection direction) const; | 175 MediaType GetMediaType(uint32_t ssrc, PacketDirection direction) const; |
| 177 | 176 |
| 178 // Reads info from a HostLookupResult. | |
| 179 void GetHostLookup(size_t index, | |
| 180 int* error, int64_t* host_lookup_time_ms) const; | |
| 181 | |
| 182 private: | 177 private: |
| 183 rtclog::StreamConfig GetVideoReceiveConfig(const rtclog::Event& event) const; | 178 rtclog::StreamConfig GetVideoReceiveConfig(const rtclog::Event& event) const; |
| 184 std::vector<rtclog::StreamConfig> GetVideoSendConfig( | 179 std::vector<rtclog::StreamConfig> GetVideoSendConfig( |
| 185 const rtclog::Event& event) const; | 180 const rtclog::Event& event) const; |
| 186 rtclog::StreamConfig GetAudioReceiveConfig(const rtclog::Event& event) const; | 181 rtclog::StreamConfig GetAudioReceiveConfig(const rtclog::Event& event) const; |
| 187 rtclog::StreamConfig GetAudioSendConfig(const rtclog::Event& event) const; | 182 rtclog::StreamConfig GetAudioSendConfig(const rtclog::Event& event) const; |
| 188 | 183 |
| 189 std::vector<rtclog::Event> events_; | 184 std::vector<rtclog::Event> events_; |
| 190 | 185 |
| 191 struct Stream { | 186 struct Stream { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 208 | 203 |
| 209 // To find configured extensions map for given stream, what are needed to | 204 // To find configured extensions map for given stream, what are needed to |
| 210 // parse a header. | 205 // parse a header. |
| 211 typedef std::pair<uint32_t, webrtc::PacketDirection> StreamId; | 206 typedef std::pair<uint32_t, webrtc::PacketDirection> StreamId; |
| 212 std::map<StreamId, webrtc::RtpHeaderExtensionMap*> rtp_extensions_maps_; | 207 std::map<StreamId, webrtc::RtpHeaderExtensionMap*> rtp_extensions_maps_; |
| 213 }; | 208 }; |
| 214 | 209 |
| 215 } // namespace webrtc | 210 } // namespace webrtc |
| 216 | 211 |
| 217 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_ | 212 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_ |
| OLD | NEW |