| 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 13 matching lines...) Expand all Loading... |
| 24 #include "media/video/fake_video_encode_accelerator.h" | 24 #include "media/video/fake_video_encode_accelerator.h" |
| 25 #include "media/video/video_encode_accelerator.h" | 25 #include "media/video/video_encode_accelerator.h" |
| 26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
| 27 | 27 |
| 28 #if defined(OS_CHROMEOS) | 28 #if defined(OS_CHROMEOS) |
| 29 #if defined(ARCH_CPU_ARMEL) || (defined(USE_OZONE) && defined(USE_V4L2_CODEC)) | 29 #if defined(ARCH_CPU_ARMEL) || (defined(USE_OZONE) && defined(USE_V4L2_CODEC)) |
| 30 #include "content/common/gpu/media/v4l2_video_encode_accelerator.h" | 30 #include "content/common/gpu/media/v4l2_video_encode_accelerator.h" |
| 31 #endif | 31 #endif |
| 32 #if defined(ARCH_CPU_X86_FAMILY) | 32 #if defined(ARCH_CPU_X86_FAMILY) |
| 33 #include "content/common/gpu/media/vaapi_video_encode_accelerator.h" | 33 #include "content/common/gpu/media/vaapi_video_encode_accelerator.h" |
| 34 #include "content/common/gpu/media/vaapi_wrapper.h" |
| 34 #endif // defined(ARCH_CPU_X86_FAMILY) | 35 #endif // defined(ARCH_CPU_X86_FAMILY) |
| 35 #else | 36 #else |
| 36 #error The VideoEncodeAcceleratorUnittest is not supported on this platform. | 37 #error The VideoEncodeAcceleratorUnittest is not supported on this platform. |
| 37 #endif | 38 #endif |
| 38 | 39 |
| 39 using media::VideoEncodeAccelerator; | 40 using media::VideoEncodeAccelerator; |
| 40 | 41 |
| 41 namespace content { | 42 namespace content { |
| 42 namespace { | 43 namespace { |
| 43 | 44 |
| (...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1424 run_at_fps = true; | 1425 run_at_fps = true; |
| 1425 continue; | 1426 continue; |
| 1426 } | 1427 } |
| 1427 if (it->first == "v" || it->first == "vmodule") | 1428 if (it->first == "v" || it->first == "vmodule") |
| 1428 continue; | 1429 continue; |
| 1429 if (it->first == "ozone-platform" || it->first == "ozone-use-surfaceless") | 1430 if (it->first == "ozone-platform" || it->first == "ozone-use-surfaceless") |
| 1430 continue; | 1431 continue; |
| 1431 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; | 1432 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; |
| 1432 } | 1433 } |
| 1433 | 1434 |
| 1435 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) |
| 1436 content::VaapiWrapper::PreSandboxInitialization(); |
| 1437 #endif |
| 1438 |
| 1434 content::g_env = | 1439 content::g_env = |
| 1435 reinterpret_cast<content::VideoEncodeAcceleratorTestEnvironment*>( | 1440 reinterpret_cast<content::VideoEncodeAcceleratorTestEnvironment*>( |
| 1436 testing::AddGlobalTestEnvironment( | 1441 testing::AddGlobalTestEnvironment( |
| 1437 new content::VideoEncodeAcceleratorTestEnvironment( | 1442 new content::VideoEncodeAcceleratorTestEnvironment( |
| 1438 test_stream_data.Pass(), log_path, run_at_fps))); | 1443 test_stream_data.Pass(), log_path, run_at_fps))); |
| 1439 | 1444 |
| 1440 return RUN_ALL_TESTS(); | 1445 return RUN_ALL_TESTS(); |
| 1441 } | 1446 } |
| OLD | NEW |