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/logging.h" | 10 #include "base/logging.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
130 NOTIMPLEMENTED() << "HW video decode acceleration not available."; | 130 NOTIMPLEMENTED() << "HW video decode acceleration not available."; |
131 NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE); | 131 NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE); |
132 return; | 132 return; |
133 } | 133 } |
134 DLOG(INFO) << "Initializing DXVA HW decoder for windows."; | 134 DLOG(INFO) << "Initializing DXVA HW decoder for windows."; |
135 DXVAVideoDecodeAccelerator* video_decoder = | 135 DXVAVideoDecodeAccelerator* video_decoder = |
136 new DXVAVideoDecodeAccelerator(this, renderer_process); | 136 new DXVAVideoDecodeAccelerator(this, renderer_process); |
137 #else // OS_WIN | 137 #else // OS_WIN |
138 OmxVideoDecodeAccelerator* video_decoder = | 138 OmxVideoDecodeAccelerator* video_decoder = |
139 new OmxVideoDecodeAccelerator(this); | 139 new OmxVideoDecodeAccelerator(this); |
140 video_decoder->SetEglState( | 140 video_decoder->SetEglState(gfx::GLSurfaceEGL::GetNativeDisplay(), |
Ami GONE FROM CHROMIUM
2012/02/07 17:05:40
The fact that this param doesn't depend on any sta
| |
141 gfx::GLSurfaceEGL::GetHardwareDisplay(), | 141 gfx::GLSurfaceEGL::GetHardwareDisplay(), |
142 stub_->decoder()->GetGLContext()->GetHandle()); | 142 stub_->decoder()->GetGLContext()->GetHandle(), |
143 stub_->decoder()->GetGLSurface()->GetHandle()); | |
143 #endif // OS_WIN | 144 #endif // OS_WIN |
144 video_decode_accelerator_ = video_decoder; | 145 video_decode_accelerator_ = video_decoder; |
145 if (!video_decode_accelerator_->Initialize(profile)) | 146 if (!video_decode_accelerator_->Initialize(profile)) |
146 NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE); | 147 NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE); |
147 #else // Update RenderViewImpl::createMediaPlayer when adding clauses. | 148 #else // Update RenderViewImpl::createMediaPlayer when adding clauses. |
148 NOTIMPLEMENTED() << "HW video decode acceleration not available."; | 149 NOTIMPLEMENTED() << "HW video decode acceleration not available."; |
149 NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE); | 150 NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE); |
150 #endif // defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) | 151 #endif // defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) |
151 } | 152 } |
152 | 153 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
236 | 237 |
237 void GpuVideoDecodeAccelerator::NotifyResetDone() { | 238 void GpuVideoDecodeAccelerator::NotifyResetDone() { |
238 if (!Send(new AcceleratedVideoDecoderHostMsg_ResetDone(host_route_id_))) | 239 if (!Send(new AcceleratedVideoDecoderHostMsg_ResetDone(host_route_id_))) |
239 DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ResetDone) failed"; | 240 DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ResetDone) failed"; |
240 } | 241 } |
241 | 242 |
242 bool GpuVideoDecodeAccelerator::Send(IPC::Message* message) { | 243 bool GpuVideoDecodeAccelerator::Send(IPC::Message* message) { |
243 DCHECK(sender_); | 244 DCHECK(sender_); |
244 return sender_->Send(message); | 245 return sender_->Send(message); |
245 } | 246 } |
OLD | NEW |