Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // The bulk of this file is support code; sorry about that. Here's an overview | 5 // The bulk of this file is support code; sorry about that. Here's an overview |
| 6 // to hopefully help readers of this code: | 6 // to hopefully help readers of this code: |
| 7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or | 7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or |
| 8 // Win/EGL. | 8 // Win/EGL. |
| 9 // - ClientState is an enum for the state of the decode client used by the test. | 9 // - ClientState is an enum for the state of the decode client used by the test. |
| 10 // - ClientStateNotification is a barrier abstraction that allows the test code | 10 // - ClientStateNotification is a barrier abstraction that allows the test code |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 #include "content/common/gpu/media/rendering_helper.h" | 50 #include "content/common/gpu/media/rendering_helper.h" |
| 51 #include "content/common/gpu/media/video_accelerator_unittest_helpers.h" | 51 #include "content/common/gpu/media/video_accelerator_unittest_helpers.h" |
| 52 #include "content/public/common/content_switches.h" | 52 #include "content/public/common/content_switches.h" |
| 53 #include "media/filters/h264_parser.h" | 53 #include "media/filters/h264_parser.h" |
| 54 #include "ui/gfx/codec/png_codec.h" | 54 #include "ui/gfx/codec/png_codec.h" |
| 55 | 55 |
| 56 #if defined(OS_WIN) | 56 #if defined(OS_WIN) |
| 57 #include "base/win/windows_version.h" | 57 #include "base/win/windows_version.h" |
| 58 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" | 58 #include "content/common/gpu/media/dxva_video_decode_accelerator.h" |
| 59 #elif defined(OS_CHROMEOS) | 59 #elif defined(OS_CHROMEOS) |
| 60 #if defined(ARCH_CPU_ARMEL) && defined(USE_LIBV4L2) | |
| 61 #include "content/common/gpu/media/v4l2_slice_video_decode_accelerator.h" | |
| 62 #endif // defined(ARCH_CPU_ARMEL) | |
| 63 #if defined(ARCH_CPU_ARMEL) || (defined(USE_OZONE) && defined(USE_V4L2_CODEC)) | 60 #if defined(ARCH_CPU_ARMEL) || (defined(USE_OZONE) && defined(USE_V4L2_CODEC)) |
| 64 #include "content/common/gpu/media/v4l2_video_decode_accelerator.h" | 61 #include "content/common/gpu/media/v4l2_video_decode_accelerator.h" |
| 65 #include "content/common/gpu/media/v4l2_video_device.h" | 62 #include "content/common/gpu/media/v4l2_video_device.h" |
| 63 #include "content/common/gpu/media/v4l2_slice_video_decode_accelerator.h" | |
|
Pawel Osciak
2015/01/22 08:30:02
Order please.
henryhsu
2015/01/22 09:09:09
Done.
| |
| 66 #endif | 64 #endif |
| 67 #if defined(ARCH_CPU_X86_FAMILY) | 65 #if defined(ARCH_CPU_X86_FAMILY) |
| 68 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h" | 66 #include "content/common/gpu/media/vaapi_video_decode_accelerator.h" |
| 69 #include "content/common/gpu/media/vaapi_wrapper.h" | 67 #include "content/common/gpu/media/vaapi_wrapper.h" |
| 70 #endif // defined(ARCH_CPU_X86_FAMILY) | 68 #endif // defined(ARCH_CPU_X86_FAMILY) |
| 71 #else | 69 #else |
| 72 #error The VideoAccelerator tests are not supported on this platform. | 70 #error The VideoAccelerator tests are not supported on this platform. |
| 73 #endif // OS_WIN | 71 #endif // OS_WIN |
| 74 | 72 |
| 75 using media::VideoDecodeAccelerator; | 73 using media::VideoDecodeAccelerator; |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 457 device, | 455 device, |
| 458 base::MessageLoopProxy::current())); | 456 base::MessageLoopProxy::current())); |
| 459 } | 457 } |
| 460 #endif | 458 #endif |
| 461 return decoder.Pass(); | 459 return decoder.Pass(); |
| 462 } | 460 } |
| 463 | 461 |
| 464 scoped_ptr<media::VideoDecodeAccelerator> | 462 scoped_ptr<media::VideoDecodeAccelerator> |
| 465 GLRenderingVDAClient::CreateV4L2SliceVDA() { | 463 GLRenderingVDAClient::CreateV4L2SliceVDA() { |
| 466 scoped_ptr<media::VideoDecodeAccelerator> decoder; | 464 scoped_ptr<media::VideoDecodeAccelerator> decoder; |
| 467 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_LIBV4L2) | 465 #if defined(OS_CHROMEOS) && (defined(ARCH_CPU_ARMEL) || \ |
| 466 (defined(USE_OZONE) && defined(USE_V4L2_CODEC))) | |
| 468 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); | 467 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); |
| 469 if (device.get()) { | 468 if (device.get()) { |
| 470 base::WeakPtr<VideoDecodeAccelerator::Client> weak_client = AsWeakPtr(); | 469 base::WeakPtr<VideoDecodeAccelerator::Client> weak_client = AsWeakPtr(); |
| 471 decoder.reset(new V4L2SliceVideoDecodeAccelerator( | 470 decoder.reset(new V4L2SliceVideoDecodeAccelerator( |
| 472 device, | 471 device, |
| 473 static_cast<EGLDisplay>(rendering_helper_->GetGLDisplay()), | 472 static_cast<EGLDisplay>(rendering_helper_->GetGLDisplay()), |
| 474 static_cast<EGLContext>(rendering_helper_->GetGLContextHandle()), | 473 static_cast<EGLContext>(rendering_helper_->GetGLContextHandle()), |
| 475 weak_client, | 474 weak_client, |
| 476 base::Bind(&DoNothingReturnTrue), | 475 base::Bind(&DoNothingReturnTrue), |
| 477 base::MessageLoopProxy::current())); | 476 base::MessageLoopProxy::current())); |
| (...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1545 if (it->first == "ozone-platform" || it->first == "ozone-use-surfaceless") | 1544 if (it->first == "ozone-platform" || it->first == "ozone-use-surfaceless") |
| 1546 continue; | 1545 continue; |
| 1547 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; | 1546 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; |
| 1548 } | 1547 } |
| 1549 | 1548 |
| 1550 base::ShadowingAtExitManager at_exit_manager; | 1549 base::ShadowingAtExitManager at_exit_manager; |
| 1551 content::RenderingHelper::InitializeOneOff(); | 1550 content::RenderingHelper::InitializeOneOff(); |
| 1552 | 1551 |
| 1553 return RUN_ALL_TESTS(); | 1552 return RUN_ALL_TESTS(); |
| 1554 } | 1553 } |
| OLD | NEW |