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/renderer/gpu/gpu_video_decode_accelerator_host.h" | 5 #include "content/renderer/gpu/gpu_video_decode_accelerator_host.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/task.h" | 10 #include "base/task.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 OnEndOfStream) | 53 OnEndOfStream) |
54 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderHostMsg_ErrorNotification, | 54 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderHostMsg_ErrorNotification, |
55 OnErrorNotification) | 55 OnErrorNotification) |
56 IPC_MESSAGE_UNHANDLED(handled = false) | 56 IPC_MESSAGE_UNHANDLED(handled = false) |
57 IPC_END_MESSAGE_MAP() | 57 IPC_END_MESSAGE_MAP() |
58 DCHECK(handled); | 58 DCHECK(handled); |
59 return handled; | 59 return handled; |
60 } | 60 } |
61 | 61 |
62 bool GpuVideoDecodeAcceleratorHost::Initialize( | 62 bool GpuVideoDecodeAcceleratorHost::Initialize( |
63 const std::vector<uint32>& configs) { | 63 const std::vector<int32>& configs) { |
64 NOTREACHED(); | 64 NOTREACHED(); |
65 return true; | 65 return true; |
66 } | 66 } |
67 | 67 |
68 void GpuVideoDecodeAcceleratorHost::Decode( | 68 void GpuVideoDecodeAcceleratorHost::Decode( |
69 const media::BitstreamBuffer& bitstream_buffer) { | 69 const media::BitstreamBuffer& bitstream_buffer) { |
70 DCHECK(CalledOnValidThread()); | 70 DCHECK(CalledOnValidThread()); |
71 Send(new AcceleratedVideoDecoderMsg_Decode( | 71 Send(new AcceleratedVideoDecoderMsg_Decode( |
72 command_buffer_route_id_, bitstream_buffer.handle(), | 72 command_buffer_route_id_, bitstream_buffer.handle(), |
73 bitstream_buffer.id(), bitstream_buffer.size())); | 73 bitstream_buffer.id(), bitstream_buffer.size())); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 void GpuVideoDecodeAcceleratorHost::OnEndOfStream() { | 161 void GpuVideoDecodeAcceleratorHost::OnEndOfStream() { |
162 DCHECK(CalledOnValidThread()); | 162 DCHECK(CalledOnValidThread()); |
163 client_->NotifyEndOfStream(); | 163 client_->NotifyEndOfStream(); |
164 } | 164 } |
165 | 165 |
166 void GpuVideoDecodeAcceleratorHost::OnErrorNotification(uint32 error) { | 166 void GpuVideoDecodeAcceleratorHost::OnErrorNotification(uint32 error) { |
167 DCHECK(CalledOnValidThread()); | 167 DCHECK(CalledOnValidThread()); |
168 client_->NotifyError( | 168 client_->NotifyError( |
169 static_cast<media::VideoDecodeAccelerator::Error>(error)); | 169 static_cast<media::VideoDecodeAccelerator::Error>(error)); |
170 } | 170 } |
OLD | NEW |