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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 | 384 |
385 thread_checker_.DetachFromThread(); | 385 thread_checker_.DetachFromThread(); |
386 } | 386 } |
387 | 387 |
388 VEAClient::~VEAClient() { CHECK(!has_encoder()); } | 388 VEAClient::~VEAClient() { CHECK(!has_encoder()); } |
389 | 389 |
390 void VEAClient::CreateEncoder() { | 390 void VEAClient::CreateEncoder() { |
391 DCHECK(thread_checker_.CalledOnValidThread()); | 391 DCHECK(thread_checker_.CalledOnValidThread()); |
392 CHECK(!has_encoder()); | 392 CHECK(!has_encoder()); |
393 | 393 |
394 encoder_.reset(new ExynosVideoEncodeAccelerator(this)); | 394 encoder_.reset(new ExynosVideoEncodeAccelerator()); |
395 | 395 |
396 SetState(CS_ENCODER_SET); | 396 SetState(CS_ENCODER_SET); |
397 DVLOG(1) << "Profile: " << test_stream_.requested_profile | 397 DVLOG(1) << "Profile: " << test_stream_.requested_profile |
398 << ", requested bitrate: " << test_stream_.requested_bitrate; | 398 << ", requested bitrate: " << test_stream_.requested_bitrate; |
399 encoder_->Initialize(kInputFormat, | 399 encoder_->Initialize(kInputFormat, |
400 test_stream_.size, | 400 test_stream_.size, |
401 test_stream_.requested_profile, | 401 test_stream_.requested_profile, |
402 test_stream_.requested_bitrate); | 402 test_stream_.requested_bitrate, |
| 403 this); |
403 } | 404 } |
404 | 405 |
405 void VEAClient::DestroyEncoder() { | 406 void VEAClient::DestroyEncoder() { |
406 DCHECK(thread_checker_.CalledOnValidThread()); | 407 DCHECK(thread_checker_.CalledOnValidThread()); |
407 if (!has_encoder()) | 408 if (!has_encoder()) |
408 return; | 409 return; |
409 encoder_.release()->Destroy(); | 410 encoder_.release()->Destroy(); |
410 } | 411 } |
411 | 412 |
412 void VEAClient::NotifyInitializeDone() { | 413 void VEAClient::NotifyInitializeDone() { |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
762 } | 763 } |
763 if (it->first == "v" || it->first == "vmodule") | 764 if (it->first == "v" || it->first == "vmodule") |
764 continue; | 765 continue; |
765 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; | 766 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; |
766 } | 767 } |
767 | 768 |
768 base::ShadowingAtExitManager at_exit_manager; | 769 base::ShadowingAtExitManager at_exit_manager; |
769 | 770 |
770 return RUN_ALL_TESTS(); | 771 return RUN_ALL_TESTS(); |
771 } | 772 } |
OLD | NEW |