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

Side by Side Diff: content/common/gpu/media/vt_video_decode_accelerator.h

Issue 753713002: Remove reliance on VideoToolbox frame ordering. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@vt_pic_order
Patch Set: Created 6 years 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 | content/common/gpu/media/vt_video_decode_accelerator.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_ 5 #ifndef CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_
6 #define CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_ 6 #define CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 }; 166 };
167 167
168 // Queue of decoded frames in presentation order. 168 // Queue of decoded frames in presentation order.
169 std::priority_queue<linked_ptr<Frame>, 169 std::priority_queue<linked_ptr<Frame>,
170 std::vector<linked_ptr<Frame>>, 170 std::vector<linked_ptr<Frame>>,
171 FrameOrder> reorder_queue_; 171 FrameOrder> reorder_queue_;
172 172
173 // Size of assigned picture buffers. 173 // Size of assigned picture buffers.
174 gfx::Size picture_size_; 174 gfx::Size picture_size_;
175 175
176 // Queue of frames that have not yet been decoded; maintains ownership of the 176 // Frames that have not yet been decoded; maintains ownership of Frame objects
177 // Frame objects while they flow through VideoToolbox. 177 // while they flow through VideoToolbox.
178 std::queue<linked_ptr<Frame>> pending_frames_; 178 std::map<Frame*, linked_ptr<Frame>> pending_frames_;
DaleCurtis 2014/11/22 00:10:51 Why not just an std::set?
sandersd (OOO until July 31) 2014/11/22 00:20:40 The linked_ptr is keeping the object alive in this
DaleCurtis 2014/11/22 00:25:06 This is really nasty though. Are you really saving
sandersd (OOO until July 31) 2014/11/22 00:32:48 No, but inside the task I'd have to have this same
DaleCurtis 2014/11/22 00:53:40 I don't follow why you'd change the tasks... they
sandersd (OOO until July 31) 2014/11/22 00:55:50 Sorry, that's DecodeTask().
DaleCurtis 2014/11/25 21:56:20 I still don't follow your arguments against set<Fr
179 179
180 // Set of assigned bitstream IDs, so that Destroy() can release them all. 180 // Set of assigned bitstream IDs, so that Destroy() can release them all.
181 std::set<int32_t> assigned_bitstream_ids_; 181 std::set<int32_t> assigned_bitstream_ids_;
182 182
183 // All picture buffers assigned to us. Used to check if reused picture buffers 183 // All picture buffers assigned to us. Used to check if reused picture buffers
184 // should be added back to the available list or released. (They are not 184 // should be added back to the available list or released. (They are not
185 // released immediately because we need the reuse event to free the binding.) 185 // released immediately because we need the reuse event to free the binding.)
186 std::set<int32_t> assigned_picture_ids_; 186 std::set<int32_t> assigned_picture_ids_;
187 187
188 // Texture IDs of assigned pictures. 188 // Texture IDs of assigned pictures.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // Declared last to ensure that all weak pointers are invalidated before 221 // Declared last to ensure that all weak pointers are invalidated before
222 // other destructors run. 222 // other destructors run.
223 base::WeakPtrFactory<VTVideoDecodeAccelerator> weak_this_factory_; 223 base::WeakPtrFactory<VTVideoDecodeAccelerator> weak_this_factory_;
224 224
225 DISALLOW_COPY_AND_ASSIGN(VTVideoDecodeAccelerator); 225 DISALLOW_COPY_AND_ASSIGN(VTVideoDecodeAccelerator);
226 }; 226 };
227 227
228 } // namespace content 228 } // namespace content
229 229
230 #endif // CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_ 230 #endif // CONTENT_COMMON_GPU_MEDIA_VT_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/media/vt_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698