| 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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 make_context_current_, base::Bind(&GpuVideoDecodeAccelerator::BindImage, | 351 make_context_current_, base::Bind(&GpuVideoDecodeAccelerator::BindImage, |
| 352 base::Unretained(this)))); | 352 base::Unretained(this)))); |
| 353 #endif | 353 #endif |
| 354 return decoder.Pass(); | 354 return decoder.Pass(); |
| 355 } | 355 } |
| 356 | 356 |
| 357 scoped_ptr<media::VideoDecodeAccelerator> | 357 scoped_ptr<media::VideoDecodeAccelerator> |
| 358 GpuVideoDecodeAccelerator::CreateVTVDA() { | 358 GpuVideoDecodeAccelerator::CreateVTVDA() { |
| 359 scoped_ptr<media::VideoDecodeAccelerator> decoder; | 359 scoped_ptr<media::VideoDecodeAccelerator> decoder; |
| 360 #if defined(OS_MACOSX) | 360 #if defined(OS_MACOSX) |
| 361 decoder.reset(new VTVideoDecodeAccelerator( | 361 decoder.reset(new VTVideoDecodeAccelerator(make_context_current_)); |
| 362 static_cast<CGLContextObj>(stub_->decoder()->GetGLContext()->GetHandle()), | |
| 363 make_context_current_)); | |
| 364 #endif | 362 #endif |
| 365 return decoder.Pass(); | 363 return decoder.Pass(); |
| 366 } | 364 } |
| 367 | 365 |
| 368 scoped_ptr<media::VideoDecodeAccelerator> | 366 scoped_ptr<media::VideoDecodeAccelerator> |
| 369 GpuVideoDecodeAccelerator::CreateOzoneVDA() { | 367 GpuVideoDecodeAccelerator::CreateOzoneVDA() { |
| 370 scoped_ptr<media::VideoDecodeAccelerator> decoder; | 368 scoped_ptr<media::VideoDecodeAccelerator> decoder; |
| 371 #if !defined(OS_CHROMEOS) && defined(USE_OZONE) | 369 #if !defined(OS_CHROMEOS) && defined(USE_OZONE) |
| 372 media::MediaOzonePlatform* platform = | 370 media::MediaOzonePlatform* platform = |
| 373 media::MediaOzonePlatform::GetInstance(); | 371 media::MediaOzonePlatform::GetInstance(); |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 return stub_->channel()->Send(message); | 604 return stub_->channel()->Send(message); |
| 607 } | 605 } |
| 608 | 606 |
| 609 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, | 607 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, |
| 610 bool succeeded) { | 608 bool succeeded) { |
| 611 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); | 609 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); |
| 612 Send(message); | 610 Send(message); |
| 613 } | 611 } |
| 614 | 612 |
| 615 } // namespace content | 613 } // namespace content |
| OLD | NEW |