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 #include "content/common/gpu/media/gpu_video_decode_accelerator.h" | 5 #include "content/common/gpu/media/gpu_video_decode_accelerator.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 NOTIMPLEMENTED() << "HW video decode acceleration not available."; | 250 NOTIMPLEMENTED() << "HW video decode acceleration not available."; |
251 SendCreateDecoderReply(init_done_msg, false); | 251 SendCreateDecoderReply(init_done_msg, false); |
252 return; | 252 return; |
253 } | 253 } |
254 DVLOG(0) << "Initializing DXVA HW decoder for windows."; | 254 DVLOG(0) << "Initializing DXVA HW decoder for windows."; |
255 video_decode_accelerator_.reset( | 255 video_decode_accelerator_.reset( |
256 new DXVAVideoDecodeAccelerator(make_context_current_)); | 256 new DXVAVideoDecodeAccelerator(make_context_current_)); |
257 #elif defined(OS_MACOSX) | 257 #elif defined(OS_MACOSX) |
258 video_decode_accelerator_.reset(new VTVideoDecodeAccelerator( | 258 video_decode_accelerator_.reset(new VTVideoDecodeAccelerator( |
259 static_cast<CGLContextObj>( | 259 static_cast<CGLContextObj>( |
260 stub_->decoder()->GetGLContext()->GetHandle()))); | 260 stub_->decoder()->GetGLContext()->GetHandle()), |
| 261 make_context_current_)); |
261 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11) | 262 #elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11) |
262 scoped_ptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); | 263 scoped_ptr<V4L2Device> device = V4L2Device::Create(V4L2Device::kDecoder); |
263 if (!device.get()) { | 264 if (!device.get()) { |
264 SendCreateDecoderReply(init_done_msg, false); | 265 SendCreateDecoderReply(init_done_msg, false); |
265 return; | 266 return; |
266 } | 267 } |
267 video_decode_accelerator_.reset(new V4L2VideoDecodeAccelerator( | 268 video_decode_accelerator_.reset(new V4L2VideoDecodeAccelerator( |
268 gfx::GLSurfaceEGL::GetHardwareDisplay(), | 269 gfx::GLSurfaceEGL::GetHardwareDisplay(), |
269 stub_->decoder()->GetGLContext()->GetHandle(), | 270 stub_->decoder()->GetGLContext()->GetHandle(), |
270 weak_factory_for_io_.GetWeakPtr(), | 271 weak_factory_for_io_.GetWeakPtr(), |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 return stub_->channel()->Send(message); | 506 return stub_->channel()->Send(message); |
506 } | 507 } |
507 | 508 |
508 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, | 509 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, |
509 bool succeeded) { | 510 bool succeeded) { |
510 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); | 511 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); |
511 Send(message); | 512 Send(message); |
512 } | 513 } |
513 | 514 |
514 } // namespace content | 515 } // namespace content |
OLD | NEW |