Chromium Code Reviews| 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 <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 177 << "GVD with config: " << config.AsHumanReadableString(); | 177 << "GVD with config: " << config.AsHumanReadableString(); |
| 178 | 178 |
| 179 // TODO(posciak): destroy and create a new VDA on codec/profile change | 179 // TODO(posciak): destroy and create a new VDA on codec/profile change |
| 180 // (http://crbug.com/260224). | 180 // (http://crbug.com/260224). |
| 181 if (previously_initialized && (config_.profile() != config.profile())) { | 181 if (previously_initialized && (config_.profile() != config.profile())) { |
| 182 DVLOG(1) << "Codec or profile changed, cannot reinitialize."; | 182 DVLOG(1) << "Codec or profile changed, cannot reinitialize."; |
| 183 bound_init_cb.Run(false); | 183 bound_init_cb.Run(false); |
| 184 return; | 184 return; |
| 185 } | 185 } |
| 186 | 186 |
| 187 if (config.format() == PIXEL_FORMAT_YV12A) { | |
|
sandersd (OOO until July 31)
2016/06/17 18:09:19
Please add a TODO to move this to capabilities, si
DaleCurtis
2016/06/17 18:19:56
Done.
| |
| 188 DVLOG(1) << "Alpha transparency formats are not supported."; | |
| 189 bound_init_cb.Run(false); | |
| 190 return; | |
| 191 } | |
| 192 | |
| 187 VideoDecodeAccelerator::Capabilities capabilities = | 193 VideoDecodeAccelerator::Capabilities capabilities = |
| 188 factories_->GetVideoDecodeAcceleratorCapabilities(); | 194 factories_->GetVideoDecodeAcceleratorCapabilities(); |
| 189 if (!IsProfileSupported(capabilities, config.profile(), config.coded_size(), | 195 if (!IsProfileSupported(capabilities, config.profile(), config.coded_size(), |
| 190 config.is_encrypted())) { | 196 config.is_encrypted())) { |
| 191 DVLOG(1) << "Unsupported profile " << config.profile() | 197 DVLOG(1) << "Unsupported profile " << config.profile() |
| 192 << ", unsupported coded size " << config.coded_size().ToString() | 198 << ", unsupported coded size " << config.coded_size().ToString() |
| 193 << ", or accelerator should only be used for encrypted content. " | 199 << ", or accelerator should only be used for encrypted content. " |
| 194 << " is_encrypted: " << (config.is_encrypted() ? "yes." : "no."); | 200 << " is_encrypted: " << (config.is_encrypted() ? "yes." : "no."); |
| 195 bound_init_cb.Run(false); | 201 bound_init_cb.Run(false); |
| 196 return; | 202 return; |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 791 } | 797 } |
| 792 return false; | 798 return false; |
| 793 } | 799 } |
| 794 | 800 |
| 795 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() | 801 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() |
| 796 const { | 802 const { |
| 797 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); | 803 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); |
| 798 } | 804 } |
| 799 | 805 |
| 800 } // namespace media | 806 } // namespace media |
| OLD | NEW |