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_FILTERS_GPU_VIDEO_DECODER_H_ | 5 #ifndef MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ |
6 #define MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ | 6 #define MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
129 // allocate as necessary. | 129 // allocate as necessary. |
130 scoped_ptr<SHMBuffer> GetSHM(size_t min_size); | 130 scoped_ptr<SHMBuffer> GetSHM(size_t min_size); |
131 | 131 |
132 // Return a shared-memory segment to the available pool. | 132 // Return a shared-memory segment to the available pool. |
133 void PutSHM(scoped_ptr<SHMBuffer> shm_buffer); | 133 void PutSHM(scoped_ptr<SHMBuffer> shm_buffer); |
134 | 134 |
135 // Destroy all PictureBuffers in |buffers|, and delete their textures. | 135 // Destroy all PictureBuffers in |buffers|, and delete their textures. |
136 void DestroyPictureBuffers(PictureBufferMap* buffers); | 136 void DestroyPictureBuffers(PictureBufferMap* buffers); |
137 | 137 |
138 // Returns true if the video decoder can support |profile| and |coded_size|. | 138 // Returns true if the video decoder can support |profile| and |coded_size|. |
139 bool IsProfileSupported(VideoCodecProfile profile, | 139 // On success, |matching_profile_out| contains a copy of the matching |
140 const gfx::Size& coded_size); | 140 // profile. On failure, it is undefined. |
141 bool IsProfileSupported( | |
142 VideoCodecProfile profile, | |
143 const gfx::Size& coded_size, | |
144 VideoDecodeAccelerator::SupportedProfile& matching_profile_out); | |
Pawel Osciak
2015/12/04 11:09:45
Non-const reference arguments are prohibited by co
liberato (no reviews please)
2015/12/04 18:28:58
Done.
| |
141 | 145 |
142 // Assert the contract that this class is operated on the right thread. | 146 // Assert the contract that this class is operated on the right thread. |
143 void DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() const; | 147 void DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() const; |
144 | 148 |
145 bool needs_bitstream_conversion_; | 149 bool needs_bitstream_conversion_; |
146 | 150 |
147 GpuVideoAcceleratorFactories* factories_; | 151 GpuVideoAcceleratorFactories* factories_; |
148 | 152 |
149 // Populated during Initialize() (on success) and unchanged until an error | 153 // Populated during Initialize() (on success) and unchanged until an error |
150 // occurs. | 154 // occurs. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
196 | 200 |
197 // picture_buffer_id and the frame wrapping the corresponding Picture, for | 201 // picture_buffer_id and the frame wrapping the corresponding Picture, for |
198 // frames that have been decoded but haven't been requested by a Decode() yet. | 202 // frames that have been decoded but haven't been requested by a Decode() yet. |
199 int32 next_picture_buffer_id_; | 203 int32 next_picture_buffer_id_; |
200 int32 next_bitstream_buffer_id_; | 204 int32 next_bitstream_buffer_id_; |
201 | 205 |
202 // Set during ProvidePictureBuffers(), used for checking and implementing | 206 // Set during ProvidePictureBuffers(), used for checking and implementing |
203 // HasAvailableOutputFrames(). | 207 // HasAvailableOutputFrames(). |
204 int available_pictures_; | 208 int available_pictures_; |
205 | 209 |
210 // If false, then we may assume that the VDA cannot stall sending picture | |
211 // buffers until all of them have decoded frames. If true, then it may | |
212 // stall as long as one picture buffer is outstanding. | |
213 bool can_stall_anytime_; | |
214 | |
206 // Bound to factories_->GetMessageLoop(). | 215 // Bound to factories_->GetMessageLoop(). |
207 // NOTE: Weak pointers must be invalidated before all other member variables. | 216 // NOTE: Weak pointers must be invalidated before all other member variables. |
208 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_; | 217 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_; |
209 | 218 |
210 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); | 219 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); |
211 }; | 220 }; |
212 | 221 |
213 } // namespace media | 222 } // namespace media |
214 | 223 |
215 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ | 224 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ |
OLD | NEW |