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 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 if (get_gl_context_cb_.is_null() || make_context_current_cb_.is_null()) { | 850 if (get_gl_context_cb_.is_null() || make_context_current_cb_.is_null()) { |
851 NOTREACHED() << "GL callbacks are required for this VDA"; | 851 NOTREACHED() << "GL callbacks are required for this VDA"; |
852 return false; | 852 return false; |
853 } | 853 } |
854 | 854 |
855 if (config.is_encrypted) { | 855 if (config.is_encrypted) { |
856 NOTREACHED() << "Encrypted streams are not supported for this VDA"; | 856 NOTREACHED() << "Encrypted streams are not supported for this VDA"; |
857 return false; | 857 return false; |
858 } | 858 } |
859 | 859 |
| 860 if (config.output_mode != Config::OutputMode::ALLOCATE) { |
| 861 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; |
| 862 return false; |
| 863 } |
| 864 |
860 client_ = client; | 865 client_ = client; |
861 | 866 |
862 main_thread_task_runner_ = base::MessageLoop::current()->task_runner(); | 867 main_thread_task_runner_ = base::MessageLoop::current()->task_runner(); |
863 | 868 |
864 bool profile_supported = false; | 869 bool profile_supported = false; |
865 for (const auto& supported_profile : kSupportedProfiles) { | 870 for (const auto& supported_profile : kSupportedProfiles) { |
866 if (config.profile == supported_profile) { | 871 if (config.profile == supported_profile) { |
867 profile_supported = true; | 872 profile_supported = true; |
868 break; | 873 break; |
869 } | 874 } |
(...skipping 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2661 DismissStaleBuffers(true); | 2666 DismissStaleBuffers(true); |
2662 Invalidate(); | 2667 Invalidate(); |
2663 Initialize(config_, client_); | 2668 Initialize(config_, client_); |
2664 decoder_thread_task_runner_->PostTask( | 2669 decoder_thread_task_runner_->PostTask( |
2665 FROM_HERE, | 2670 FROM_HERE, |
2666 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers, | 2671 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers, |
2667 base::Unretained(this))); | 2672 base::Unretained(this))); |
2668 } | 2673 } |
2669 | 2674 |
2670 } // namespace content | 2675 } // namespace content |
OLD | NEW |