| 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_CALL_RTC_EVENT_LOG_PARSER_H_ | 10 #ifndef WEBRTC_CALL_RTC_EVENT_LOG_PARSER_H_ |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 BWE_PACKET_DELAY_EVENT = 7, | 43 BWE_PACKET_DELAY_EVENT = 7, |
| 44 VIDEO_RECEIVER_CONFIG_EVENT = 8, | 44 VIDEO_RECEIVER_CONFIG_EVENT = 8, |
| 45 VIDEO_SENDER_CONFIG_EVENT = 9, | 45 VIDEO_SENDER_CONFIG_EVENT = 9, |
| 46 AUDIO_RECEIVER_CONFIG_EVENT = 10, | 46 AUDIO_RECEIVER_CONFIG_EVENT = 10, |
| 47 AUDIO_SENDER_CONFIG_EVENT = 11 | 47 AUDIO_SENDER_CONFIG_EVENT = 11 |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 // Reads an RtcEventLog file and returns true if parsing was successful. | 50 // Reads an RtcEventLog file and returns true if parsing was successful. |
| 51 bool ParseFile(const std::string& file_name); | 51 bool ParseFile(const std::string& file_name); |
| 52 | 52 |
| 53 // Reads an RtcEventLog from a string and returns true if successful. |
| 54 bool ParseString(const std::string& s); |
| 55 |
| 56 // Reads an RtcEventLog from an istream and returns true if successful. |
| 57 bool ParseStream(std::istream& stream); |
| 58 |
| 53 // Returns the number of events in an EventStream. | 59 // Returns the number of events in an EventStream. |
| 54 size_t GetNumberOfEvents() const; | 60 size_t GetNumberOfEvents() const; |
| 55 | 61 |
| 56 // Reads the arrival timestamp (in microseconds) from a rtclog::Event. | 62 // Reads the arrival timestamp (in microseconds) from a rtclog::Event. |
| 57 int64_t GetTimestamp(size_t index) const; | 63 int64_t GetTimestamp(size_t index) const; |
| 58 | 64 |
| 59 // Reads the event type of the rtclog::Event at |index|. | 65 // Reads the event type of the rtclog::Event at |index|. |
| 60 EventType GetEventType(size_t index) const; | 66 EventType GetEventType(size_t index) const; |
| 61 | 67 |
| 62 // Reads the header, direction, media type, header length and packet length | 68 // Reads the header, direction, media type, header length and packet length |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // expected packets from the BWE event at |index| and stores the values in | 105 // expected packets from the BWE event at |index| and stores the values in |
| 100 // the corresponding output parameters. The output parameters can be set to | 106 // the corresponding output parameters. The output parameters can be set to |
| 101 // nullptr if those values aren't needed. | 107 // nullptr if those values aren't needed. |
| 102 // NB: The packet must have space for at least IP_PACKET_SIZE bytes. | 108 // NB: The packet must have space for at least IP_PACKET_SIZE bytes. |
| 103 void GetBwePacketLossEvent(size_t index, | 109 void GetBwePacketLossEvent(size_t index, |
| 104 int32_t* bitrate, | 110 int32_t* bitrate, |
| 105 uint8_t* fraction_loss, | 111 uint8_t* fraction_loss, |
| 106 int32_t* total_packets) const; | 112 int32_t* total_packets) const; |
| 107 | 113 |
| 108 private: | 114 private: |
| 109 std::vector<rtclog::Event> stream_; | 115 std::vector<rtclog::Event> events_; |
| 110 }; | 116 }; |
| 111 | 117 |
| 112 } // namespace webrtc | 118 } // namespace webrtc |
| 113 | 119 |
| 114 #endif // WEBRTC_CALL_RTC_EVENT_LOG_PARSER_H_ | 120 #endif // WEBRTC_CALL_RTC_EVENT_LOG_PARSER_H_ |
| OLD | NEW |