| 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 if (config.format() == PIXEL_FORMAT_YV12A) { | 245 if (config.format() == PIXEL_FORMAT_YV12A) { |
| 246 DVLOG(1) << "Alpha transparency formats are not supported."; | 246 DVLOG(1) << "Alpha transparency formats are not supported."; |
| 247 bound_init_cb.Run(false); | 247 bound_init_cb.Run(false); |
| 248 return; | 248 return; |
| 249 } | 249 } |
| 250 | 250 |
| 251 VideoDecodeAccelerator::Capabilities capabilities = | 251 VideoDecodeAccelerator::Capabilities capabilities = |
| 252 factories_->GetVideoDecodeAcceleratorCapabilities(); | 252 factories_->GetVideoDecodeAcceleratorCapabilities(); |
| 253 if (!IsProfileSupported(capabilities, config.profile(), config.coded_size(), | 253 if (!IsProfileSupported(capabilities, config.profile(), config.coded_size(), |
| 254 config.is_encrypted())) { | 254 config.is_encrypted())) { |
| 255 DVLOG(1) << "Unsupported profile " << config.profile() | 255 DVLOG(1) << "Unsupported profile " << GetProfileName(config.profile()) |
| 256 << ", unsupported coded size " << config.coded_size().ToString() | 256 << ", unsupported coded size " << config.coded_size().ToString() |
| 257 << ", or accelerator should only be used for encrypted content. " | 257 << ", or accelerator should only be used for encrypted content. " |
| 258 << " is_encrypted: " << (config.is_encrypted() ? "yes." : "no."); | 258 << " is_encrypted: " << (config.is_encrypted() ? "yes." : "no."); |
| 259 bound_init_cb.Run(false); | 259 bound_init_cb.Run(false); |
| 260 return; | 260 return; |
| 261 } | 261 } |
| 262 | 262 |
| 263 config_ = config; | 263 config_ = config; |
| 264 needs_all_picture_buffers_to_decode_ = | 264 needs_all_picture_buffers_to_decode_ = |
| 265 capabilities.flags & | 265 capabilities.flags & |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 } | 901 } |
| 902 return false; | 902 return false; |
| 903 } | 903 } |
| 904 | 904 |
| 905 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() | 905 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() |
| 906 const { | 906 const { |
| 907 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); | 907 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); |
| 908 } | 908 } |
| 909 | 909 |
| 910 } // namespace media | 910 } // namespace media |
| OLD | NEW |