| 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 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1406 | 1406 |
| 1407 if (!use_dx11_ || | 1407 if (!use_dx11_ || |
| 1408 !gl::g_driver_egl.ext.b_EGL_ANGLE_stream_producer_d3d_texture_nv12 || | 1408 !gl::g_driver_egl.ext.b_EGL_ANGLE_stream_producer_d3d_texture_nv12 || |
| 1409 !gl::g_driver_egl.ext.b_EGL_KHR_stream || | 1409 !gl::g_driver_egl.ext.b_EGL_KHR_stream || |
| 1410 !gl::g_driver_egl.ext.b_EGL_KHR_stream_consumer_gltexture || | 1410 !gl::g_driver_egl.ext.b_EGL_KHR_stream_consumer_gltexture || |
| 1411 !gl::g_driver_egl.ext.b_EGL_NV_stream_consumer_gltexture_yuv) { | 1411 !gl::g_driver_egl.ext.b_EGL_NV_stream_consumer_gltexture_yuv) { |
| 1412 share_nv12_textures_ = false; | 1412 share_nv12_textures_ = false; |
| 1413 copy_nv12_textures_ = false; | 1413 copy_nv12_textures_ = false; |
| 1414 } | 1414 } |
| 1415 | 1415 |
| 1416 // The MS VP9 MFT doesn't pass through the bind flags we specify, so | |
| 1417 // textures aren't created with D3D11_BIND_SHADER_RESOURCE and can't be used | |
| 1418 // from ANGLE. | |
| 1419 if (using_ms_vp9_mft_) | |
| 1420 share_nv12_textures_ = false; | |
| 1421 | |
| 1422 return true; | 1416 return true; |
| 1423 } | 1417 } |
| 1424 | 1418 |
| 1425 bool DXVAVideoDecodeAccelerator::SetDecoderMediaTypes() { | 1419 bool DXVAVideoDecodeAccelerator::SetDecoderMediaTypes() { |
| 1426 RETURN_ON_FAILURE(SetDecoderInputMediaType(), | 1420 RETURN_ON_FAILURE(SetDecoderInputMediaType(), |
| 1427 "Failed to set decoder input media type", false); | 1421 "Failed to set decoder input media type", false); |
| 1428 return SetDecoderOutputMediaType(MFVideoFormat_NV12); | 1422 return SetDecoderOutputMediaType(MFVideoFormat_NV12); |
| 1429 } | 1423 } |
| 1430 | 1424 |
| 1431 bool DXVAVideoDecodeAccelerator::SetDecoderInputMediaType() { | 1425 bool DXVAVideoDecodeAccelerator::SetDecoderInputMediaType() { |
| (...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2625 SetState(kConfigChange); | 2619 SetState(kConfigChange); |
| 2626 Invalidate(); | 2620 Invalidate(); |
| 2627 Initialize(config_, client_); | 2621 Initialize(config_, client_); |
| 2628 decoder_thread_task_runner_->PostTask( | 2622 decoder_thread_task_runner_->PostTask( |
| 2629 FROM_HERE, | 2623 FROM_HERE, |
| 2630 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers, | 2624 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers, |
| 2631 base::Unretained(this))); | 2625 base::Unretained(this))); |
| 2632 } | 2626 } |
| 2633 | 2627 |
| 2634 } // namespace media | 2628 } // namespace media |
| OLD | NEW |