| 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 decode |coded_size|. |
| 131 bool IsCodedSizeSupported(const gfx::Size& coded_size); |
| 132 |
| 133 // Returns true if the |profile| is in supported profiles list. |
| 134 bool IsProfileSupported(const VideoCodecProfile& profile); |
| 135 |
| 130 // Assert the contract that this class is operated on the right thread. | 136 // Assert the contract that this class is operated on the right thread. |
| 131 void DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() const; | 137 void DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() const; |
| 132 | 138 |
| 133 bool needs_bitstream_conversion_; | 139 bool needs_bitstream_conversion_; |
| 134 | 140 |
| 135 scoped_refptr<GpuVideoAcceleratorFactories> factories_; | 141 scoped_refptr<GpuVideoAcceleratorFactories> factories_; |
| 136 | 142 |
| 137 // Populated during Initialize() (on success) and unchanged until an error | 143 // Populated during Initialize() (on success) and unchanged until an error |
| 138 // occurs. | 144 // occurs. |
| 139 scoped_ptr<VideoDecodeAccelerator> vda_; | 145 scoped_ptr<VideoDecodeAccelerator> vda_; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 // Bound to factories_->GetMessageLoop(). | 195 // Bound to factories_->GetMessageLoop(). |
| 190 // NOTE: Weak pointers must be invalidated before all other member variables. | 196 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 191 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_; | 197 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_; |
| 192 | 198 |
| 193 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); | 199 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); |
| 194 }; | 200 }; |
| 195 | 201 |
| 196 } // namespace media | 202 } // namespace media |
| 197 | 203 |
| 198 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ | 204 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ |
| OLD | NEW |