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/files/file_util.h" | 8 #include "base/files/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 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 UpdateTestStreamData(mid_stream_bitrate_switch, mid_stream_framerate_switch); | 787 UpdateTestStreamData(mid_stream_bitrate_switch, mid_stream_framerate_switch); |
788 | 788 |
789 thread_checker_.DetachFromThread(); | 789 thread_checker_.DetachFromThread(); |
790 } | 790 } |
791 | 791 |
792 VEAClient::~VEAClient() { CHECK(!has_encoder()); } | 792 VEAClient::~VEAClient() { CHECK(!has_encoder()); } |
793 | 793 |
794 scoped_ptr<media::VideoEncodeAccelerator> VEAClient::CreateFakeVEA() { | 794 scoped_ptr<media::VideoEncodeAccelerator> VEAClient::CreateFakeVEA() { |
795 scoped_ptr<media::VideoEncodeAccelerator> encoder; | 795 scoped_ptr<media::VideoEncodeAccelerator> encoder; |
796 if (g_fake_encoder) { | 796 if (g_fake_encoder) { |
797 encoder.reset( | 797 encoder.reset(new media::FakeVideoEncodeAccelerator( |
798 new media::FakeVideoEncodeAccelerator( | 798 scoped_refptr<base::SingleThreadTaskRunner>( |
799 scoped_refptr<base::SingleThreadTaskRunner>( | 799 base::ThreadTaskRunnerHandle::Get()))); |
800 base::MessageLoopProxy::current()))); | |
801 } | 800 } |
802 return encoder.Pass(); | 801 return encoder.Pass(); |
803 } | 802 } |
804 | 803 |
805 scoped_ptr<media::VideoEncodeAccelerator> VEAClient::CreateV4L2VEA() { | 804 scoped_ptr<media::VideoEncodeAccelerator> VEAClient::CreateV4L2VEA() { |
806 scoped_ptr<media::VideoEncodeAccelerator> encoder; | 805 scoped_ptr<media::VideoEncodeAccelerator> encoder; |
807 #if defined(OS_CHROMEOS) && (defined(ARCH_CPU_ARMEL) || \ | 806 #if defined(OS_CHROMEOS) && (defined(ARCH_CPU_ARMEL) || \ |
808 (defined(USE_OZONE) && defined(USE_V4L2_CODEC))) | 807 (defined(USE_OZONE) && defined(USE_V4L2_CODEC))) |
809 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kEncoder); | 808 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kEncoder); |
810 if (device) | 809 if (device) |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1432 } | 1431 } |
1433 | 1432 |
1434 content::g_env = | 1433 content::g_env = |
1435 reinterpret_cast<content::VideoEncodeAcceleratorTestEnvironment*>( | 1434 reinterpret_cast<content::VideoEncodeAcceleratorTestEnvironment*>( |
1436 testing::AddGlobalTestEnvironment( | 1435 testing::AddGlobalTestEnvironment( |
1437 new content::VideoEncodeAcceleratorTestEnvironment( | 1436 new content::VideoEncodeAcceleratorTestEnvironment( |
1438 test_stream_data.Pass(), log_path, run_at_fps))); | 1437 test_stream_data.Pass(), log_path, run_at_fps))); |
1439 | 1438 |
1440 return RUN_ALL_TESTS(); | 1439 return RUN_ALL_TESTS(); |
1441 } | 1440 } |
OLD | NEW |