| 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 | 325 |
| 326 // It's possible for the vda to become null if NotifyError is called. | 326 // It's possible for the vda to become null if NotifyError is called. |
| 327 if (!vda_) { | 327 if (!vda_) { |
| 328 base::ResetAndReturn(&init_cb_).Run(false); | 328 base::ResetAndReturn(&init_cb_).Run(false); |
| 329 return; | 329 return; |
| 330 } | 330 } |
| 331 | 331 |
| 332 VideoDecodeAccelerator::Config vda_config; | 332 VideoDecodeAccelerator::Config vda_config; |
| 333 vda_config.profile = config_.profile(); | 333 vda_config.profile = config_.profile(); |
| 334 vda_config.cdm_id = cdm_id; | 334 vda_config.cdm_id = cdm_id; |
| 335 vda_config.is_encrypted = config_.is_encrypted(); | 335 vda_config.encryption_scheme = config_.encryption_scheme(); |
| 336 vda_config.surface_id = surface_id; | 336 vda_config.surface_id = surface_id; |
| 337 vda_config.is_deferred_initialization_allowed = true; | 337 vda_config.is_deferred_initialization_allowed = true; |
| 338 vda_config.initial_expected_coded_size = config_.coded_size(); | 338 vda_config.initial_expected_coded_size = config_.coded_size(); |
| 339 | 339 |
| 340 #if defined(OS_ANDROID) && defined(USE_PROPRIETARY_CODECS) | 340 #if defined(OS_ANDROID) && defined(USE_PROPRIETARY_CODECS) |
| 341 // We pass the SPS and PPS on Android because it lets us initialize | 341 // We pass the SPS and PPS on Android because it lets us initialize |
| 342 // MediaCodec more reliably (http://crbug.com/649185). | 342 // MediaCodec more reliably (http://crbug.com/649185). |
| 343 if (config_.codec() == kCodecH264) | 343 if (config_.codec() == kCodecH264) |
| 344 ExtractSpsAndPps(config_.extra_data(), &vda_config.sps, &vda_config.pps); | 344 ExtractSpsAndPps(config_.extra_data(), &vda_config.sps, &vda_config.pps); |
| 345 #endif | 345 #endif |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 } | 873 } |
| 874 return false; | 874 return false; |
| 875 } | 875 } |
| 876 | 876 |
| 877 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() | 877 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() |
| 878 const { | 878 const { |
| 879 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); | 879 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); |
| 880 } | 880 } |
| 881 | 881 |
| 882 } // namespace media | 882 } // namespace media |
| OLD | NEW |