OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 void GpuVideoDecodeAccelerator::NotifyError( | 87 void GpuVideoDecodeAccelerator::NotifyError( |
88 media::VideoDecodeAccelerator::Error error) { | 88 media::VideoDecodeAccelerator::Error error) { |
89 if (!Send(new AcceleratedVideoDecoderHostMsg_ErrorNotification( | 89 if (!Send(new AcceleratedVideoDecoderHostMsg_ErrorNotification( |
90 host_route_id_, error))) { | 90 host_route_id_, error))) { |
91 LOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ErrorNotification) " | 91 LOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ErrorNotification) " |
92 << "failed"; | 92 << "failed"; |
93 } | 93 } |
94 } | 94 } |
95 | 95 |
96 void GpuVideoDecodeAccelerator::Initialize( | 96 void GpuVideoDecodeAccelerator::Initialize( |
97 const std::vector<uint32>& configs, | 97 const std::vector<int32>& configs, |
98 IPC::Message* init_done_msg) { | 98 IPC::Message* init_done_msg) { |
99 DCHECK(!video_decode_accelerator_.get()); | 99 DCHECK(!video_decode_accelerator_.get()); |
100 DCHECK(!init_done_msg_); | 100 DCHECK(!init_done_msg_); |
101 DCHECK(init_done_msg); | 101 DCHECK(init_done_msg); |
102 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) | 102 #if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) |
103 DCHECK(stub_ && stub_->scheduler()); | 103 DCHECK(stub_ && stub_->scheduler()); |
104 init_done_msg_ = init_done_msg; | 104 init_done_msg_ = init_done_msg; |
105 OmxVideoDecodeAccelerator* omx_decoder = new OmxVideoDecodeAccelerator(this); | 105 OmxVideoDecodeAccelerator* omx_decoder = new OmxVideoDecodeAccelerator(this); |
106 omx_decoder->SetEglState( | 106 omx_decoder->SetEglState( |
107 gfx::GLSurfaceEGL::GetHardwareDisplay(), | 107 gfx::GLSurfaceEGL::GetHardwareDisplay(), |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 185 |
186 void GpuVideoDecodeAccelerator::NotifyResetDone() { | 186 void GpuVideoDecodeAccelerator::NotifyResetDone() { |
187 if (!Send(new AcceleratedVideoDecoderHostMsg_ResetDone(host_route_id_))) | 187 if (!Send(new AcceleratedVideoDecoderHostMsg_ResetDone(host_route_id_))) |
188 LOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ResetDone) failed"; | 188 LOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ResetDone) failed"; |
189 } | 189 } |
190 | 190 |
191 bool GpuVideoDecodeAccelerator::Send(IPC::Message* message) { | 191 bool GpuVideoDecodeAccelerator::Send(IPC::Message* message) { |
192 DCHECK(sender_); | 192 DCHECK(sender_); |
193 return sender_->Send(message); | 193 return sender_->Send(message); |
194 } | 194 } |
OLD | NEW |