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

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

Issue 2045273005: Have VDA clients inform decoder of supported picture buffer formats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/gpu/dxva_video_decode_accelerator_win.cc » ('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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 profile_ = PepperToMediaVideoProfile(profile); 142 profile_ = PepperToMediaVideoProfile(profile);
143 software_fallback_allowed_ = (acceleration != PP_HARDWAREACCELERATION_ONLY); 143 software_fallback_allowed_ = (acceleration != PP_HARDWAREACCELERATION_ONLY);
144 144
145 min_picture_count_ = min_picture_count; 145 min_picture_count_ = min_picture_count;
146 146
147 if (acceleration != PP_HARDWAREACCELERATION_NONE) { 147 if (acceleration != PP_HARDWAREACCELERATION_NONE) {
148 // This is not synchronous, but subsequent IPC messages will be buffered, so 148 // This is not synchronous, but subsequent IPC messages will be buffered, so
149 // it is okay to immediately send IPC messages. 149 // it is okay to immediately send IPC messages.
150 if (command_buffer->channel()) { 150 if (command_buffer->channel()) {
151 decoder_.reset(new media::GpuVideoDecodeAcceleratorHost(command_buffer)); 151 decoder_.reset(new media::GpuVideoDecodeAcceleratorHost(command_buffer));
152 if (decoder_->Initialize(profile_, this)) { 152 media::VideoDecodeAccelerator::Config vda_config(profile_);
153 vda_config.supported_output_formats.assign(
154 {media::PIXEL_FORMAT_XRGB, media::PIXEL_FORMAT_ARGB});
155 if (decoder_->Initialize(vda_config, this)) {
153 initialized_ = true; 156 initialized_ = true;
154 return PP_OK; 157 return PP_OK;
155 } 158 }
156 } 159 }
157 decoder_.reset(); 160 decoder_.reset();
158 if (acceleration == PP_HARDWAREACCELERATION_ONLY) 161 if (acceleration == PP_HARDWAREACCELERATION_ONLY)
159 return PP_ERROR_NOTSUPPORTED; 162 return PP_ERROR_NOTSUPPORTED;
160 } 163 }
161 164
162 #if defined(OS_ANDROID) 165 #if defined(OS_ANDROID)
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 535
533 PepperVideoDecoderHost::PendingDecodeList::iterator 536 PepperVideoDecoderHost::PendingDecodeList::iterator
534 PepperVideoDecoderHost::GetPendingDecodeById(int32_t decode_id) { 537 PepperVideoDecoderHost::GetPendingDecodeById(int32_t decode_id) {
535 return std::find_if(pending_decodes_.begin(), pending_decodes_.end(), 538 return std::find_if(pending_decodes_.begin(), pending_decodes_.end(),
536 [decode_id](const PendingDecode& item) { 539 [decode_id](const PendingDecode& item) {
537 return item.decode_id == decode_id; 540 return item.decode_id == decode_id;
538 }); 541 });
539 } 542 }
540 543
541 } // namespace content 544 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/gpu/dxva_video_decode_accelerator_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698