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_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
6 #define MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <vector> | 9 #include <vector> |
9 | 10 |
10 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
11 #include "media/base/bitstream_buffer.h" | 12 #include "media/base/bitstream_buffer.h" |
12 #include "media/base/video_decoder_config.h" | 13 #include "media/base/video_decoder_config.h" |
13 #include "media/video/picture.h" | 14 #include "media/video/picture.h" |
14 #include "ui/gfx/geometry/size.h" | 15 #include "ui/gfx/geometry/size.h" |
15 | 16 |
16 typedef unsigned int GLenum; | 17 typedef unsigned int GLenum; |
17 | 18 |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 virtual GLenum GetSurfaceInternalFormat() const; | 184 virtual GLenum GetSurfaceInternalFormat() const; |
184 | 185 |
185 protected: | 186 protected: |
186 // Do not delete directly; use Destroy() or own it with a scoped_ptr, which | 187 // Do not delete directly; use Destroy() or own it with a scoped_ptr, which |
187 // will Destroy() it properly by default. | 188 // will Destroy() it properly by default. |
188 virtual ~VideoDecodeAccelerator(); | 189 virtual ~VideoDecodeAccelerator(); |
189 }; | 190 }; |
190 | 191 |
191 } // namespace media | 192 } // namespace media |
192 | 193 |
193 namespace base { | 194 namespace std { |
194 | 195 |
195 template <class T> | 196 // Specialize std::default_delete so that scoped_ptr<VideoDecodeAccelerator> |
196 struct DefaultDeleter; | |
197 | |
198 // Specialize DefaultDeleter so that scoped_ptr<VideoDecodeAccelerator> always | |
199 // uses "Destroy()" instead of trying to use the destructor. | 197 // uses "Destroy()" instead of trying to use the destructor. |
200 template <> | 198 template <> |
201 struct MEDIA_EXPORT DefaultDeleter<media::VideoDecodeAccelerator> { | 199 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> { |
202 public: | 200 void operator()(media::VideoDecodeAccelerator* vda) const; |
203 void operator()(void* video_decode_accelerator) const; | |
204 }; | 201 }; |
205 | 202 |
206 } // namespace base | 203 } // namespace std |
207 | 204 |
208 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ | 205 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |