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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 bool use_keyed_mutex_; | 486 bool use_keyed_mutex_; |
486 | 487 |
487 // Set to true if the DX11 video format converter input media types need to | 488 // Set to true if the DX11 video format converter input media types need to |
488 // be initialized. Defaults to true. | 489 // be initialized. Defaults to true. |
489 bool dx11_video_format_converter_media_type_needs_init_; | 490 bool dx11_video_format_converter_media_type_needs_init_; |
490 | 491 |
491 // Set to true if we are sharing ANGLE's device. | 492 // Set to true if we are sharing ANGLE's device. |
492 bool using_angle_device_; | 493 bool using_angle_device_; |
493 | 494 |
494 // Enables experimental hardware acceleration for VP8/VP9 video decoding. | 495 // Enables experimental hardware acceleration for VP8/VP9 video decoding. |
495 const bool enable_accelerated_vpx_decode_; | 496 const gpu::GpuPreferences::VpxDecodeVendors enable_accelerated_vpx_decode_; |
496 | 497 |
497 // The media foundation H.264 decoder has problems handling changes like | 498 // The media foundation H.264 decoder has problems handling changes like |
498 // resolution change, bitrate change etc. If we reinitialize the decoder | 499 // resolution change, bitrate change etc. If we reinitialize the decoder |
499 // when these changes occur then, the decoder works fine. The | 500 // when these changes occur then, the decoder works fine. The |
500 // H264ConfigChangeDetector class provides functionality to check if the | 501 // H264ConfigChangeDetector class provides functionality to check if the |
501 // stream configuration changed. | 502 // stream configuration changed. |
502 std::unique_ptr<H264ConfigChangeDetector> config_change_detector_; | 503 std::unique_ptr<H264ConfigChangeDetector> config_change_detector_; |
503 | 504 |
504 // Contains the initialization parameters for the video. | 505 // Contains the initialization parameters for the video. |
505 Config config_; | 506 Config config_; |
506 | 507 |
507 // Set to true if we are processing a video configuration change. | 508 // Set to true if we are processing a video configuration change. |
508 bool processing_config_changed_; | 509 bool processing_config_changed_; |
509 | 510 |
510 // WeakPtrFactory for posting tasks back to |this|. | 511 // WeakPtrFactory for posting tasks back to |this|. |
511 base::WeakPtrFactory<DXVAVideoDecodeAccelerator> weak_this_factory_; | 512 base::WeakPtrFactory<DXVAVideoDecodeAccelerator> weak_this_factory_; |
512 | 513 |
513 // Function pointer for the MFCreateDXGIDeviceManager API. | 514 // Function pointer for the MFCreateDXGIDeviceManager API. |
514 static CreateDXGIDeviceManager create_dxgi_device_manager_; | 515 static CreateDXGIDeviceManager create_dxgi_device_manager_; |
515 | 516 |
516 DISALLOW_COPY_AND_ASSIGN(DXVAVideoDecodeAccelerator); | 517 DISALLOW_COPY_AND_ASSIGN(DXVAVideoDecodeAccelerator); |
517 }; | 518 }; |
518 | 519 |
519 } // namespace media | 520 } // namespace media |
520 | 521 |
521 #endif // MEDIA_GPU_DXVA_VIDEO_DECODE_ACCELERATOR_WIN_H_ | 522 #endif // MEDIA_GPU_DXVA_VIDEO_DECODE_ACCELERATOR_WIN_H_ |
OLD | NEW |