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 client_ = NULL; | 600 client_ = NULL; |
601 } | 601 } |
602 | 602 |
603 bool DXVAVideoDecodeAccelerator::Initialize(const Config& config, | 603 bool DXVAVideoDecodeAccelerator::Initialize(const Config& config, |
604 Client* client) { | 604 Client* client) { |
605 if (get_gl_context_cb_.is_null() || make_context_current_cb_.is_null()) { | 605 if (get_gl_context_cb_.is_null() || make_context_current_cb_.is_null()) { |
606 NOTREACHED() << "GL callbacks are required for this VDA"; | 606 NOTREACHED() << "GL callbacks are required for this VDA"; |
607 return false; | 607 return false; |
608 } | 608 } |
609 | 609 |
610 if (config.is_encrypted) { | 610 if (config.is_encrypted()) { |
611 NOTREACHED() << "Encrypted streams are not supported for this VDA"; | 611 NOTREACHED() << "Encrypted streams are not supported for this VDA"; |
612 return false; | 612 return false; |
613 } | 613 } |
614 | 614 |
615 if (config.output_mode != Config::OutputMode::ALLOCATE) { | 615 if (config.output_mode != Config::OutputMode::ALLOCATE) { |
616 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; | 616 NOTREACHED() << "Only ALLOCATE OutputMode is supported by this VDA"; |
617 return false; | 617 return false; |
618 } | 618 } |
619 | 619 |
620 client_ = client; | 620 client_ = client; |
(...skipping 2024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2645 DismissStaleBuffers(true); | 2645 DismissStaleBuffers(true); |
2646 Invalidate(); | 2646 Invalidate(); |
2647 Initialize(config_, client_); | 2647 Initialize(config_, client_); |
2648 decoder_thread_task_runner_->PostTask( | 2648 decoder_thread_task_runner_->PostTask( |
2649 FROM_HERE, | 2649 FROM_HERE, |
2650 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers, | 2650 base::Bind(&DXVAVideoDecodeAccelerator::DecodePendingInputBuffers, |
2651 base::Unretained(this))); | 2651 base::Unretained(this))); |
2652 } | 2652 } |
2653 | 2653 |
2654 } // namespace media | 2654 } // namespace media |
OLD | NEW |