| 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 24 matching lines...) Expand all Loading... |
| 35 friend class RtcEventLogTestHelper; | 35 friend class RtcEventLogTestHelper; |
| 36 | 36 |
| 37 public: | 37 public: |
| 38 enum EventType { | 38 enum EventType { |
| 39 UNKNOWN_EVENT = 0, | 39 UNKNOWN_EVENT = 0, |
| 40 LOG_START = 1, | 40 LOG_START = 1, |
| 41 LOG_END = 2, | 41 LOG_END = 2, |
| 42 RTP_EVENT = 3, | 42 RTP_EVENT = 3, |
| 43 RTCP_EVENT = 4, | 43 RTCP_EVENT = 4, |
| 44 AUDIO_PLAYOUT_EVENT = 5, | 44 AUDIO_PLAYOUT_EVENT = 5, |
| 45 BWE_PACKET_LOSS_EVENT = 6, | 45 LOSS_BASED_BWE_UPDATE = 6, |
| 46 BWE_PACKET_DELAY_EVENT = 7, | 46 DELAY_BASED_BWE_UPDATE = 7, |
| 47 VIDEO_RECEIVER_CONFIG_EVENT = 8, | 47 VIDEO_RECEIVER_CONFIG_EVENT = 8, |
| 48 VIDEO_SENDER_CONFIG_EVENT = 9, | 48 VIDEO_SENDER_CONFIG_EVENT = 9, |
| 49 AUDIO_RECEIVER_CONFIG_EVENT = 10, | 49 AUDIO_RECEIVER_CONFIG_EVENT = 10, |
| 50 AUDIO_SENDER_CONFIG_EVENT = 11, | 50 AUDIO_SENDER_CONFIG_EVENT = 11, |
| 51 AUDIO_NETWORK_ADAPTATION_EVENT = 16 | 51 AUDIO_NETWORK_ADAPTATION_EVENT = 16 |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 // Reads an RtcEventLog file and returns true if parsing was successful. | 54 // Reads an RtcEventLog file and returns true if parsing was successful. |
| 55 bool ParseFile(const std::string& file_name); | 55 bool ParseFile(const std::string& file_name); |
| 56 | 56 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // in the output parameter ssrc. The output parameter can be set to nullptr | 113 // in the output parameter ssrc. The output parameter can be set to nullptr |
| 114 // and in that case the function only asserts that the event is well formed. | 114 // and in that case the function only asserts that the event is well formed. |
| 115 void GetAudioPlayout(size_t index, uint32_t* ssrc) const; | 115 void GetAudioPlayout(size_t index, uint32_t* ssrc) const; |
| 116 | 116 |
| 117 // Reads bitrate, fraction loss (as defined in RFC 1889) and total number of | 117 // Reads bitrate, fraction loss (as defined in RFC 1889) and total number of |
| 118 // expected packets from the loss based BWE event at |index| and stores the | 118 // expected packets from the loss based BWE event at |index| and stores the |
| 119 // values in | 119 // values in |
| 120 // the corresponding output parameters. Each output parameter can be set to | 120 // the corresponding output parameters. Each output parameter can be set to |
| 121 // nullptr if that | 121 // nullptr if that |
| 122 // value isn't needed. | 122 // value isn't needed. |
| 123 void GetBwePacketLossEvent(size_t index, | 123 void GetLossBasedBweUpdate(size_t index, |
| 124 int32_t* bitrate, | 124 int32_t* bitrate_bps, |
| 125 uint8_t* fraction_loss, | 125 uint8_t* fraction_loss, |
| 126 int32_t* total_packets) const; | 126 int32_t* total_packets) const; |
| 127 | 127 |
| 128 // Reads bitrate and detector_state from the delay based BWE event at |index| | 128 // Reads bitrate and detector_state from the delay based BWE event at |index| |
| 129 // and stores the values in the corresponding output parameters. Each output | 129 // and stores the values in the corresponding output parameters. Each output |
| 130 // parameter can be set to nullptr if that | 130 // parameter can be set to nullptr if that |
| 131 // value isn't needed. | 131 // value isn't needed. |
| 132 void GetBwePacketDelayEvent(size_t index, | 132 void GetDelayBasedBweUpdate(size_t index, |
| 133 int32_t* bitrate, | 133 int32_t* bitrate_bps, |
| 134 BandwidthUsage* detector_state) const; | 134 BandwidthUsage* detector_state) const; |
| 135 | 135 |
| 136 // Reads a audio network adaptation event to a (non-NULL) | 136 // Reads a audio network adaptation event to a (non-NULL) |
| 137 // AudioNetworkAdaptor::EncoderRuntimeConfig struct. Only the fields that are | 137 // AudioNetworkAdaptor::EncoderRuntimeConfig struct. Only the fields that are |
| 138 // stored in the protobuf will be written. | 138 // stored in the protobuf will be written. |
| 139 void GetAudioNetworkAdaptation( | 139 void GetAudioNetworkAdaptation( |
| 140 size_t index, | 140 size_t index, |
| 141 AudioNetworkAdaptor::EncoderRuntimeConfig* config) const; | 141 AudioNetworkAdaptor::EncoderRuntimeConfig* config) const; |
| 142 | 142 |
| 143 private: | 143 private: |
| 144 std::vector<rtclog::Event> events_; | 144 std::vector<rtclog::Event> events_; |
| 145 }; | 145 }; |
| 146 | 146 |
| 147 } // namespace webrtc | 147 } // namespace webrtc |
| 148 | 148 |
| 149 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_ | 149 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_ |
| OLD | NEW |