| 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 29 matching lines...) Expand all Loading... |
| 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 BWE_PACKET_LOSS_EVENT = 6, |
| 46 BWE_PACKET_DELAY_EVENT = 7, | 46 BWE_PACKET_DELAY_EVENT = 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 | |
| 52 }; | 51 }; |
| 53 | 52 |
| 54 // Reads an RtcEventLog file and returns true if parsing was successful. | 53 // Reads an RtcEventLog file and returns true if parsing was successful. |
| 55 bool ParseFile(const std::string& file_name); | 54 bool ParseFile(const std::string& file_name); |
| 56 | 55 |
| 57 // Reads an RtcEventLog from a string and returns true if successful. | 56 // Reads an RtcEventLog from a string and returns true if successful. |
| 58 bool ParseString(const std::string& s); | 57 bool ParseString(const std::string& s); |
| 59 | 58 |
| 60 // Reads an RtcEventLog from an istream and returns true if successful. | 59 // Reads an RtcEventLog from an istream and returns true if successful. |
| 61 bool ParseStream(std::istream& stream); | 60 bool ParseStream(std::istream& stream); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // Reads bitrate, fraction loss (as defined in RFC 1889) and total number of | 116 // Reads bitrate, fraction loss (as defined in RFC 1889) and total number of |
| 118 // expected packets from the BWE event at |index| and stores the values in | 117 // expected packets from the BWE event at |index| and stores the values in |
| 119 // the corresponding output parameters. The output parameters can be set to | 118 // the corresponding output parameters. The output parameters can be set to |
| 120 // nullptr if those values aren't needed. | 119 // nullptr if those values aren't needed. |
| 121 // NB: The packet must have space for at least IP_PACKET_SIZE bytes. | 120 // NB: The packet must have space for at least IP_PACKET_SIZE bytes. |
| 122 void GetBwePacketLossEvent(size_t index, | 121 void GetBwePacketLossEvent(size_t index, |
| 123 int32_t* bitrate, | 122 int32_t* bitrate, |
| 124 uint8_t* fraction_loss, | 123 uint8_t* fraction_loss, |
| 125 int32_t* total_packets) const; | 124 int32_t* total_packets) const; |
| 126 | 125 |
| 127 // Reads a audio network adaptation event to a (non-NULL) | |
| 128 // AudioNetworkAdaptor::EncoderRuntimeConfig struct. Only the fields that are | |
| 129 // stored in the protobuf will be written. | |
| 130 void GetAudioNetworkAdaptation( | |
| 131 size_t index, | |
| 132 AudioNetworkAdaptor::EncoderRuntimeConfig* config) const; | |
| 133 | |
| 134 private: | 126 private: |
| 135 std::vector<rtclog::Event> events_; | 127 std::vector<rtclog::Event> events_; |
| 136 }; | 128 }; |
| 137 | 129 |
| 138 } // namespace webrtc | 130 } // namespace webrtc |
| 139 | 131 |
| 140 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_ | 132 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_ |
| OLD | NEW |