[email protected] | a43cfae | 2013-10-19 22:14:54 | [diff] [blame] | 1 | // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef REMOTING_CODEC_SCOPED_VPX_CODEC_H_ |
| 6 | #define REMOTING_CODEC_SCOPED_VPX_CODEC_H_ |
| 7 | |
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 8 | #include <memory> |
[email protected] | a43cfae | 2013-10-19 22:14:54 | [diff] [blame] | 9 | |
| 10 | extern "C" { |
| 11 | typedef struct vpx_codec_ctx vpx_codec_ctx_t; |
| 12 | } |
| 13 | |
| 14 | namespace remoting { |
| 15 | |
| 16 | struct VpxCodecDeleter { |
| 17 | void operator()(vpx_codec_ctx_t* codec); |
| 18 | }; |
| 19 | |
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 20 | typedef std::unique_ptr<vpx_codec_ctx_t, VpxCodecDeleter> ScopedVpxCodec; |
[email protected] | a43cfae | 2013-10-19 22:14:54 | [diff] [blame] | 21 | |
| 22 | } // namespace remoting |
| 23 | |
| 24 | #endif // REMOTING_CODEC_SCOPED_VPX_CODEC_H_ |