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

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

Issue 2128663003: Correctly handle reusing reset picture buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | media/gpu/dxva_picture_buffer_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_PICTURE_BUFFER_WIN_H_ 5 #ifndef MEDIA_GPU_DXVA_PICTURE_BUFFER_WIN_H_
6 #define MEDIA_GPU_DXVA_PICTURE_BUFFER_WIN_H_ 6 #define MEDIA_GPU_DXVA_PICTURE_BUFFER_WIN_H_
7 7
8 #include <d3d11.h> 8 #include <d3d11.h>
9 #include <d3d9.h> 9 #include <d3d9.h>
10 #include <mfidl.h> 10 #include <mfidl.h>
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 bool CopyOutputSampleDataToPictureBuffer(DXVAVideoDecodeAccelerator* decoder, 156 bool CopyOutputSampleDataToPictureBuffer(DXVAVideoDecodeAccelerator* decoder,
157 IDirect3DSurface9* dest_surface, 157 IDirect3DSurface9* dest_surface,
158 ID3D11Texture2D* dx11_texture, 158 ID3D11Texture2D* dx11_texture,
159 int input_buffer_id) override; 159 int input_buffer_id) override;
160 bool CopySurfaceComplete(IDirect3DSurface9* src_surface, 160 bool CopySurfaceComplete(IDirect3DSurface9* src_surface,
161 IDirect3DSurface9* dest_surface) override; 161 IDirect3DSurface9* dest_surface) override;
162 162
163 private: 163 private:
164 EGLStreamKHR stream_; 164 EGLStreamKHR stream_;
165 165
166 // True if the copy has been completed and it has not been set for reuse
167 // yet.
168 bool frame_in_consumer_ = false;
169
166 // This ID3D11Texture2D interface pointer is used to hold a reference to the 170 // This ID3D11Texture2D interface pointer is used to hold a reference to the
167 // MFT decoder texture during the course of a copy operation. This reference 171 // MFT decoder texture during the course of a copy operation. This reference
168 // is released when the copy completes. 172 // is released when the copy completes.
169 base::win::ScopedComPtr<ID3D11Texture2D> dx11_decoding_texture_; 173 base::win::ScopedComPtr<ID3D11Texture2D> dx11_decoding_texture_;
170 174
171 base::win::ScopedComPtr<IDXGIKeyedMutex> egl_keyed_mutex_; 175 base::win::ScopedComPtr<IDXGIKeyedMutex> egl_keyed_mutex_;
172 base::win::ScopedComPtr<IDXGIKeyedMutex> dx11_keyed_mutex_; 176 base::win::ScopedComPtr<IDXGIKeyedMutex> dx11_keyed_mutex_;
173 177
174 HANDLE texture_share_handle_; 178 HANDLE texture_share_handle_;
175 // This is the texture (created on ANGLE's device) that will be put in the 179 // This is the texture (created on ANGLE's device) that will be put in the
176 // EGLStream. 180 // EGLStream.
177 base::win::ScopedComPtr<ID3D11Texture2D> angle_copy_texture_; 181 base::win::ScopedComPtr<ID3D11Texture2D> angle_copy_texture_;
178 // This is another copy of that shared resource that will be copied to from 182 // This is another copy of that shared resource that will be copied to from
179 // the decoder. 183 // the decoder.
180 base::win::ScopedComPtr<ID3D11Texture2D> decoder_copy_texture_; 184 base::win::ScopedComPtr<ID3D11Texture2D> decoder_copy_texture_;
181 185
182 // This is the last value that was used to release the keyed mutex. 186 // This is the last value that was used to release the keyed mutex.
183 uint64_t keyed_mutex_value_ = 0; 187 uint64_t keyed_mutex_value_ = 0;
184 }; 188 };
185 189
186 } // namespace media 190 } // namespace media
187 191
188 #endif // MEDIA_GPU_DXVA_PICTURE_BUFFER_WIN_H_ 192 #endif // MEDIA_GPU_DXVA_PICTURE_BUFFER_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | media/gpu/dxva_picture_buffer_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698