Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: media/ffmpeg/ffmpeg_deleters.h

Issue 197793005: Convert scoped_ptr_malloc -> scoped_ptr, part 5. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/ffmpeg/ffmpeg_common.h ('k') | media/filters/ffmpeg_audio_decoder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 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 // This file contains declarations for deleters for use with |scoped_ptr|. To
6 // avoid requiring additional #includes, the (inline) definitions are in
7 // ffmpeg_common.h. (Forward declarations of deleters aren't sufficient for
8 // |scoped_ptr|.)
9
10 #ifndef MEDIA_FFMPEG_FFMPEG_DELETERS_H_
11 #define MEDIA_FFMPEG_FFMPEG_DELETERS_H_
12
13 namespace media {
14
15 // Wraps FFmpeg's av_free() in a class that can be passed as a template argument
16 // to scoped_ptr_malloc.
17 struct ScopedPtrAVFree {
18 void operator()(void* x) const;
19 };
20
21 // This assumes that the AVPacket being captured was allocated outside of
22 // FFmpeg via the new operator. Do not use this with AVPacket instances that
23 // are allocated via malloc() or av_malloc().
24 struct ScopedPtrAVFreePacket {
25 void operator()(void* x) const;
26 };
27
28 // Frees an AVCodecContext object in a class that can be passed as a Deleter
29 // argument to scoped_ptr_malloc.
30 struct ScopedPtrAVFreeContext {
31 void operator()(void* x) const;
32 };
33
34 // Frees an AVFrame object in a class that can be passed as a Deleter argument
35 // to scoped_ptr_malloc.
36 struct ScopedPtrAVFreeFrame {
37 void operator()(void* x) const;
38 };
39
40 } // namespace media
41
42 #endif // MEDIA_FFMPEG_FFMPEG_DELETERS_H_
OLDNEW
« no previous file with comments | « media/ffmpeg/ffmpeg_common.h ('k') | media/filters/ffmpeg_audio_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698