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

Side by Side Diff: media/filters/ffmpeg_video_decoder.h

Issue 101623006: Created VideoFramePool to avoid unnecessary VideoFrame alloc/free. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change SimpleFormatChange test so it can pass on Android. Created 7 years 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/base/video_frame_pool_unittest.cc ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_FFMPEG_VIDEO_DECODER_H_ 5 #ifndef MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_
6 #define MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ 6 #define MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "media/base/video_decoder.h" 13 #include "media/base/video_decoder.h"
14 #include "media/base/video_decoder_config.h" 14 #include "media/base/video_decoder_config.h"
15 #include "media/base/video_frame_pool.h"
15 16
16 struct AVCodecContext; 17 struct AVCodecContext;
17 struct AVFrame; 18 struct AVFrame;
18 19
19 namespace base { 20 namespace base {
20 class MessageLoopProxy; 21 class MessageLoopProxy;
21 } 22 }
22 23
23 namespace media { 24 namespace media {
24 25
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 79
79 DecodeCB decode_cb_; 80 DecodeCB decode_cb_;
80 base::Closure reset_cb_; 81 base::Closure reset_cb_;
81 82
82 // FFmpeg structures owned by this object. 83 // FFmpeg structures owned by this object.
83 scoped_ptr_malloc<AVCodecContext, ScopedPtrAVFreeContext> codec_context_; 84 scoped_ptr_malloc<AVCodecContext, ScopedPtrAVFreeContext> codec_context_;
84 scoped_ptr_malloc<AVFrame, ScopedPtrAVFreeFrame> av_frame_; 85 scoped_ptr_malloc<AVFrame, ScopedPtrAVFreeFrame> av_frame_;
85 86
86 VideoDecoderConfig config_; 87 VideoDecoderConfig config_;
87 88
89 VideoFramePool frame_pool_;
90
88 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder); 91 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoder);
89 }; 92 };
90 93
91 } // namespace media 94 } // namespace media
92 95
93 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_ 96 #endif // MEDIA_FILTERS_FFMPEG_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « media/base/video_frame_pool_unittest.cc ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698