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

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: rebase Created 4 years 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 <array> 8 #include <array>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 } 350 }
351 351
352 void GpuVideoDecoder::CompleteInitialization(int surface_id) { 352 void GpuVideoDecoder::CompleteInitialization(int surface_id) {
353 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); 353 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent();
354 DCHECK(vda_); 354 DCHECK(vda_);
355 DCHECK(!init_cb_.is_null()); 355 DCHECK(!init_cb_.is_null());
356 356
357 VideoDecodeAccelerator::Config vda_config; 357 VideoDecodeAccelerator::Config vda_config;
358 vda_config.profile = config_.profile(); 358 vda_config.profile = config_.profile();
359 vda_config.cdm_id = cdm_id_; 359 vda_config.cdm_id = cdm_id_;
360 vda_config.is_encrypted = config_.is_encrypted();
361 vda_config.surface_id = surface_id; 360 vda_config.surface_id = surface_id;
361 vda_config.encryption_scheme = config_.encryption_scheme();
362 vda_config.is_deferred_initialization_allowed = true; 362 vda_config.is_deferred_initialization_allowed = true;
363 vda_config.initial_expected_coded_size = config_.coded_size(); 363 vda_config.initial_expected_coded_size = config_.coded_size();
364 364
365 #if defined(OS_ANDROID) && defined(USE_PROPRIETARY_CODECS) 365 #if defined(OS_ANDROID) && defined(USE_PROPRIETARY_CODECS)
366 // We pass the SPS and PPS on Android because it lets us initialize 366 // We pass the SPS and PPS on Android because it lets us initialize
367 // MediaCodec more reliably (http://crbug.com/649185). 367 // MediaCodec more reliably (http://crbug.com/649185).
368 if (config_.codec() == kCodecH264) 368 if (config_.codec() == kCodecH264)
369 ExtractSpsAndPps(config_.extra_data(), &vda_config.sps, &vda_config.pps); 369 ExtractSpsAndPps(config_.extra_data(), &vda_config.sps, &vda_config.pps);
370 #endif 370 #endif
371 371
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 } 895 }
896 return false; 896 return false;
897 } 897 }
898 898
899 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 899 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
900 const { 900 const {
901 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 901 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
902 } 902 }
903 903
904 } // namespace media 904 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698