| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/at_exit.h" | 5 #include "base/at_exit.h" |
| 6 #include "base/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/files/memory_mapped_file.h" | 9 #include "base/files/memory_mapped_file.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 | 577 |
| 578 SetStreamParameters(test_stream_.requested_bitrate, | 578 SetStreamParameters(test_stream_.requested_bitrate, |
| 579 test_stream_.requested_framerate); | 579 test_stream_.requested_framerate); |
| 580 SetState(CS_INITIALIZED); | 580 SetState(CS_INITIALIZED); |
| 581 } | 581 } |
| 582 | 582 |
| 583 void VEAClient::DestroyEncoder() { | 583 void VEAClient::DestroyEncoder() { |
| 584 DCHECK(thread_checker_.CalledOnValidThread()); | 584 DCHECK(thread_checker_.CalledOnValidThread()); |
| 585 if (!has_encoder()) | 585 if (!has_encoder()) |
| 586 return; | 586 return; |
| 587 encoder_.release()->Destroy(); | 587 encoder_.reset(); |
| 588 } | 588 } |
| 589 | 589 |
| 590 double VEAClient::frames_per_second() { | 590 double VEAClient::frames_per_second() { |
| 591 base::TimeDelta duration = last_frame_ready_time_ - encode_start_time_; | 591 base::TimeDelta duration = last_frame_ready_time_ - encode_start_time_; |
| 592 return num_encoded_frames_ / duration.InSecondsF(); | 592 return num_encoded_frames_ / duration.InSecondsF(); |
| 593 } | 593 } |
| 594 | 594 |
| 595 void VEAClient::RequireBitstreamBuffers(unsigned int input_count, | 595 void VEAClient::RequireBitstreamBuffers(unsigned int input_count, |
| 596 const gfx::Size& input_coded_size, | 596 const gfx::Size& input_coded_size, |
| 597 size_t output_size) { | 597 size_t output_size) { |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1018 test_stream_data->assign(it->second.c_str()); | 1018 test_stream_data->assign(it->second.c_str()); |
| 1019 continue; | 1019 continue; |
| 1020 } | 1020 } |
| 1021 if (it->first == "v" || it->first == "vmodule") | 1021 if (it->first == "v" || it->first == "vmodule") |
| 1022 continue; | 1022 continue; |
| 1023 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; | 1023 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; |
| 1024 } | 1024 } |
| 1025 | 1025 |
| 1026 return RUN_ALL_TESTS(); | 1026 return RUN_ALL_TESTS(); |
| 1027 } | 1027 } |
| OLD | NEW |