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/gpu/dxva_video_decode_accelerator_win.h" | 5 #include "media/gpu/dxva_video_decode_accelerator_win.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #if !defined(OS_WIN) | 9 #if !defined(OS_WIN) |
10 #error This file should only be built on Windows. | 10 #error This file should only be built on Windows. |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 if (config.output_mode != Config::OutputMode::ALLOCATE) { | 500 if (config.output_mode != Config::OutputMode::ALLOCATE) { |
501 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; | 501 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; |
502 return false; | 502 return false; |
503 } | 503 } |
504 | 504 |
505 client_ = client; | 505 client_ = client; |
506 | 506 |
507 main_thread_task_runner_ = base::ThreadTaskRunnerHandle::Get(); | 507 main_thread_task_runner_ = base::ThreadTaskRunnerHandle::Get(); |
508 | 508 |
509 if (!config.supported_output_formats.empty() && | 509 if (!config.supported_output_formats.empty() && |
510 !ContainsValue(config.supported_output_formats, PIXEL_FORMAT_NV12)) { | 510 !base::ContainsValue(config.supported_output_formats, |
| 511 PIXEL_FORMAT_NV12)) { |
511 share_nv12_textures_ = false; | 512 share_nv12_textures_ = false; |
512 copy_nv12_textures_ = false; | 513 copy_nv12_textures_ = false; |
513 } | 514 } |
514 | 515 |
515 bool profile_supported = false; | 516 bool profile_supported = false; |
516 for (const auto& supported_profile : kSupportedProfiles) { | 517 for (const auto& supported_profile : kSupportedProfiles) { |
517 if (config.profile == supported_profile) { | 518 if (config.profile == supported_profile) { |
518 profile_supported = true; | 519 profile_supported = true; |
519 break; | 520 break; |
520 } | 521 } |
(...skipping 2104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2625 SetState(kConfigChange); | 2626 SetState(kConfigChange); |
2626 Invalidate(); | 2627 Invalidate(); |
2627 Initialize(config_, client_); | 2628 Initialize(config_, client_); |
2628 decoder_thread_task_runner_->PostTask( | 2629 decoder_thread_task_runner_->PostTask( |
2629 FROM_HERE, | 2630 FROM_HERE, |
2630 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers, | 2631 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers, |
2631 base::Unretained(this))); | 2632 base::Unretained(this))); |
2632 } | 2633 } |
2633 | 2634 |
2634 } // namespace media | 2635 } // namespace media |
OLD | NEW |