| 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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 | 600 |
| 601 RETURN_AND_NOTIFY_ON_FAILURE(gl::GLFence::IsSupported(), | 601 RETURN_AND_NOTIFY_ON_FAILURE(gl::GLFence::IsSupported(), |
| 602 "GL fences are unsupported", PLATFORM_FAILURE, | 602 "GL fences are unsupported", PLATFORM_FAILURE, |
| 603 false); | 603 false); |
| 604 | 604 |
| 605 State state = GetState(); | 605 State state = GetState(); |
| 606 RETURN_AND_NOTIFY_ON_FAILURE((state == kUninitialized), | 606 RETURN_AND_NOTIFY_ON_FAILURE((state == kUninitialized), |
| 607 "Initialize: invalid state: " << state, | 607 "Initialize: invalid state: " << state, |
| 608 ILLEGAL_STATE, false); | 608 ILLEGAL_STATE, false); |
| 609 | 609 |
| 610 InitializeMediaFoundation(); | 610 RETURN_AND_NOTIFY_ON_FAILURE(InitializeMediaFoundation(), |
| 611 "Could not initialize Media Foundartion", |
| 612 PLATFORM_FAILURE, false); |
| 611 | 613 |
| 612 config_ = config; | 614 config_ = config; |
| 613 | 615 |
| 614 RETURN_AND_NOTIFY_ON_FAILURE(InitDecoder(config.profile), | 616 RETURN_AND_NOTIFY_ON_FAILURE(InitDecoder(config.profile), |
| 615 "Failed to initialize decoder", PLATFORM_FAILURE, | 617 "Failed to initialize decoder", PLATFORM_FAILURE, |
| 616 false); | 618 false); |
| 617 | 619 |
| 618 RETURN_AND_NOTIFY_ON_FAILURE(GetStreamsInfoAndBufferReqs(), | 620 RETURN_AND_NOTIFY_ON_FAILURE(GetStreamsInfoAndBufferReqs(), |
| 619 "Failed to get input/output stream info.", | 621 "Failed to get input/output stream info.", |
| 620 PLATFORM_FAILURE, false); | 622 PLATFORM_FAILURE, false); |
| (...skipping 2316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2937 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers, | 2939 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers, |
| 2938 base::Unretained(this))); | 2940 base::Unretained(this))); |
| 2939 } | 2941 } |
| 2940 | 2942 |
| 2941 uint32_t DXVAVideoDecodeAccelerator::GetTextureTarget() const { | 2943 uint32_t DXVAVideoDecodeAccelerator::GetTextureTarget() const { |
| 2942 bool provide_nv12_textures = share_nv12_textures_ || copy_nv12_textures_; | 2944 bool provide_nv12_textures = share_nv12_textures_ || copy_nv12_textures_; |
| 2943 return provide_nv12_textures ? GL_TEXTURE_EXTERNAL_OES : GL_TEXTURE_2D; | 2945 return provide_nv12_textures ? GL_TEXTURE_EXTERNAL_OES : GL_TEXTURE_2D; |
| 2944 } | 2946 } |
| 2945 | 2947 |
| 2946 } // namespace media | 2948 } // namespace media |
| OLD | NEW |