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

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

Issue 193303002: WeakPtr destruction order cleanup: media edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. 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/filters/video_renderer_impl.cc ('k') | media/filters/vpx_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_VPX_VIDEO_DECODER_H_ 5 #ifndef MEDIA_FILTERS_VPX_VIDEO_DECODER_H_
6 #define MEDIA_FILTERS_VPX_VIDEO_DECODER_H_ 6 #define MEDIA_FILTERS_VPX_VIDEO_DECODER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/weak_ptr.h"
10 #include "media/base/demuxer_stream.h" 9 #include "media/base/demuxer_stream.h"
11 #include "media/base/video_decoder.h" 10 #include "media/base/video_decoder.h"
12 #include "media/base/video_decoder_config.h" 11 #include "media/base/video_decoder_config.h"
13 #include "media/base/video_frame.h" 12 #include "media/base/video_frame.h"
14 #include "media/base/video_frame_pool.h" 13 #include "media/base/video_frame_pool.h"
15 14
16 struct vpx_codec_ctx; 15 struct vpx_codec_ctx;
17 struct vpx_image; 16 struct vpx_image;
18 17
19 namespace base { 18 namespace base {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 scoped_refptr<VideoFrame>* video_frame); 60 scoped_refptr<VideoFrame>* video_frame);
62 61
63 // Reset decoder and call |reset_cb_|. 62 // Reset decoder and call |reset_cb_|.
64 void DoReset(); 63 void DoReset();
65 64
66 void CopyVpxImageTo(const vpx_image* vpx_image, 65 void CopyVpxImageTo(const vpx_image* vpx_image,
67 const struct vpx_image* vpx_image_alpha, 66 const struct vpx_image* vpx_image_alpha,
68 scoped_refptr<VideoFrame>* video_frame); 67 scoped_refptr<VideoFrame>* video_frame);
69 68
70 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 69 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
71 base::WeakPtrFactory<VpxVideoDecoder> weak_factory_;
72 base::WeakPtr<VpxVideoDecoder> weak_this_;
73 70
74 DecoderState state_; 71 DecoderState state_;
75 72
76 DecodeCB decode_cb_; 73 DecodeCB decode_cb_;
77 base::Closure reset_cb_; 74 base::Closure reset_cb_;
78 75
79 VideoDecoderConfig config_; 76 VideoDecoderConfig config_;
80 77
81 vpx_codec_ctx* vpx_codec_; 78 vpx_codec_ctx* vpx_codec_;
82 vpx_codec_ctx* vpx_codec_alpha_; 79 vpx_codec_ctx* vpx_codec_alpha_;
83 80
84 // Memory pool used for VP9 decoding. 81 // Memory pool used for VP9 decoding.
85 class MemoryPool; 82 class MemoryPool;
86 scoped_refptr<MemoryPool> memory_pool_; 83 scoped_refptr<MemoryPool> memory_pool_;
87 84
88 VideoFramePool frame_pool_; 85 VideoFramePool frame_pool_;
89 86
90 DISALLOW_COPY_AND_ASSIGN(VpxVideoDecoder); 87 DISALLOW_COPY_AND_ASSIGN(VpxVideoDecoder);
91 }; 88 };
92 89
93 } // namespace media 90 } // namespace media
94 91
95 #endif // MEDIA_FILTERS_VPX_VIDEO_DECODER_H_ 92 #endif // MEDIA_FILTERS_VPX_VIDEO_DECODER_H_
OLDNEW
« no previous file with comments | « media/filters/video_renderer_impl.cc ('k') | media/filters/vpx_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698