OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 #include "webrtc/video/video_quality_test.h" | 10 #include "webrtc/video/video_quality_test.h" |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 it = encoded_frame_sizes_.find(reference_timestamp - 1); | 475 it = encoded_frame_sizes_.find(reference_timestamp - 1); |
476 size_t encoded_size = it == encoded_frame_sizes_.end() ? 0 : it->second; | 476 size_t encoded_size = it == encoded_frame_sizes_.end() ? 0 : it->second; |
477 if (it != encoded_frame_sizes_.end()) | 477 if (it != encoded_frame_sizes_.end()) |
478 encoded_frame_sizes_.erase(it); | 478 encoded_frame_sizes_.erase(it); |
479 | 479 |
480 VideoFrame reference_copy; | 480 VideoFrame reference_copy; |
481 VideoFrame render_copy; | 481 VideoFrame render_copy; |
482 | 482 |
483 rtc::CritScope crit(&comparison_lock_); | 483 rtc::CritScope crit(&comparison_lock_); |
484 if (comparisons_.size() < kMaxComparisons) { | 484 if (comparisons_.size() < kMaxComparisons) { |
485 reference_copy.CopyFrame(reference); | 485 reference_copy.ShallowCopy(reference); |
486 render_copy.CopyFrame(render); | 486 render_copy.ShallowCopy(render); |
487 } else { | 487 } else { |
488 // Copy the time to ensure that delay calculations can still be made. | 488 // Copy the time to ensure that delay calculations can still be made. |
489 reference_copy.set_ntp_time_ms(reference.ntp_time_ms()); | 489 reference_copy.set_ntp_time_ms(reference.ntp_time_ms()); |
490 render_copy.set_ntp_time_ms(render.ntp_time_ms()); | 490 render_copy.set_ntp_time_ms(render.ntp_time_ms()); |
491 } | 491 } |
492 comparisons_.push_back(FrameComparison(reference_copy, render_copy, dropped, | 492 comparisons_.push_back(FrameComparison(reference_copy, render_copy, dropped, |
493 send_time_ms, recv_time_ms, | 493 send_time_ms, recv_time_ms, |
494 render_time_ms, encoded_size)); | 494 render_time_ms, encoded_size)); |
495 comparison_available_event_.Set(); | 495 comparison_available_event_.Set(); |
496 } | 496 } |
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1416 std::ostringstream str; | 1416 std::ostringstream str; |
1417 str << receive_logs_++; | 1417 str << receive_logs_++; |
1418 std::string path = | 1418 std::string path = |
1419 params_.common.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; | 1419 params_.common.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; |
1420 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), | 1420 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), |
1421 10000000); | 1421 10000000); |
1422 } | 1422 } |
1423 } | 1423 } |
1424 | 1424 |
1425 } // namespace webrtc | 1425 } // namespace webrtc |
OLD | NEW |