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 | 10 |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 event_type != ParsedRtcEventLog::AUDIO_SENDER_CONFIG_EVENT && | 324 event_type != ParsedRtcEventLog::AUDIO_SENDER_CONFIG_EVENT && |
325 event_type != ParsedRtcEventLog::LOG_START && | 325 event_type != ParsedRtcEventLog::LOG_START && |
326 event_type != ParsedRtcEventLog::LOG_END) { | 326 event_type != ParsedRtcEventLog::LOG_END) { |
327 uint64_t timestamp = parsed_log_.GetTimestamp(i); | 327 uint64_t timestamp = parsed_log_.GetTimestamp(i); |
328 first_timestamp = std::min(first_timestamp, timestamp); | 328 first_timestamp = std::min(first_timestamp, timestamp); |
329 last_timestamp = std::max(last_timestamp, timestamp); | 329 last_timestamp = std::max(last_timestamp, timestamp); |
330 } | 330 } |
331 | 331 |
332 switch (parsed_log_.GetEventType(i)) { | 332 switch (parsed_log_.GetEventType(i)) { |
333 case ParsedRtcEventLog::VIDEO_RECEIVER_CONFIG_EVENT: { | 333 case ParsedRtcEventLog::VIDEO_RECEIVER_CONFIG_EVENT: { |
334 rtclog::StreamConfig config; | 334 rtclog::StreamConfig config = parsed_log_.GetVideoReceiveConfig(i); |
335 parsed_log_.GetVideoReceiveConfig(i, &config); | |
336 StreamId stream(config.remote_ssrc, kIncomingPacket); | 335 StreamId stream(config.remote_ssrc, kIncomingPacket); |
337 extension_maps[stream] = RtpHeaderExtensionMap(config.rtp_extensions); | 336 extension_maps[stream] = RtpHeaderExtensionMap(config.rtp_extensions); |
338 video_ssrcs_.insert(stream); | 337 video_ssrcs_.insert(stream); |
339 StreamId rtx_stream(config.rtx_ssrc, kIncomingPacket); | 338 StreamId rtx_stream(config.rtx_ssrc, kIncomingPacket); |
340 extension_maps[rtx_stream] = | 339 extension_maps[rtx_stream] = |
341 RtpHeaderExtensionMap(config.rtp_extensions); | 340 RtpHeaderExtensionMap(config.rtp_extensions); |
342 video_ssrcs_.insert(rtx_stream); | 341 video_ssrcs_.insert(rtx_stream); |
343 rtx_ssrcs_.insert(rtx_stream); | 342 rtx_ssrcs_.insert(rtx_stream); |
344 break; | 343 break; |
345 } | 344 } |
346 case ParsedRtcEventLog::VIDEO_SENDER_CONFIG_EVENT: { | 345 case ParsedRtcEventLog::VIDEO_SENDER_CONFIG_EVENT: { |
347 rtclog::StreamConfig config; | 346 std::vector<rtclog::StreamConfig> configs = |
348 parsed_log_.GetVideoSendConfig(i, &config); | 347 parsed_log_.GetVideoSendConfig(i); |
349 StreamId stream(config.local_ssrc, kOutgoingPacket); | 348 for (size_t j = 0; j < configs.size(); j++) { |
350 extension_maps[stream] = RtpHeaderExtensionMap(config.rtp_extensions); | 349 StreamId stream(configs[i].local_ssrc, kOutgoingPacket); |
351 video_ssrcs_.insert(stream); | 350 extension_maps[stream] = |
352 StreamId rtx_stream(config.rtx_ssrc, kOutgoingPacket); | 351 RtpHeaderExtensionMap(configs[i].rtp_extensions); |
353 extension_maps[rtx_stream] = | 352 video_ssrcs_.insert(stream); |
354 RtpHeaderExtensionMap(config.rtp_extensions); | 353 StreamId rtx_stream(configs[i].rtx_ssrc, kOutgoingPacket); |
355 video_ssrcs_.insert(rtx_stream); | 354 extension_maps[rtx_stream] = |
356 rtx_ssrcs_.insert(rtx_stream); | 355 RtpHeaderExtensionMap(configs[i].rtp_extensions); |
| 356 video_ssrcs_.insert(rtx_stream); |
| 357 rtx_ssrcs_.insert(rtx_stream); |
| 358 } |
357 break; | 359 break; |
358 } | 360 } |
359 case ParsedRtcEventLog::AUDIO_RECEIVER_CONFIG_EVENT: { | 361 case ParsedRtcEventLog::AUDIO_RECEIVER_CONFIG_EVENT: { |
360 rtclog::StreamConfig config; | 362 rtclog::StreamConfig config = parsed_log_.GetAudioReceiveConfig(i); |
361 parsed_log_.GetAudioReceiveConfig(i, &config); | |
362 StreamId stream(config.remote_ssrc, kIncomingPacket); | 363 StreamId stream(config.remote_ssrc, kIncomingPacket); |
363 extension_maps[stream] = RtpHeaderExtensionMap(config.rtp_extensions); | 364 extension_maps[stream] = RtpHeaderExtensionMap(config.rtp_extensions); |
364 audio_ssrcs_.insert(stream); | 365 audio_ssrcs_.insert(stream); |
365 break; | 366 break; |
366 } | 367 } |
367 case ParsedRtcEventLog::AUDIO_SENDER_CONFIG_EVENT: { | 368 case ParsedRtcEventLog::AUDIO_SENDER_CONFIG_EVENT: { |
368 rtclog::StreamConfig config; | 369 rtclog::StreamConfig config = parsed_log_.GetAudioSendConfig(i); |
369 parsed_log_.GetAudioSendConfig(i, &config); | |
370 StreamId stream(config.local_ssrc, kOutgoingPacket); | 370 StreamId stream(config.local_ssrc, kOutgoingPacket); |
371 extension_maps[stream] = RtpHeaderExtensionMap(config.rtp_extensions); | 371 extension_maps[stream] = RtpHeaderExtensionMap(config.rtp_extensions); |
372 audio_ssrcs_.insert(stream); | 372 audio_ssrcs_.insert(stream); |
373 break; | 373 break; |
374 } | 374 } |
375 case ParsedRtcEventLog::RTP_EVENT: { | 375 case ParsedRtcEventLog::RTP_EVENT: { |
376 parsed_log_.GetRtpHeader(i, &direction, header, &header_length, | 376 parsed_log_.GetRtpHeader(i, &direction, header, &header_length, |
377 &total_length); | 377 &total_length); |
378 // Parse header to get SSRC. | 378 // Parse header to get SSRC. |
379 RtpUtility::RtpHeaderParser rtp_parser(header, header_length); | 379 RtpUtility::RtpHeaderParser rtp_parser(header, header_length); |
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1391 }, | 1391 }, |
1392 audio_network_adaptation_events_, begin_time_, &time_series); | 1392 audio_network_adaptation_events_, begin_time_, &time_series); |
1393 plot->AppendTimeSeries(std::move(time_series)); | 1393 plot->AppendTimeSeries(std::move(time_series)); |
1394 plot->SetXAxis(0, call_duration_s_, "Time (s)", kLeftMargin, kRightMargin); | 1394 plot->SetXAxis(0, call_duration_s_, "Time (s)", kLeftMargin, kRightMargin); |
1395 plot->SetSuggestedYAxis(0, 1, "Number of channels (1 (mono)/2 (stereo))", | 1395 plot->SetSuggestedYAxis(0, 1, "Number of channels (1 (mono)/2 (stereo))", |
1396 kBottomMargin, kTopMargin); | 1396 kBottomMargin, kTopMargin); |
1397 plot->SetTitle("Reported audio encoder number of channels"); | 1397 plot->SetTitle("Reported audio encoder number of channels"); |
1398 } | 1398 } |
1399 } // namespace plotting | 1399 } // namespace plotting |
1400 } // namespace webrtc | 1400 } // namespace webrtc |
OLD | NEW |