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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 if (status != gfx::VideoDecodeAccelerationSupport::SUCCESS) { | 276 if (status != gfx::VideoDecodeAccelerationSupport::SUCCESS) { |
277 if (client_) | 277 if (client_) |
278 client_->NotifyError(PLATFORM_FAILURE); | 278 client_->NotifyError(PLATFORM_FAILURE); |
279 return; | 279 return; |
280 } | 280 } |
281 | 281 |
282 if (client_) { | 282 if (client_) { |
283 client_->ProvidePictureBuffers( | 283 client_->ProvidePictureBuffers( |
284 kNumPictureBuffers, | 284 kNumPictureBuffers, |
285 gfx::Size(config_record_builder_.coded_width(), | 285 gfx::Size(config_record_builder_.coded_width(), |
286 config_record_builder_.coded_height())); | 286 config_record_builder_.coded_height()), |
| 287 GL_TEXTURE_RECTANGLE_ARB); |
287 } | 288 } |
288 } | 289 } |
289 | 290 |
290 void MacVideoDecodeAccelerator::DecodeNALU(const content::H264NALU& nalu, | 291 void MacVideoDecodeAccelerator::DecodeNALU(const content::H264NALU& nalu, |
291 int32 bitstream_buffer_id) { | 292 int32 bitstream_buffer_id) { |
292 // Assume the NALU length field size is 4 bytes. | 293 // Assume the NALU length field size is 4 bytes. |
293 const int kNALULengthFieldSize = 4; | 294 const int kNALULengthFieldSize = 4; |
294 std::vector<uint8_t> data(kNALULengthFieldSize + nalu.size); | 295 std::vector<uint8_t> data(kNALULengthFieldSize + nalu.size); |
295 | 296 |
296 // Store the buffer size at the beginning of the buffer as the decoder | 297 // Store the buffer size at the beginning of the buffer as the decoder |
(...skipping 22 matching lines...) Expand all Loading... |
319 } | 320 } |
320 | 321 |
321 MacVideoDecodeAccelerator::UsedPictureInfo::~UsedPictureInfo() { | 322 MacVideoDecodeAccelerator::UsedPictureInfo::~UsedPictureInfo() { |
322 } | 323 } |
323 | 324 |
324 MacVideoDecodeAccelerator::DecodedImageInfo::DecodedImageInfo() { | 325 MacVideoDecodeAccelerator::DecodedImageInfo::DecodedImageInfo() { |
325 } | 326 } |
326 | 327 |
327 MacVideoDecodeAccelerator::DecodedImageInfo::~DecodedImageInfo() { | 328 MacVideoDecodeAccelerator::DecodedImageInfo::~DecodedImageInfo() { |
328 } | 329 } |
OLD | NEW |