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 "content/common/gpu/media/dxva_video_decode_accelerator_win.h" | 5 #include "content/common/gpu/media/dxva_video_decode_accelerator_win.h" |
6 | 6 |
7 #if !defined(OS_WIN) | 7 #if !defined(OS_WIN) |
8 #error This file should only be built on Windows. | 8 #error This file should only be built on Windows. |
9 #endif // !defined(OS_WIN) | 9 #endif // !defined(OS_WIN) |
10 | 10 |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 if (get_gl_context_cb_.is_null() || make_context_current_cb_.is_null()) { | 708 if (get_gl_context_cb_.is_null() || make_context_current_cb_.is_null()) { |
709 NOTREACHED() << "GL callbacks are required for this VDA"; | 709 NOTREACHED() << "GL callbacks are required for this VDA"; |
710 return false; | 710 return false; |
711 } | 711 } |
712 | 712 |
713 if (config.is_encrypted) { | 713 if (config.is_encrypted) { |
714 NOTREACHED() << "Encrypted streams are not supported for this VDA"; | 714 NOTREACHED() << "Encrypted streams are not supported for this VDA"; |
715 return false; | 715 return false; |
716 } | 716 } |
717 | 717 |
| 718 if (config.output_mode != Config::OutputMode::ALLOCATE) { |
| 719 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; |
| 720 return false; |
| 721 } |
| 722 |
718 client_ = client; | 723 client_ = client; |
719 | 724 |
720 main_thread_task_runner_ = base::MessageLoop::current()->task_runner(); | 725 main_thread_task_runner_ = base::MessageLoop::current()->task_runner(); |
721 | 726 |
722 bool profile_supported = false; | 727 bool profile_supported = false; |
723 for (const auto& supported_profile : kSupportedProfiles) { | 728 for (const auto& supported_profile : kSupportedProfiles) { |
724 if (config.profile == supported_profile) { | 729 if (config.profile == supported_profile) { |
725 profile_supported = true; | 730 profile_supported = true; |
726 break; | 731 break; |
727 } | 732 } |
(...skipping 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2458 hr = transform->SetOutputType(0, media_type.get(), 0); // No flags | 2463 hr = transform->SetOutputType(0, media_type.get(), 0); // No flags |
2459 RETURN_ON_HR_FAILURE(hr, "Failed to set output type", false); | 2464 RETURN_ON_HR_FAILURE(hr, "Failed to set output type", false); |
2460 return true; | 2465 return true; |
2461 } | 2466 } |
2462 media_type.Release(); | 2467 media_type.Release(); |
2463 } | 2468 } |
2464 return false; | 2469 return false; |
2465 } | 2470 } |
2466 | 2471 |
2467 } // namespace content | 2472 } // namespace content |
OLD | NEW |