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

Side by Side Diff: media/filters/gpu_video_decoder.cc

Issue 2058113002: Add 'cbcs' encryption scheme support in Android media. (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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 CompleteInitialization(cdm_id, SurfaceManager::kNoSurfaceID); 259 CompleteInitialization(cdm_id, SurfaceManager::kNoSurfaceID);
260 } 260 }
261 261
262 void GpuVideoDecoder::CompleteInitialization(int cdm_id, int surface_id) { 262 void GpuVideoDecoder::CompleteInitialization(int cdm_id, int surface_id) {
263 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); 263 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent();
264 DCHECK(!init_cb_.is_null()); 264 DCHECK(!init_cb_.is_null());
265 265
266 VideoDecodeAccelerator::Config vda_config; 266 VideoDecodeAccelerator::Config vda_config;
267 vda_config.profile = config_.profile(); 267 vda_config.profile = config_.profile();
268 vda_config.cdm_id = cdm_id; 268 vda_config.cdm_id = cdm_id;
269 vda_config.is_encrypted = config_.is_encrypted(); 269 vda_config.encryption_scheme = config_.encryption_scheme();
270 vda_config.surface_id = surface_id; 270 vda_config.surface_id = surface_id;
271 vda_config.is_deferred_initialization_allowed = true; 271 vda_config.is_deferred_initialization_allowed = true;
272 vda_config.initial_expected_coded_size = config_.coded_size(); 272 vda_config.initial_expected_coded_size = config_.coded_size();
273 if (!vda_->Initialize(vda_config, this)) { 273 if (!vda_->Initialize(vda_config, this)) {
274 DVLOG(1) << "VDA::Initialize failed."; 274 DVLOG(1) << "VDA::Initialize failed.";
275 base::ResetAndReturn(&init_cb_).Run(false); 275 base::ResetAndReturn(&init_cb_).Run(false);
276 return; 276 return;
277 } 277 }
278 278
279 // If deferred initialization is not supported, initialization is complete. 279 // If deferred initialization is not supported, initialization is complete.
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 } 781 }
782 return false; 782 return false;
783 } 783 }
784 784
785 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 785 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
786 const { 786 const {
787 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 787 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
788 } 788 }
789 789
790 } // namespace media 790 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698