| 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 "content/common/gpu/media/gpu_video_encode_accelerator.h" | 5 #include "content/common/gpu/media/gpu_video_encode_accelerator.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 create_vea_fps.push_back(&GpuVideoEncodeAccelerator::CreateAndroidVEA); | 207 create_vea_fps.push_back(&GpuVideoEncodeAccelerator::CreateAndroidVEA); |
| 208 return create_vea_fps; | 208 return create_vea_fps; |
| 209 } | 209 } |
| 210 | 210 |
| 211 // static | 211 // static |
| 212 scoped_ptr<media::VideoEncodeAccelerator> | 212 scoped_ptr<media::VideoEncodeAccelerator> |
| 213 GpuVideoEncodeAccelerator::CreateV4L2VEA() { | 213 GpuVideoEncodeAccelerator::CreateV4L2VEA() { |
| 214 scoped_ptr<media::VideoEncodeAccelerator> encoder; | 214 scoped_ptr<media::VideoEncodeAccelerator> encoder; |
| 215 #if defined(OS_CHROMEOS) && (defined(ARCH_CPU_ARMEL) || \ | 215 #if defined(OS_CHROMEOS) && (defined(ARCH_CPU_ARMEL) || \ |
| 216 (defined(USE_OZONE) && defined(USE_V4L2_CODEC))) | 216 (defined(USE_OZONE) && defined(USE_V4L2_CODEC))) |
| 217 scoped_refptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kEncoder); | 217 scoped_ptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kEncoder); |
| 218 if (device) | 218 if (device) |
| 219 encoder.reset(new V4L2VideoEncodeAccelerator(device)); | 219 encoder.reset(new V4L2VideoEncodeAccelerator(device.Pass())); |
| 220 #endif | 220 #endif |
| 221 return encoder.Pass(); | 221 return encoder.Pass(); |
| 222 } | 222 } |
| 223 | 223 |
| 224 // static | 224 // static |
| 225 scoped_ptr<media::VideoEncodeAccelerator> | 225 scoped_ptr<media::VideoEncodeAccelerator> |
| 226 GpuVideoEncodeAccelerator::CreateVaapiVEA() { | 226 GpuVideoEncodeAccelerator::CreateVaapiVEA() { |
| 227 scoped_ptr<media::VideoEncodeAccelerator> encoder; | 227 scoped_ptr<media::VideoEncodeAccelerator> encoder; |
| 228 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) | 228 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) |
| 229 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); | 229 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 stub_->channel()->Send(message); | 351 stub_->channel()->Send(message); |
| 352 } | 352 } |
| 353 | 353 |
| 354 void GpuVideoEncodeAccelerator::SendCreateEncoderReply(IPC::Message* message, | 354 void GpuVideoEncodeAccelerator::SendCreateEncoderReply(IPC::Message* message, |
| 355 bool succeeded) { | 355 bool succeeded) { |
| 356 GpuCommandBufferMsg_CreateVideoEncoder::WriteReplyParams(message, succeeded); | 356 GpuCommandBufferMsg_CreateVideoEncoder::WriteReplyParams(message, succeeded); |
| 357 Send(message); | 357 Send(message); |
| 358 } | 358 } |
| 359 | 359 |
| 360 } // namespace content | 360 } // namespace content |
| OLD | NEW |