OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |