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/mac_video_decode_accelerator.h" | 5 #include "content/common/gpu/media/mac_video_decode_accelerator.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #import "base/mac/foundation_util.h" | 9 #import "base/mac/foundation_util.h" |
10 #import "base/memory/ref_counted_memory.h" | 10 #import "base/memory/ref_counted_memory.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 } | 157 } |
158 | 158 |
159 vda_->Decode(bytes->front(), bytes->size(), | 159 vda_->Decode(bytes->front(), bytes->size(), |
160 base::Bind(&MacVideoDecodeAccelerator::OnFrameReady, this, | 160 base::Bind(&MacVideoDecodeAccelerator::OnFrameReady, this, |
161 bitstream_buffer.id(), bytes)); | 161 bitstream_buffer.id(), bytes)); |
162 | 162 |
163 if (!did_request_pictures_) { | 163 if (!did_request_pictures_) { |
164 did_request_pictures_ = true; | 164 did_request_pictures_ = true; |
165 if (client_) | 165 if (client_) |
166 client_->ProvidePictureBuffers( | 166 client_->ProvidePictureBuffers( |
167 kNumPictureBuffers, gfx::Size(frame_width_, frame_height_)); | 167 kNumPictureBuffers, |
| 168 gfx::Size(frame_width_, frame_height_), |
| 169 media::VideoDecodeAccelerator::TEXTURE_TARGET_ARB); |
168 } | 170 } |
169 } | 171 } |
170 | 172 |
171 void MacVideoDecodeAccelerator::AssignPictureBuffers( | 173 void MacVideoDecodeAccelerator::AssignPictureBuffers( |
172 const std::vector<media::PictureBuffer>& buffers) { | 174 const std::vector<media::PictureBuffer>& buffers) { |
173 available_pictures_.insert( | 175 available_pictures_.insert( |
174 available_pictures_.end(), buffers.begin(), buffers.end()); | 176 available_pictures_.end(), buffers.begin(), buffers.end()); |
175 SendImages(); | 177 SendImages(); |
176 } | 178 } |
177 | 179 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 } | 265 } |
264 | 266 |
265 MacVideoDecodeAccelerator::PendingPictureInfo::~PendingPictureInfo() { | 267 MacVideoDecodeAccelerator::PendingPictureInfo::~PendingPictureInfo() { |
266 } | 268 } |
267 | 269 |
268 MacVideoDecodeAccelerator::DecodedImageInfo::DecodedImageInfo() { | 270 MacVideoDecodeAccelerator::DecodedImageInfo::DecodedImageInfo() { |
269 } | 271 } |
270 | 272 |
271 MacVideoDecodeAccelerator::DecodedImageInfo::~DecodedImageInfo() { | 273 MacVideoDecodeAccelerator::DecodedImageInfo::~DecodedImageInfo() { |
272 } | 274 } |
OLD | NEW |