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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 client_ = NULL; | 529 client_ = NULL; |
530 } | 530 } |
531 | 531 |
532 bool DXVAVideoDecodeAccelerator::Initialize(const Config& config, | 532 bool DXVAVideoDecodeAccelerator::Initialize(const Config& config, |
533 Client* client) { | 533 Client* client) { |
534 if (get_gl_context_cb_.is_null() || make_context_current_cb_.is_null()) { | 534 if (get_gl_context_cb_.is_null() || make_context_current_cb_.is_null()) { |
535 NOTREACHED() << "GL callbacks are required for this VDA"; | 535 NOTREACHED() << "GL callbacks are required for this VDA"; |
536 return false; | 536 return false; |
537 } | 537 } |
538 | 538 |
539 if (config.is_encrypted) { | 539 if (config.is_encrypted()) { |
540 NOTREACHED() << "Encrypted streams are not supported for this VDA"; | 540 NOTREACHED() << "Encrypted streams are not supported for this VDA"; |
541 return false; | 541 return false; |
542 } | 542 } |
543 | 543 |
544 if (config.output_mode != Config::OutputMode::ALLOCATE) { | 544 if (config.output_mode != Config::OutputMode::ALLOCATE) { |
545 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; | 545 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; |
546 return false; | 546 return false; |
547 } | 547 } |
548 | 548 |
549 client_ = client; | 549 client_ = client; |
(...skipping 2345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2895 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers, | 2895 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers, |
2896 base::Unretained(this))); | 2896 base::Unretained(this))); |
2897 } | 2897 } |
2898 | 2898 |
2899 uint32_t DXVAVideoDecodeAccelerator::GetTextureTarget() const { | 2899 uint32_t DXVAVideoDecodeAccelerator::GetTextureTarget() const { |
2900 bool provide_nv12_textures = share_nv12_textures_ || copy_nv12_textures_; | 2900 bool provide_nv12_textures = share_nv12_textures_ || copy_nv12_textures_; |
2901 return provide_nv12_textures ? GL_TEXTURE_EXTERNAL_OES : GL_TEXTURE_2D; | 2901 return provide_nv12_textures ? GL_TEXTURE_EXTERNAL_OES : GL_TEXTURE_2D; |
2902 } | 2902 } |
2903 | 2903 |
2904 } // namespace media | 2904 } // namespace media |
OLD | NEW |