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

Side by Side Diff: media/filters/gpu_video_decoder.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
OLDNEW
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 "media/filters/gpu_video_decoder.h" 5 #include "media/filters/gpu_video_decoder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); 265 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent();
266 DCHECK(!init_cb_.is_null()); 266 DCHECK(!init_cb_.is_null());
267 267
268 VideoDecodeAccelerator::Config vda_config; 268 VideoDecodeAccelerator::Config vda_config;
269 vda_config.profile = config_.profile(); 269 vda_config.profile = config_.profile();
270 vda_config.cdm_id = cdm_id; 270 vda_config.cdm_id = cdm_id;
271 vda_config.is_encrypted = config_.is_encrypted(); 271 vda_config.is_encrypted = config_.is_encrypted();
272 vda_config.surface_id = surface_id; 272 vda_config.surface_id = surface_id;
273 vda_config.is_deferred_initialization_allowed = true; 273 vda_config.is_deferred_initialization_allowed = true;
274 vda_config.initial_expected_coded_size = config_.coded_size(); 274 vda_config.initial_expected_coded_size = config_.coded_size();
275 vda_config.supported_output_formats.assign(
276 {PIXEL_FORMAT_XRGB, PIXEL_FORMAT_ARGB, PIXEL_FORMAT_NV12});
275 if (!vda_->Initialize(vda_config, this)) { 277 if (!vda_->Initialize(vda_config, this)) {
276 DVLOG(1) << "VDA::Initialize failed."; 278 DVLOG(1) << "VDA::Initialize failed.";
277 base::ResetAndReturn(&init_cb_).Run(false); 279 base::ResetAndReturn(&init_cb_).Run(false);
278 return; 280 return;
279 } 281 }
280 282
281 // If deferred initialization is not supported, initialization is complete. 283 // If deferred initialization is not supported, initialization is complete.
282 // Otherwise, a call to NotifyInitializationComplete will follow with the 284 // Otherwise, a call to NotifyInitializationComplete will follow with the
283 // result of deferred initialization. 285 // result of deferred initialization.
284 if (!supports_deferred_initialization_) 286 if (!supports_deferred_initialization_)
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 } 793 }
792 return false; 794 return false;
793 } 795 }
794 796
795 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 797 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
796 const { 798 const {
797 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 799 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
798 } 800 }
799 801
800 } // namespace media 802 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698