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

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: change Android version probing Created 4 years, 2 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 288
289 // It's possible for the vda to become null if NotifyError is called. 289 // It's possible for the vda to become null if NotifyError is called.
290 if (!vda_) { 290 if (!vda_) {
291 base::ResetAndReturn(&init_cb_).Run(false); 291 base::ResetAndReturn(&init_cb_).Run(false);
292 return; 292 return;
293 } 293 }
294 294
295 VideoDecodeAccelerator::Config vda_config; 295 VideoDecodeAccelerator::Config vda_config;
296 vda_config.profile = config_.profile(); 296 vda_config.profile = config_.profile();
297 vda_config.cdm_id = cdm_id; 297 vda_config.cdm_id = cdm_id;
298 vda_config.is_encrypted = config_.is_encrypted(); 298 vda_config.encryption_scheme = config_.encryption_scheme();
299 vda_config.surface_id = surface_id; 299 vda_config.surface_id = surface_id;
300 vda_config.is_deferred_initialization_allowed = true; 300 vda_config.is_deferred_initialization_allowed = true;
301 vda_config.initial_expected_coded_size = config_.coded_size(); 301 vda_config.initial_expected_coded_size = config_.coded_size();
302 if (!vda_->Initialize(vda_config, this)) { 302 if (!vda_->Initialize(vda_config, this)) {
303 DVLOG(1) << "VDA::Initialize failed."; 303 DVLOG(1) << "VDA::Initialize failed.";
304 base::ResetAndReturn(&init_cb_).Run(false); 304 base::ResetAndReturn(&init_cb_).Run(false);
305 return; 305 return;
306 } 306 }
307 307
308 // If deferred initialization is not supported, initialization is complete. 308 // If deferred initialization is not supported, initialization is complete.
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 } 828 }
829 return false; 829 return false;
830 } 830 }
831 831
832 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 832 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
833 const { 833 const {
834 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 834 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
835 } 835 }
836 836
837 } // namespace media 837 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698