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 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 | 731 |
732 thread_checker_.DetachFromThread(); | 732 thread_checker_.DetachFromThread(); |
733 } | 733 } |
734 | 734 |
735 VEAClient::~VEAClient() { CHECK(!has_encoder()); } | 735 VEAClient::~VEAClient() { CHECK(!has_encoder()); } |
736 | 736 |
737 scoped_ptr<media::VideoEncodeAccelerator> VEAClient::CreateV4L2VEA() { | 737 scoped_ptr<media::VideoEncodeAccelerator> VEAClient::CreateV4L2VEA() { |
738 scoped_ptr<media::VideoEncodeAccelerator> encoder; | 738 scoped_ptr<media::VideoEncodeAccelerator> encoder; |
739 #if defined(OS_CHROMEOS) && (defined(ARCH_CPU_ARMEL) || \ | 739 #if defined(OS_CHROMEOS) && (defined(ARCH_CPU_ARMEL) || \ |
740 (defined(USE_OZONE) && defined(USE_V4L2_CODEC))) | 740 (defined(USE_OZONE) && defined(USE_V4L2_CODEC))) |
741 scoped_ptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kEncoder); | 741 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kEncoder); |
742 if (device) | 742 if (device) |
743 encoder.reset(new V4L2VideoEncodeAccelerator(device.Pass())); | 743 encoder.reset(new V4L2VideoEncodeAccelerator(device)); |
744 #endif | 744 #endif |
745 return encoder.Pass(); | 745 return encoder.Pass(); |
746 } | 746 } |
747 | 747 |
748 scoped_ptr<media::VideoEncodeAccelerator> VEAClient::CreateVaapiVEA() { | 748 scoped_ptr<media::VideoEncodeAccelerator> VEAClient::CreateVaapiVEA() { |
749 scoped_ptr<media::VideoEncodeAccelerator> encoder; | 749 scoped_ptr<media::VideoEncodeAccelerator> encoder; |
750 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) | 750 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) |
751 encoder.reset(new VaapiVideoEncodeAccelerator()); | 751 encoder.reset(new VaapiVideoEncodeAccelerator()); |
752 #endif | 752 #endif |
753 return encoder.Pass(); | 753 return encoder.Pass(); |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1364 } | 1364 } |
1365 | 1365 |
1366 content::g_env = | 1366 content::g_env = |
1367 reinterpret_cast<content::VideoEncodeAcceleratorTestEnvironment*>( | 1367 reinterpret_cast<content::VideoEncodeAcceleratorTestEnvironment*>( |
1368 testing::AddGlobalTestEnvironment( | 1368 testing::AddGlobalTestEnvironment( |
1369 new content::VideoEncodeAcceleratorTestEnvironment( | 1369 new content::VideoEncodeAcceleratorTestEnvironment( |
1370 test_stream_data.Pass(), run_at_fps))); | 1370 test_stream_data.Pass(), run_at_fps))); |
1371 | 1371 |
1372 return RUN_ALL_TESTS(); | 1372 return RUN_ALL_TESTS(); |
1373 } | 1373 } |
OLD | NEW |