| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 virtual void Estimate(int64_t time_ms, uint32_t estimate_bps) { | 67 virtual void Estimate(int64_t time_ms, uint32_t estimate_bps) { |
| 68 if (reader_.get()) { | 68 if (reader_.get()) { |
| 69 uint32_t read_ms = 0; | 69 uint32_t read_ms = 0; |
| 70 uint32_t read_bps = 0; | 70 uint32_t read_bps = 0; |
| 71 if (reader_->Read(&read_ms) && read_ms == time_ms && | 71 if (reader_->Read(&read_ms) && read_ms == time_ms && |
| 72 reader_->Read(&read_bps) && read_bps == estimate_bps) { | 72 reader_->Read(&read_bps) && read_bps == estimate_bps) { |
| 73 } else { | 73 } else { |
| 74 printf("ERROR: Baseline differs starting at: %d ms (%d vs %d)!\n", | 74 printf("ERROR: Baseline differs starting at: %d ms (%d vs %d)!\n", |
| 75 static_cast<uint32_t>(time_ms), estimate_bps, read_bps); | 75 static_cast<uint32_t>(time_ms), estimate_bps, read_bps); |
| 76 reader_.reset(NULL); | 76 reader_.reset(nullptr); |
| 77 } | 77 } |
| 78 } | 78 } |
| 79 } | 79 } |
| 80 | 80 |
| 81 virtual bool VerifyOrWrite() { | 81 virtual bool VerifyOrWrite() { |
| 82 if (reader_.get()) { | 82 if (reader_.get()) { |
| 83 if (reader_->IsAtEnd()) { | 83 if (reader_->IsAtEnd()) { |
| 84 return true; | 84 return true; |
| 85 } else { | 85 } else { |
| 86 printf("ERROR: Baseline file contains more data!\n"); | 86 printf("ERROR: Baseline file contains more data!\n"); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 result.reset(new BaseLineFileVerify(filepath, !write_output_file)); | 159 result.reset(new BaseLineFileVerify(filepath, !write_output_file)); |
| 160 if (write_output_file) { | 160 if (write_output_file) { |
| 161 // Takes ownership of the |verifier| instance. | 161 // Takes ownership of the |verifier| instance. |
| 162 result.reset(new BaseLineFileUpdate(filepath, result.release())); | 162 result.reset(new BaseLineFileUpdate(filepath, result.release())); |
| 163 } | 163 } |
| 164 return result.release(); | 164 return result.release(); |
| 165 } | 165 } |
| 166 } // namespace bwe | 166 } // namespace bwe |
| 167 } // namespace testing | 167 } // namespace testing |
| 168 } // namespace webrtc | 168 } // namespace webrtc |
| OLD | NEW |