| 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 #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 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 935 if (config.is_encrypted) { | 935 if (config.is_encrypted) { |
| 936 NOTREACHED() << "Encrypted streams are not supported for this VDA"; | 936 NOTREACHED() << "Encrypted streams are not supported for this VDA"; |
| 937 return false; | 937 return false; |
| 938 } | 938 } |
| 939 | 939 |
| 940 if (config.output_mode != Config::OutputMode::ALLOCATE) { | 940 if (config.output_mode != Config::OutputMode::ALLOCATE) { |
| 941 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; | 941 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; |
| 942 return false; | 942 return false; |
| 943 } | 943 } |
| 944 | 944 |
| 945 if (config.flush_mode != Config::FlushMode::KEEP_OUTPUT_BUFFERS) { |
| 946 NOTIMPLEMENTED() << "Modes other than KEEP_OUTPUT_BUFFERS not implemented"; |
| 947 return false; |
| 948 } |
| 949 |
| 945 client_ = client; | 950 client_ = client; |
| 946 | 951 |
| 947 main_thread_task_runner_ = base::MessageLoop::current()->task_runner(); | 952 main_thread_task_runner_ = base::MessageLoop::current()->task_runner(); |
| 948 | 953 |
| 949 bool profile_supported = false; | 954 bool profile_supported = false; |
| 950 for (const auto& supported_profile : kSupportedProfiles) { | 955 for (const auto& supported_profile : kSupportedProfiles) { |
| 951 if (config.profile == supported_profile) { | 956 if (config.profile == supported_profile) { |
| 952 profile_supported = true; | 957 profile_supported = true; |
| 953 break; | 958 break; |
| 954 } | 959 } |
| (...skipping 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2971 DismissStaleBuffers(true); | 2976 DismissStaleBuffers(true); |
| 2972 Invalidate(); | 2977 Invalidate(); |
| 2973 Initialize(config_, client_); | 2978 Initialize(config_, client_); |
| 2974 decoder_thread_task_runner_->PostTask( | 2979 decoder_thread_task_runner_->PostTask( |
| 2975 FROM_HERE, | 2980 FROM_HERE, |
| 2976 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers, | 2981 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers, |
| 2977 base::Unretained(this))); | 2982 base::Unretained(this))); |
| 2978 } | 2983 } |
| 2979 | 2984 |
| 2980 } // namespace content | 2985 } // namespace content |
| OLD | NEW |