OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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/pepper/pepper_video_decoder_host.h" | 5 #include "content/renderer/pepper/pepper_video_decoder_host.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 return PP_ERROR_FAILED; | 344 return PP_ERROR_FAILED; |
345 | 345 |
346 reset_reply_context_ = context->MakeReplyMessageContext(); | 346 reset_reply_context_ = context->MakeReplyMessageContext(); |
347 decoder_->Reset(); | 347 decoder_->Reset(); |
348 | 348 |
349 return PP_OK_COMPLETIONPENDING; | 349 return PP_OK_COMPLETIONPENDING; |
350 } | 350 } |
351 | 351 |
352 void PepperVideoDecoderHost::ProvidePictureBuffers( | 352 void PepperVideoDecoderHost::ProvidePictureBuffers( |
353 uint32_t requested_num_of_buffers, | 353 uint32_t requested_num_of_buffers, |
| 354 media::VideoPixelFormat format, |
354 uint32_t textures_per_buffer, | 355 uint32_t textures_per_buffer, |
355 const gfx::Size& dimensions, | 356 const gfx::Size& dimensions, |
356 uint32_t texture_target) { | 357 uint32_t texture_target) { |
357 DCHECK_EQ(1u, textures_per_buffer); | 358 DCHECK_EQ(1u, textures_per_buffer); |
358 RequestTextures(std::max(min_picture_count_, requested_num_of_buffers), | 359 RequestTextures(std::max(min_picture_count_, requested_num_of_buffers), |
359 dimensions, | 360 dimensions, |
360 texture_target, | 361 texture_target, |
361 std::vector<gpu::Mailbox>()); | 362 std::vector<gpu::Mailbox>()); |
362 } | 363 } |
363 | 364 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 | 532 |
532 PepperVideoDecoderHost::PendingDecodeList::iterator | 533 PepperVideoDecoderHost::PendingDecodeList::iterator |
533 PepperVideoDecoderHost::GetPendingDecodeById(int32_t decode_id) { | 534 PepperVideoDecoderHost::GetPendingDecodeById(int32_t decode_id) { |
534 return std::find_if(pending_decodes_.begin(), pending_decodes_.end(), | 535 return std::find_if(pending_decodes_.begin(), pending_decodes_.end(), |
535 [decode_id](const PendingDecode& item) { | 536 [decode_id](const PendingDecode& item) { |
536 return item.decode_id == decode_id; | 537 return item.decode_id == decode_id; |
537 }); | 538 }); |
538 } | 539 } |
539 | 540 |
540 } // namespace content | 541 } // namespace content |
OLD | NEW |