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 #ifndef MEDIA_GPU_DXVA_VIDEO_DECODE_ACCELERATOR_WIN_H_ | 5 #ifndef MEDIA_GPU_DXVA_VIDEO_DECODE_ACCELERATOR_WIN_H_ |
6 #define MEDIA_GPU_DXVA_VIDEO_DECODE_ACCELERATOR_WIN_H_ | 6 #define MEDIA_GPU_DXVA_VIDEO_DECODE_ACCELERATOR_WIN_H_ |
7 | 7 |
8 #include <d3d11.h> | 8 #include <d3d11.h> |
9 #include <d3d9.h> | 9 #include <d3d9.h> |
10 #include <initguid.h> | 10 #include <initguid.h> |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include <vector> | 24 #include <vector> |
25 | 25 |
26 #include "base/compiler_specific.h" | 26 #include "base/compiler_specific.h" |
27 #include "base/macros.h" | 27 #include "base/macros.h" |
28 #include "base/memory/linked_ptr.h" | 28 #include "base/memory/linked_ptr.h" |
29 #include "base/memory/weak_ptr.h" | 29 #include "base/memory/weak_ptr.h" |
30 #include "base/synchronization/lock.h" | 30 #include "base/synchronization/lock.h" |
31 #include "base/threading/non_thread_safe.h" | 31 #include "base/threading/non_thread_safe.h" |
32 #include "base/threading/thread.h" | 32 #include "base/threading/thread.h" |
33 #include "base/win/scoped_comptr.h" | 33 #include "base/win/scoped_comptr.h" |
| 34 #include "gpu/command_buffer/service/gpu_preferences.h" |
34 #include "media/filters/h264_parser.h" | 35 #include "media/filters/h264_parser.h" |
35 #include "media/gpu/gpu_video_decode_accelerator_helpers.h" | 36 #include "media/gpu/gpu_video_decode_accelerator_helpers.h" |
36 #include "media/gpu/media_gpu_export.h" | 37 #include "media/gpu/media_gpu_export.h" |
37 #include "media/video/video_decode_accelerator.h" | 38 #include "media/video/video_decode_accelerator.h" |
38 | 39 |
39 interface IMFSample; | 40 interface IMFSample; |
40 interface IDirect3DSurface9; | 41 interface IDirect3DSurface9; |
41 | 42 |
42 namespace gl { | 43 namespace gl { |
43 class GLContext; | 44 class GLContext; |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 bool use_keyed_mutex_; | 467 bool use_keyed_mutex_; |
467 | 468 |
468 // Set to true if the DX11 video format converter input media types need to | 469 // Set to true if the DX11 video format converter input media types need to |
469 // be initialized. Defaults to true. | 470 // be initialized. Defaults to true. |
470 bool dx11_video_format_converter_media_type_needs_init_; | 471 bool dx11_video_format_converter_media_type_needs_init_; |
471 | 472 |
472 // Set to true if we are sharing ANGLE's device. | 473 // Set to true if we are sharing ANGLE's device. |
473 bool using_angle_device_; | 474 bool using_angle_device_; |
474 | 475 |
475 // Enables experimental hardware acceleration for VP8/VP9 video decoding. | 476 // Enables experimental hardware acceleration for VP8/VP9 video decoding. |
476 const bool enable_accelerated_vpx_decode_; | 477 const gpu::GpuPreferences::VpxDecodeVendors enable_accelerated_vpx_decode_; |
477 | 478 |
478 // The media foundation H.264 decoder has problems handling changes like | 479 // The media foundation H.264 decoder has problems handling changes like |
479 // resolution change, bitrate change etc. If we reinitialize the decoder | 480 // resolution change, bitrate change etc. If we reinitialize the decoder |
480 // when these changes occur then, the decoder works fine. The | 481 // when these changes occur then, the decoder works fine. The |
481 // H264ConfigChangeDetector class provides functionality to check if the | 482 // H264ConfigChangeDetector class provides functionality to check if the |
482 // stream configuration changed. | 483 // stream configuration changed. |
483 std::unique_ptr<H264ConfigChangeDetector> config_change_detector_; | 484 std::unique_ptr<H264ConfigChangeDetector> config_change_detector_; |
484 | 485 |
485 // Contains the initialization parameters for the video. | 486 // Contains the initialization parameters for the video. |
486 Config config_; | 487 Config config_; |
487 | 488 |
488 // Set to true if we are processing a video configuration change. | 489 // Set to true if we are processing a video configuration change. |
489 bool processing_config_changed_; | 490 bool processing_config_changed_; |
490 | 491 |
491 // WeakPtrFactory for posting tasks back to |this|. | 492 // WeakPtrFactory for posting tasks back to |this|. |
492 base::WeakPtrFactory<DXVAVideoDecodeAccelerator> weak_this_factory_; | 493 base::WeakPtrFactory<DXVAVideoDecodeAccelerator> weak_this_factory_; |
493 | 494 |
494 // Function pointer for the MFCreateDXGIDeviceManager API. | 495 // Function pointer for the MFCreateDXGIDeviceManager API. |
495 static CreateDXGIDeviceManager create_dxgi_device_manager_; | 496 static CreateDXGIDeviceManager create_dxgi_device_manager_; |
496 | 497 |
497 DISALLOW_COPY_AND_ASSIGN(DXVAVideoDecodeAccelerator); | 498 DISALLOW_COPY_AND_ASSIGN(DXVAVideoDecodeAccelerator); |
498 }; | 499 }; |
499 | 500 |
500 } // namespace media | 501 } // namespace media |
501 | 502 |
502 #endif // MEDIA_GPU_DXVA_VIDEO_DECODE_ACCELERATOR_WIN_H_ | 503 #endif // MEDIA_GPU_DXVA_VIDEO_DECODE_ACCELERATOR_WIN_H_ |
OLD | NEW |