Chromium Code Reviews| Index: content/common/gpu/media/gpu_video_encode_accelerator.cc |
| diff --git a/content/common/gpu/media/gpu_video_encode_accelerator.cc b/content/common/gpu/media/gpu_video_encode_accelerator.cc |
| index 099c456ed812d7b0691af0a9e604da8aa8548620..fe912865137da17a77e56dfb2ea8ba61747178b4 100644 |
| --- a/content/common/gpu/media/gpu_video_encode_accelerator.cc |
| +++ b/content/common/gpu/media/gpu_video_encode_accelerator.cc |
| @@ -17,13 +17,12 @@ |
| #include "media/base/limits.h" |
| #include "media/base/video_frame.h" |
| -#if defined(OS_CHROMEOS) && defined(USE_X11) |
| +#if defined(OS_CHROMEOS) |
| -#if defined(ARCH_CPU_ARMEL) |
| +#if defined(ARCH_CPU_ARMEL) && defined(USE_X11) |
| #include "content/common/gpu/media/v4l2_video_encode_accelerator.h" |
| #elif defined(ARCH_CPU_X86_FAMILY) |
| #include "content/common/gpu/media/vaapi_video_encode_accelerator.h" |
| -#include "ui/gfx/x/x11_types.h" |
| #endif |
| #elif defined(OS_ANDROID) && defined(ENABLE_WEBRTC) |
| @@ -167,8 +166,8 @@ std::vector<media::VideoEncodeAccelerator::SupportedProfile> |
| GpuVideoEncodeAccelerator::GetSupportedProfiles() { |
| std::vector<media::VideoEncodeAccelerator::SupportedProfile> profiles; |
| -#if defined(OS_CHROMEOS) && defined(USE_X11) |
| -#if defined(ARCH_CPU_ARMEL) |
| +#if defined(OS_CHROMEOS) |
| +#if defined(ARCH_CPU_ARMEL) && defined(USE_X11) |
| profiles = V4L2VideoEncodeAccelerator::GetSupportedProfiles(); |
| #elif defined(ARCH_CPU_X86_FAMILY) |
| profiles = VaapiVideoEncodeAccelerator::GetSupportedProfiles(); |
| @@ -183,17 +182,18 @@ GpuVideoEncodeAccelerator::GetSupportedProfiles() { |
| void GpuVideoEncodeAccelerator::CreateEncoder() { |
| DCHECK(!encoder_); |
| -#if defined(OS_CHROMEOS) && defined(USE_X11) |
| -#if defined(ARCH_CPU_ARMEL) |
| +#if defined(OS_CHROMEOS) |
| +#if defined(ARCH_CPU_ARMEL) && defined(USE_X11) |
| scoped_ptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kEncoder); |
| if (!device.get()) |
| return; |
| encoder_.reset(new V4L2VideoEncodeAccelerator(device.Pass())); |
| #elif defined(ARCH_CPU_X86_FAMILY) |
| - const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); |
| + const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
|
spang
2014/08/22 17:20:23
no need to remove base::
|
| if (!cmd_line->HasSwitch(switches::kDisableVaapiAcceleratedVideoEncode)) |
| - encoder_.reset(new VaapiVideoEncodeAccelerator(gfx::GetXDisplay())); |
| + encoder_.reset(new VaapiVideoEncodeAccelerator( |
|
spang
2014/08/22 17:20:23
We'll need to do something here to avoid hitting t
|
| + stub_->decoder()->GetGLContext(), make_context_current_)); |
| #endif |
| #elif defined(OS_ANDROID) && defined(ENABLE_WEBRTC) |
| encoder_.reset(new AndroidVideoEncodeAccelerator()); |