| 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/client/gpu_video_decode_accelerator_host.h" | 5 #include "content/common/gpu/client/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 "content/common/gpu/client/gpu_channel_host.h" | 10 #include "content/common/gpu/client/gpu_channel_host.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 140 |
| 141 void GpuVideoDecodeAcceleratorHost::OnBitstreamBufferProcessed( | 141 void GpuVideoDecodeAcceleratorHost::OnBitstreamBufferProcessed( |
| 142 int32 bitstream_buffer_id) { | 142 int32 bitstream_buffer_id) { |
| 143 DCHECK(CalledOnValidThread()); | 143 DCHECK(CalledOnValidThread()); |
| 144 if (client_) | 144 if (client_) |
| 145 client_->NotifyEndOfBitstreamBuffer(bitstream_buffer_id); | 145 client_->NotifyEndOfBitstreamBuffer(bitstream_buffer_id); |
| 146 } | 146 } |
| 147 | 147 |
| 148 void GpuVideoDecodeAcceleratorHost::OnProvidePictureBuffer( | 148 void GpuVideoDecodeAcceleratorHost::OnProvidePictureBuffer( |
| 149 uint32 num_requested_buffers, | 149 uint32 num_requested_buffers, |
| 150 const gfx::Size& buffer_size) { | 150 const gfx::Size& buffer_size, |
| 151 media::VideoDecodeAccelerator::TextureTarget texture_target) { |
| 151 DCHECK(CalledOnValidThread()); | 152 DCHECK(CalledOnValidThread()); |
| 152 if (client_) | 153 if (client_) { |
| 153 client_->ProvidePictureBuffers(num_requested_buffers, buffer_size); | 154 client_->ProvidePictureBuffers( |
| 155 num_requested_buffers, buffer_size, texture_target); |
| 156 } |
| 154 } | 157 } |
| 155 | 158 |
| 156 void GpuVideoDecodeAcceleratorHost::OnDismissPictureBuffer( | 159 void GpuVideoDecodeAcceleratorHost::OnDismissPictureBuffer( |
| 157 int32 picture_buffer_id) { | 160 int32 picture_buffer_id) { |
| 158 DCHECK(CalledOnValidThread()); | 161 DCHECK(CalledOnValidThread()); |
| 159 if (client_) | 162 if (client_) |
| 160 client_->DismissPictureBuffer(picture_buffer_id); | 163 client_->DismissPictureBuffer(picture_buffer_id); |
| 161 } | 164 } |
| 162 | 165 |
| 163 void GpuVideoDecodeAcceleratorHost::OnPictureReady( | 166 void GpuVideoDecodeAcceleratorHost::OnPictureReady( |
| (...skipping 17 matching lines...) Expand all Loading... |
| 181 client_->NotifyResetDone(); | 184 client_->NotifyResetDone(); |
| 182 } | 185 } |
| 183 | 186 |
| 184 void GpuVideoDecodeAcceleratorHost::OnErrorNotification(uint32 error) { | 187 void GpuVideoDecodeAcceleratorHost::OnErrorNotification(uint32 error) { |
| 185 DCHECK(CalledOnValidThread()); | 188 DCHECK(CalledOnValidThread()); |
| 186 if (!client_) | 189 if (!client_) |
| 187 return; | 190 return; |
| 188 client_->NotifyError( | 191 client_->NotifyError( |
| 189 static_cast<media::VideoDecodeAccelerator::Error>(error)); | 192 static_cast<media::VideoDecodeAccelerator::Error>(error)); |
| 190 } | 193 } |
| OLD | NEW |