| 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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 DCHECK(!init_cb_.is_null()); | 354 DCHECK(!init_cb_.is_null()); |
| 355 DCHECK(!vda_initialized_); | 355 DCHECK(!vda_initialized_); |
| 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.surface_id = surface_id; | 360 vda_config.surface_id = surface_id; |
| 361 vda_config.encryption_scheme = config_.encryption_scheme(); | 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 vda_config.color_space = config_.color_space_info(); |
| 364 | 365 |
| 365 #if defined(OS_ANDROID) && BUILDFLAG(USE_PROPRIETARY_CODECS) | 366 #if defined(OS_ANDROID) && BUILDFLAG(USE_PROPRIETARY_CODECS) |
| 366 // We pass the SPS and PPS on Android because it lets us initialize | 367 // We pass the SPS and PPS on Android because it lets us initialize |
| 367 // MediaCodec more reliably (http://crbug.com/649185). | 368 // MediaCodec more reliably (http://crbug.com/649185). |
| 368 if (config_.codec() == kCodecH264) | 369 if (config_.codec() == kCodecH264) |
| 369 ExtractSpsAndPps(config_.extra_data(), &vda_config.sps, &vda_config.pps); | 370 ExtractSpsAndPps(config_.extra_data(), &vda_config.sps, &vda_config.pps); |
| 370 #endif | 371 #endif |
| 371 | 372 |
| 372 vda_initialized_ = true; | 373 vda_initialized_ = true; |
| 373 if (!vda_->Initialize(vda_config, this)) { | 374 if (!vda_->Initialize(vda_config, this)) { |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 908 } | 909 } |
| 909 return false; | 910 return false; |
| 910 } | 911 } |
| 911 | 912 |
| 912 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() | 913 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() |
| 913 const { | 914 const { |
| 914 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); | 915 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); |
| 915 } | 916 } |
| 916 | 917 |
| 917 } // namespace media | 918 } // namespace media |
| OLD | NEW |