| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // Request a shared-memory segment of at least |min_size| bytes. Will | 120 // Request a shared-memory segment of at least |min_size| bytes. Will |
| 121 // allocate as necessary. | 121 // allocate as necessary. |
| 122 scoped_ptr<SHMBuffer> GetSHM(size_t min_size); | 122 scoped_ptr<SHMBuffer> GetSHM(size_t min_size); |
| 123 | 123 |
| 124 // Return a shared-memory segment to the available pool. | 124 // Return a shared-memory segment to the available pool. |
| 125 void PutSHM(scoped_ptr<SHMBuffer> shm_buffer); | 125 void PutSHM(scoped_ptr<SHMBuffer> shm_buffer); |
| 126 | 126 |
| 127 // Destroy all PictureBuffers in |buffers|, and delete their textures. | 127 // Destroy all PictureBuffers in |buffers|, and delete their textures. |
| 128 void DestroyPictureBuffers(PictureBufferMap* buffers); | 128 void DestroyPictureBuffers(PictureBufferMap* buffers); |
| 129 | 129 |
| 130 // Returns true if the video decoder can support |profile| and |coded_size|. |
| 131 bool IsProfileSupported(VideoCodecProfile profile, |
| 132 const gfx::Size& coded_size); |
| 133 |
| 130 // Assert the contract that this class is operated on the right thread. | 134 // Assert the contract that this class is operated on the right thread. |
| 131 void DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() const; | 135 void DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() const; |
| 132 | 136 |
| 133 bool needs_bitstream_conversion_; | 137 bool needs_bitstream_conversion_; |
| 134 | 138 |
| 135 scoped_refptr<GpuVideoAcceleratorFactories> factories_; | 139 scoped_refptr<GpuVideoAcceleratorFactories> factories_; |
| 136 | 140 |
| 137 // Populated during Initialize() (on success) and unchanged until an error | 141 // Populated during Initialize() (on success) and unchanged until an error |
| 138 // occurs. | 142 // occurs. |
| 139 scoped_ptr<VideoDecodeAccelerator> vda_; | 143 scoped_ptr<VideoDecodeAccelerator> vda_; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 // Bound to factories_->GetMessageLoop(). | 193 // Bound to factories_->GetMessageLoop(). |
| 190 // NOTE: Weak pointers must be invalidated before all other member variables. | 194 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 191 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_; | 195 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_; |
| 192 | 196 |
| 193 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); | 197 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); |
| 194 }; | 198 }; |
| 195 | 199 |
| 196 } // namespace media | 200 } // namespace media |
| 197 | 201 |
| 198 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ | 202 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ |
| OLD | NEW |