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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 107 |
108 // Reads packet, direction and packet length from the RTCP event at |index|, | 108 // Reads packet, direction and packet length from the RTCP event at |index|, |
109 // and stores the values in the corresponding output parameters. | 109 // and stores the values in the corresponding output parameters. |
110 // Each output parameter can be set to nullptr if that value isn't needed. | 110 // Each output parameter can be set to nullptr if that value isn't needed. |
111 // NB: The packet must have space for at least IP_PACKET_SIZE bytes. | 111 // NB: The packet must have space for at least IP_PACKET_SIZE bytes. |
112 void GetRtcpPacket(size_t index, | 112 void GetRtcpPacket(size_t index, |
113 PacketDirection* incoming, | 113 PacketDirection* incoming, |
114 uint8_t* packet, | 114 uint8_t* packet, |
115 size_t* length) const; | 115 size_t* length) const; |
116 | 116 |
117 // Reads a config event to a (non-NULL) StreamConfig struct. | 117 // Reads a video receive config event to a StreamConfig struct. |
118 // Only the fields that are stored in the protobuf will be written. | 118 // Only the fields that are stored in the protobuf will be written. |
119 void GetVideoReceiveConfig(size_t index, rtclog::StreamConfig* config) const; | 119 rtclog::StreamConfig GetVideoReceiveConfig(size_t index) const; |
120 | 120 |
121 // Reads a config event to a (non-NULL) StreamConfig struct. | 121 // Reads a video send config event to a StreamConfig struct. If the proto |
| 122 // contains multiple SSRCs and RTX SSRCs (this used to be the case for |
| 123 // simulcast streams) then we return one StreamConfig per SSRC,RTX_SSRC pair. |
122 // Only the fields that are stored in the protobuf will be written. | 124 // Only the fields that are stored in the protobuf will be written. |
123 void GetVideoSendConfig(size_t index, rtclog::StreamConfig* config) const; | 125 std::vector<rtclog::StreamConfig> GetVideoSendConfig(size_t index) const; |
124 | 126 |
125 // Reads a config event to a (non-NULL) StreamConfig struct. | 127 // Reads a audio receive config event to a StreamConfig struct. |
126 // Only the fields that are stored in the protobuf will be written. | 128 // Only the fields that are stored in the protobuf will be written. |
127 void GetAudioReceiveConfig(size_t index, rtclog::StreamConfig* config) const; | 129 rtclog::StreamConfig GetAudioReceiveConfig(size_t index) const; |
128 | 130 |
129 // Reads a config event to a (non-NULL) StreamConfig struct. | 131 // Reads a config event to a StreamConfig struct. |
130 // Only the fields that are stored in the protobuf will be written. | 132 // Only the fields that are stored in the protobuf will be written. |
131 void GetAudioSendConfig(size_t index, rtclog::StreamConfig* config) const; | 133 rtclog::StreamConfig GetAudioSendConfig(size_t index) const; |
132 | 134 |
133 // Reads the SSRC from the audio playout event at |index|. The SSRC is stored | 135 // Reads the SSRC from the audio playout event at |index|. The SSRC is stored |
134 // in the output parameter ssrc. The output parameter can be set to nullptr | 136 // in the output parameter ssrc. The output parameter can be set to nullptr |
135 // and in that case the function only asserts that the event is well formed. | 137 // and in that case the function only asserts that the event is well formed. |
136 void GetAudioPlayout(size_t index, uint32_t* ssrc) const; | 138 void GetAudioPlayout(size_t index, uint32_t* ssrc) const; |
137 | 139 |
138 // Reads bitrate, fraction loss (as defined in RFC 1889) and total number of | 140 // Reads bitrate, fraction loss (as defined in RFC 1889) and total number of |
139 // expected packets from the loss based BWE event at |index| and stores the | 141 // expected packets from the loss based BWE event at |index| and stores the |
140 // values in | 142 // values in |
141 // the corresponding output parameters. Each output parameter can be set to | 143 // the corresponding output parameters. Each output parameter can be set to |
(...skipping 16 matching lines...) Expand all Loading... |
158 void GetAudioNetworkAdaptation(size_t index, | 160 void GetAudioNetworkAdaptation(size_t index, |
159 AudioEncoderRuntimeConfig* config) const; | 161 AudioEncoderRuntimeConfig* config) const; |
160 | 162 |
161 BweProbeClusterCreatedEvent GetBweProbeClusterCreated(size_t index) const; | 163 BweProbeClusterCreatedEvent GetBweProbeClusterCreated(size_t index) const; |
162 | 164 |
163 BweProbeResultEvent GetBweProbeResult(size_t index) const; | 165 BweProbeResultEvent GetBweProbeResult(size_t index) const; |
164 | 166 |
165 MediaType GetMediaType(uint32_t ssrc, PacketDirection direction) const; | 167 MediaType GetMediaType(uint32_t ssrc, PacketDirection direction) const; |
166 | 168 |
167 private: | 169 private: |
168 void GetVideoReceiveConfig(const rtclog::Event& event, | 170 rtclog::StreamConfig GetVideoReceiveConfig(const rtclog::Event& event) const; |
169 rtclog::StreamConfig* config) const; | 171 std::vector<rtclog::StreamConfig> GetVideoSendConfig( |
170 void GetVideoSendConfig(const rtclog::Event& event, | 172 const rtclog::Event& event) const; |
171 rtclog::StreamConfig* config) const; | 173 rtclog::StreamConfig GetAudioReceiveConfig(const rtclog::Event& event) const; |
172 void GetAudioReceiveConfig(const rtclog::Event& event, | 174 rtclog::StreamConfig GetAudioSendConfig(const rtclog::Event& event) const; |
173 rtclog::StreamConfig* config) const; | |
174 void GetAudioSendConfig(const rtclog::Event& event, | |
175 rtclog::StreamConfig* config) const; | |
176 | 175 |
177 std::vector<rtclog::Event> events_; | 176 std::vector<rtclog::Event> events_; |
178 | 177 |
179 struct Stream { | 178 struct Stream { |
180 Stream(uint32_t ssrc, | 179 Stream(uint32_t ssrc, |
181 MediaType media_type, | 180 MediaType media_type, |
182 webrtc::PacketDirection direction) | 181 webrtc::PacketDirection direction) |
183 : ssrc(ssrc), media_type(media_type), direction(direction) {} | 182 : ssrc(ssrc), media_type(media_type), direction(direction) {} |
184 uint32_t ssrc; | 183 uint32_t ssrc; |
185 MediaType media_type; | 184 MediaType media_type; |
186 webrtc::PacketDirection direction; | 185 webrtc::PacketDirection direction; |
187 }; | 186 }; |
188 | 187 |
189 // All configured streams found in the event log. | 188 // All configured streams found in the event log. |
190 std::vector<Stream> streams_; | 189 std::vector<Stream> streams_; |
191 }; | 190 }; |
192 | 191 |
193 } // namespace webrtc | 192 } // namespace webrtc |
194 | 193 |
195 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_ | 194 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_ |
OLD | NEW |