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