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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 create_vda_fps.push_back(&GpuVideoDecodeAccelerator::CreateAndroidVDA); | 282 create_vda_fps.push_back(&GpuVideoDecodeAccelerator::CreateAndroidVDA); |
283 return create_vda_fps; | 283 return create_vda_fps; |
284 } | 284 } |
285 | 285 |
286 scoped_ptr<media::VideoDecodeAccelerator> | 286 scoped_ptr<media::VideoDecodeAccelerator> |
287 GpuVideoDecodeAccelerator::CreateDXVAVDA() { | 287 GpuVideoDecodeAccelerator::CreateDXVAVDA() { |
288 scoped_ptr<media::VideoDecodeAccelerator> decoder; | 288 scoped_ptr<media::VideoDecodeAccelerator> decoder; |
289 #if defined(OS_WIN) | 289 #if defined(OS_WIN) |
290 if (base::win::GetVersion() >= base::win::VERSION_WIN7) { | 290 if (base::win::GetVersion() >= base::win::VERSION_WIN7) { |
291 DVLOG(0) << "Initializing DXVA HW decoder for windows."; | 291 DVLOG(0) << "Initializing DXVA HW decoder for windows."; |
292 decoder.reset(new DXVAVideoDecodeAccelerator(make_context_current_)); | 292 decoder.reset(new DXVAVideoDecodeAccelerator(make_context_current_, |
| 293 stub_->decoder()->GetGLContext())); |
293 } else { | 294 } else { |
294 NOTIMPLEMENTED() << "HW video decode acceleration not available."; | 295 NOTIMPLEMENTED() << "HW video decode acceleration not available."; |
295 } | 296 } |
296 #endif | 297 #endif |
297 return decoder.Pass(); | 298 return decoder.Pass(); |
298 } | 299 } |
299 | 300 |
300 scoped_ptr<media::VideoDecodeAccelerator> | 301 scoped_ptr<media::VideoDecodeAccelerator> |
301 GpuVideoDecodeAccelerator::CreateV4L2VDA() { | 302 GpuVideoDecodeAccelerator::CreateV4L2VDA() { |
302 scoped_ptr<media::VideoDecodeAccelerator> decoder; | 303 scoped_ptr<media::VideoDecodeAccelerator> decoder; |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 return stub_->channel()->Send(message); | 582 return stub_->channel()->Send(message); |
582 } | 583 } |
583 | 584 |
584 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, | 585 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, |
585 bool succeeded) { | 586 bool succeeded) { |
586 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); | 587 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); |
587 Send(message); | 588 Send(message); |
588 } | 589 } |
589 | 590 |
590 } // namespace content | 591 } // namespace content |
OLD | NEW |