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_1.h> | 8 #include <d3d11_1.h> |
9 #include <d3d9.h> | 9 #include <d3d9.h> |
10 #include <initguid.h> | 10 #include <initguid.h> |
(...skipping 14 matching lines...) Expand all Loading... |
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 "gpu/command_buffer/service/gpu_preferences.h" |
| 35 #include "media/base/video_color_space.h" |
35 #include "media/filters/h264_parser.h" | 36 #include "media/filters/h264_parser.h" |
36 #include "media/gpu/gpu_video_decode_accelerator_helpers.h" | 37 #include "media/gpu/gpu_video_decode_accelerator_helpers.h" |
37 #include "media/gpu/media_gpu_export.h" | 38 #include "media/gpu/media_gpu_export.h" |
38 #include "media/video/video_decode_accelerator.h" | 39 #include "media/video/video_decode_accelerator.h" |
39 #include "ui/gfx/color_space.h" | 40 #include "ui/gfx/color_space.h" |
40 | 41 |
41 interface IMFSample; | 42 interface IMFSample; |
42 interface IDirect3DSurface9; | 43 interface IDirect3DSurface9; |
43 | 44 |
44 namespace gl { | 45 namespace gl { |
(...skipping 21 matching lines...) Expand all Loading... |
66 class H264ConfigChangeDetector { | 67 class H264ConfigChangeDetector { |
67 public: | 68 public: |
68 H264ConfigChangeDetector(); | 69 H264ConfigChangeDetector(); |
69 ~H264ConfigChangeDetector(); | 70 ~H264ConfigChangeDetector(); |
70 | 71 |
71 // Detects stream configuration changes. | 72 // Detects stream configuration changes. |
72 // Returns false on failure. | 73 // Returns false on failure. |
73 bool DetectConfig(const uint8_t* stream, unsigned int size); | 74 bool DetectConfig(const uint8_t* stream, unsigned int size); |
74 bool config_changed() const { return config_changed_; } | 75 bool config_changed() const { return config_changed_; } |
75 | 76 |
76 gfx::ColorSpace current_color_space() const; | 77 VideoColorSpace current_color_space() const; |
77 | 78 |
78 private: | 79 private: |
79 // These fields are used to track the SPS/PPS in the H.264 bitstream and | 80 // These fields are used to track the SPS/PPS in the H.264 bitstream and |
80 // are eventually compared against the SPS/PPS in the bitstream to detect | 81 // are eventually compared against the SPS/PPS in the bitstream to detect |
81 // a change. | 82 // a change. |
82 int last_sps_id_; | 83 int last_sps_id_; |
83 std::vector<uint8_t> last_sps_; | 84 std::vector<uint8_t> last_sps_; |
84 int last_pps_id_; | 85 int last_pps_id_; |
85 std::vector<uint8_t> last_pps_; | 86 std::vector<uint8_t> last_pps_; |
86 // Set to true if we detect a stream configuration change. | 87 // Set to true if we detect a stream configuration change. |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 | 564 |
564 // Function pointer for the MFCreateDXGIDeviceManager API. | 565 // Function pointer for the MFCreateDXGIDeviceManager API. |
565 static CreateDXGIDeviceManager create_dxgi_device_manager_; | 566 static CreateDXGIDeviceManager create_dxgi_device_manager_; |
566 | 567 |
567 DISALLOW_COPY_AND_ASSIGN(DXVAVideoDecodeAccelerator); | 568 DISALLOW_COPY_AND_ASSIGN(DXVAVideoDecodeAccelerator); |
568 }; | 569 }; |
569 | 570 |
570 } // namespace media | 571 } // namespace media |
571 | 572 |
572 #endif // MEDIA_GPU_DXVA_VIDEO_DECODE_ACCELERATOR_WIN_H_ | 573 #endif // MEDIA_GPU_DXVA_VIDEO_DECODE_ACCELERATOR_WIN_H_ |
OLD | NEW |