Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Side by Side Diff: webrtc/video/video_quality_test.cc

Issue 2443123002: Delete ShallowCopy, in favor of copy construction and assignment. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 it = encoded_frame_sizes_.find(reference_timestamp - 1); 476 it = encoded_frame_sizes_.find(reference_timestamp - 1);
477 size_t encoded_size = it == encoded_frame_sizes_.end() ? 0 : it->second; 477 size_t encoded_size = it == encoded_frame_sizes_.end() ? 0 : it->second;
478 if (it != encoded_frame_sizes_.end()) 478 if (it != encoded_frame_sizes_.end())
479 encoded_frame_sizes_.erase(it); 479 encoded_frame_sizes_.erase(it);
480 480
481 VideoFrame reference_copy; 481 VideoFrame reference_copy;
482 VideoFrame render_copy; 482 VideoFrame render_copy;
483 483
484 rtc::CritScope crit(&comparison_lock_); 484 rtc::CritScope crit(&comparison_lock_);
485 if (comparisons_.size() < kMaxComparisons) { 485 if (comparisons_.size() < kMaxComparisons) {
486 reference_copy.ShallowCopy(reference); 486 reference_copy = reference;
487 render_copy.ShallowCopy(render); 487 render_copy = render;
488 } else { 488 } else {
489 // Copy the time to ensure that delay calculations can still be made. 489 // Copy the time to ensure that delay calculations can still be made.
490 reference_copy.set_ntp_time_ms(reference.ntp_time_ms()); 490 reference_copy.set_ntp_time_ms(reference.ntp_time_ms());
491 render_copy.set_ntp_time_ms(render.ntp_time_ms()); 491 render_copy.set_ntp_time_ms(render.ntp_time_ms());
492 } 492 }
493 comparisons_.push_back(FrameComparison(reference_copy, render_copy, dropped, 493 comparisons_.push_back(FrameComparison(reference_copy, render_copy, dropped,
494 send_time_ms, recv_time_ms, 494 send_time_ms, recv_time_ms,
495 render_time_ms, encoded_size)); 495 render_time_ms, encoded_size));
496 comparison_available_event_.Set(); 496 comparison_available_event_.Set();
497 } 497 }
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
1419 std::ostringstream str; 1419 std::ostringstream str;
1420 str << receive_logs_++; 1420 str << receive_logs_++;
1421 std::string path = 1421 std::string path =
1422 params_.common.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; 1422 params_.common.encoded_frame_base_path + "." + str.str() + ".recv.ivf";
1423 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), 1423 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path),
1424 10000000); 1424 10000000);
1425 } 1425 }
1426 } 1426 }
1427 1427
1428 } // namespace webrtc 1428 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698