Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: media/gpu/dxva_video_decode_accelerator_win.h

Issue 2345123002: Attach color space information to hardware decoded NV12 video frames. (Closed)
Patch Set: compile fixes for several platforms Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 18 matching lines...) Expand all
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/filters/h264_parser.h" 35 #include "media/filters/h264_parser.h"
36 #include "media/gpu/gpu_video_decode_accelerator_helpers.h" 36 #include "media/gpu/gpu_video_decode_accelerator_helpers.h"
37 #include "media/gpu/media_gpu_export.h" 37 #include "media/gpu/media_gpu_export.h"
38 #include "media/video/video_decode_accelerator.h" 38 #include "media/video/video_decode_accelerator.h"
39 #include "ui/gfx/color_space.h"
39 40
40 interface IMFSample; 41 interface IMFSample;
41 interface IDirect3DSurface9; 42 interface IDirect3DSurface9;
42 43
43 namespace gl { 44 namespace gl {
44 class GLContext; 45 class GLContext;
45 } 46 }
46 47
47 namespace gpu { 48 namespace gpu {
48 class GpuDriverBugWorkarounds; 49 class GpuDriverBugWorkarounds;
(...skipping 17 matching lines...) Expand all
66 public: 67 public:
67 H264ConfigChangeDetector(); 68 H264ConfigChangeDetector();
68 ~H264ConfigChangeDetector(); 69 ~H264ConfigChangeDetector();
69 70
70 // Detects stream configuration changes. 71 // Detects stream configuration changes.
71 // Returns false on failure. 72 // Returns false on failure.
72 bool DetectConfig(const uint8_t* stream, unsigned int size); 73 bool DetectConfig(const uint8_t* stream, unsigned int size);
73 74
74 bool config_changed() const { return config_changed_; } 75 bool config_changed() const { return config_changed_; }
75 76
77 gfx::ColorSpace current_color_space() const;
78
76 private: 79 private:
77 // 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
78 // 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
79 // a change. 82 // a change.
80 int last_sps_id_; 83 int last_sps_id_;
81 std::vector<uint8_t> last_sps_; 84 std::vector<uint8_t> last_sps_;
82 int last_pps_id_; 85 int last_pps_id_;
83 std::vector<uint8_t> last_pps_; 86 std::vector<uint8_t> last_pps_;
84 // Set to true if we detect a stream configuration change. 87 // Set to true if we detect a stream configuration change.
85 bool config_changed_; 88 bool config_changed_;
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 516
514 // Function pointer for the MFCreateDXGIDeviceManager API. 517 // Function pointer for the MFCreateDXGIDeviceManager API.
515 static CreateDXGIDeviceManager create_dxgi_device_manager_; 518 static CreateDXGIDeviceManager create_dxgi_device_manager_;
516 519
517 DISALLOW_COPY_AND_ASSIGN(DXVAVideoDecodeAccelerator); 520 DISALLOW_COPY_AND_ASSIGN(DXVAVideoDecodeAccelerator);
518 }; 521 };
519 522
520 } // namespace media 523 } // namespace media
521 524
522 #endif // MEDIA_GPU_DXVA_VIDEO_DECODE_ACCELERATOR_WIN_H_ 525 #endif // MEDIA_GPU_DXVA_VIDEO_DECODE_ACCELERATOR_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698