| 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 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderHostMsg_EndOfStream, | 53 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderHostMsg_EndOfStream, |
| 54 OnEndOfStream) | 54 OnEndOfStream) |
| 55 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderHostMsg_ErrorNotification, | 55 IPC_MESSAGE_HANDLER(AcceleratedVideoDecoderHostMsg_ErrorNotification, |
| 56 OnErrorNotification) | 56 OnErrorNotification) |
| 57 IPC_MESSAGE_UNHANDLED(handled = false) | 57 IPC_MESSAGE_UNHANDLED(handled = false) |
| 58 IPC_END_MESSAGE_MAP() | 58 IPC_END_MESSAGE_MAP() |
| 59 DCHECK(handled); | 59 DCHECK(handled); |
| 60 return handled; | 60 return handled; |
| 61 } | 61 } |
| 62 | 62 |
| 63 bool GpuVideoDecodeAcceleratorHost::Initialize( | 63 bool GpuVideoDecodeAcceleratorHost::Initialize(const Config& config) { |
| 64 const std::vector<int32>& configs) { | |
| 65 NOTREACHED(); | 64 NOTREACHED(); |
| 66 return true; | 65 return true; |
| 67 } | 66 } |
| 68 | 67 |
| 69 void GpuVideoDecodeAcceleratorHost::Decode( | 68 void GpuVideoDecodeAcceleratorHost::Decode( |
| 70 const media::BitstreamBuffer& bitstream_buffer) { | 69 const media::BitstreamBuffer& bitstream_buffer) { |
| 71 DCHECK(CalledOnValidThread()); | 70 DCHECK(CalledOnValidThread()); |
| 72 Send(new AcceleratedVideoDecoderMsg_Decode( | 71 Send(new AcceleratedVideoDecoderMsg_Decode( |
| 73 decoder_route_id_, bitstream_buffer.handle(), | 72 decoder_route_id_, bitstream_buffer.handle(), |
| 74 bitstream_buffer.id(), bitstream_buffer.size())); | 73 bitstream_buffer.id(), bitstream_buffer.size())); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 client_->NotifyEndOfStream(); | 173 client_->NotifyEndOfStream(); |
| 175 } | 174 } |
| 176 | 175 |
| 177 void GpuVideoDecodeAcceleratorHost::OnErrorNotification(uint32 error) { | 176 void GpuVideoDecodeAcceleratorHost::OnErrorNotification(uint32 error) { |
| 178 DCHECK(CalledOnValidThread()); | 177 DCHECK(CalledOnValidThread()); |
| 179 if (!client_) | 178 if (!client_) |
| 180 return; | 179 return; |
| 181 client_->NotifyError( | 180 client_->NotifyError( |
| 182 static_cast<media::VideoDecodeAccelerator::Error>(error)); | 181 static_cast<media::VideoDecodeAccelerator::Error>(error)); |
| 183 } | 182 } |
| OLD | NEW |