Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Side by Side Diff: content/renderer/pepper/pepper_video_decoder_host.cc

Issue 2902893002: Prefixing the explicit keyword to the media::VideoDecodeAccelerator::Config (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | media/video/video_decode_accelerator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 #if defined(OS_ANDROID) 495 #if defined(OS_ANDROID)
496 return false; 496 return false;
497 #else 497 #else
498 DCHECK(!software_fallback_used_ && software_fallback_allowed_); 498 DCHECK(!software_fallback_used_ && software_fallback_allowed_);
499 499
500 uint32_t shim_texture_pool_size = media::limits::kMaxVideoFrames + 1; 500 uint32_t shim_texture_pool_size = media::limits::kMaxVideoFrames + 1;
501 shim_texture_pool_size = std::max(shim_texture_pool_size, 501 shim_texture_pool_size = std::max(shim_texture_pool_size,
502 min_picture_count_); 502 min_picture_count_);
503 std::unique_ptr<VideoDecoderShim> new_decoder( 503 std::unique_ptr<VideoDecoderShim> new_decoder(
504 new VideoDecoderShim(this, shim_texture_pool_size)); 504 new VideoDecoderShim(this, shim_texture_pool_size));
505 if (!new_decoder->Initialize(profile_, this)) 505 if (!new_decoder->Initialize(media::VideoDecodeAccelerator::Config(profile_),
506 this))
506 return false; 507 return false;
507 508
508 software_fallback_used_ = true; 509 software_fallback_used_ = true;
509 decoder_.reset(new_decoder.release()); 510 decoder_.reset(new_decoder.release());
510 511
511 // Dismiss all assigned pictures and mark all pictures in use as DISMISSED. 512 // Dismiss all assigned pictures and mark all pictures in use as DISMISSED.
512 PictureBufferMap pictures_pending_dismission; 513 PictureBufferMap pictures_pending_dismission;
513 for (auto& picture : picture_buffer_map_) { 514 for (auto& picture : picture_buffer_map_) {
514 if (picture.second == PictureBufferState::ASSIGNED) { 515 if (picture.second == PictureBufferState::ASSIGNED) {
515 host()->SendUnsolicitedReply( 516 host()->SendUnsolicitedReply(
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 557
557 PepperVideoDecoderHost::PendingDecodeList::iterator 558 PepperVideoDecoderHost::PendingDecodeList::iterator
558 PepperVideoDecoderHost::GetPendingDecodeById(int32_t decode_id) { 559 PepperVideoDecoderHost::GetPendingDecodeById(int32_t decode_id) {
559 return std::find_if(pending_decodes_.begin(), pending_decodes_.end(), 560 return std::find_if(pending_decodes_.begin(), pending_decodes_.end(),
560 [decode_id](const PendingDecode& item) { 561 [decode_id](const PendingDecode& item) {
561 return item.decode_id == decode_id; 562 return item.decode_id == decode_id;
562 }); 563 });
563 } 564 }
564 565
565 } // namespace content 566 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/video/video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698