| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 // allocate as necessary. | 135 // allocate as necessary. |
| 136 scoped_ptr<SHMBuffer> GetSHM(size_t min_size); | 136 scoped_ptr<SHMBuffer> GetSHM(size_t min_size); |
| 137 | 137 |
| 138 // Return a shared-memory segment to the available pool. | 138 // Return a shared-memory segment to the available pool. |
| 139 void PutSHM(scoped_ptr<SHMBuffer> shm_buffer); | 139 void PutSHM(scoped_ptr<SHMBuffer> shm_buffer); |
| 140 | 140 |
| 141 // Destroy all PictureBuffers in |buffers|, and delete their textures. | 141 // Destroy all PictureBuffers in |buffers|, and delete their textures. |
| 142 void DestroyPictureBuffers(PictureBufferMap* buffers); | 142 void DestroyPictureBuffers(PictureBufferMap* buffers); |
| 143 | 143 |
| 144 // Returns true if the video decoder with |capabilities| can support | 144 // Returns true if the video decoder with |capabilities| can support |
| 145 // |profile| and |coded_size|. | 145 // |profile|, |coded_size|, and |is_encrypted|. |
| 146 bool IsProfileSupported( | 146 bool IsProfileSupported( |
| 147 const VideoDecodeAccelerator::Capabilities& capabilities, | 147 const VideoDecodeAccelerator::Capabilities& capabilities, |
| 148 VideoCodecProfile profile, | 148 VideoCodecProfile profile, |
| 149 const gfx::Size& coded_size); | 149 const gfx::Size& coded_size, |
| 150 bool is_encrypted); |
| 150 | 151 |
| 151 // Assert the contract that this class is operated on the right thread. | 152 // Assert the contract that this class is operated on the right thread. |
| 152 void DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() const; | 153 void DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() const; |
| 153 | 154 |
| 154 bool needs_bitstream_conversion_; | 155 bool needs_bitstream_conversion_; |
| 155 | 156 |
| 156 GpuVideoAcceleratorFactories* factories_; | 157 GpuVideoAcceleratorFactories* factories_; |
| 157 | 158 |
| 158 // Populated during Initialize() (on success) and unchanged until an error | 159 // Populated during Initialize() (on success) and unchanged until an error |
| 159 // occurs. | 160 // occurs. |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 // Bound to factories_->GetMessageLoop(). | 224 // Bound to factories_->GetMessageLoop(). |
| 224 // NOTE: Weak pointers must be invalidated before all other member variables. | 225 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 225 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_; | 226 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_; |
| 226 | 227 |
| 227 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); | 228 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); |
| 228 }; | 229 }; |
| 229 | 230 |
| 230 } // namespace media | 231 } // namespace media |
| 231 | 232 |
| 232 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ | 233 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ |
| OLD | NEW |