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_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" | 9 #include "base/memory/weak_ptr.h" |
10 #include "media/base/demuxer_stream.h" | 10 #include "media/base/demuxer_stream.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
61 scoped_refptr<VideoFrame>* video_frame); | 61 scoped_refptr<VideoFrame>* video_frame); |
62 | 62 |
63 // Reset decoder and call |reset_cb_|. | 63 // Reset decoder and call |reset_cb_|. |
64 void DoReset(); | 64 void DoReset(); |
65 | 65 |
66 void CopyVpxImageTo(const vpx_image* vpx_image, | 66 void CopyVpxImageTo(const vpx_image* vpx_image, |
67 const struct vpx_image* vpx_image_alpha, | 67 const struct vpx_image* vpx_image_alpha, |
68 scoped_refptr<VideoFrame>* video_frame); | 68 scoped_refptr<VideoFrame>* video_frame); |
69 | 69 |
70 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 70 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
71 base::WeakPtrFactory<VpxVideoDecoder> weak_factory_; | |
72 base::WeakPtr<VpxVideoDecoder> weak_this_; | |
73 | 71 |
74 DecoderState state_; | 72 DecoderState state_; |
75 | 73 |
76 DecodeCB decode_cb_; | 74 DecodeCB decode_cb_; |
77 base::Closure reset_cb_; | 75 base::Closure reset_cb_; |
78 | 76 |
79 VideoDecoderConfig config_; | 77 VideoDecoderConfig config_; |
80 | 78 |
81 vpx_codec_ctx* vpx_codec_; | 79 vpx_codec_ctx* vpx_codec_; |
82 vpx_codec_ctx* vpx_codec_alpha_; | 80 vpx_codec_ctx* vpx_codec_alpha_; |
83 | 81 |
84 // Memory pool used for VP9 decoding. | 82 // Memory pool used for VP9 decoding. |
85 class MemoryPool; | 83 class MemoryPool; |
86 scoped_refptr<MemoryPool> memory_pool_; | 84 scoped_refptr<MemoryPool> memory_pool_; |
87 | 85 |
88 VideoFramePool frame_pool_; | 86 VideoFramePool frame_pool_; |
89 | 87 |
88 // NOTE: These must always be last so they're invalidated before other member | |
89 // variables might be accessed. | |
90 base::WeakPtr<VpxVideoDecoder> weak_this_; | |
Ami GONE FROM CHROMIUM
2014/03/10 22:02:08
ditto
| |
91 base::WeakPtrFactory<VpxVideoDecoder> weak_factory_; | |
92 | |
90 DISALLOW_COPY_AND_ASSIGN(VpxVideoDecoder); | 93 DISALLOW_COPY_AND_ASSIGN(VpxVideoDecoder); |
91 }; | 94 }; |
92 | 95 |
93 } // namespace media | 96 } // namespace media |
94 | 97 |
95 #endif // MEDIA_FILTERS_VPX_VIDEO_DECODER_H_ | 98 #endif // MEDIA_FILTERS_VPX_VIDEO_DECODER_H_ |
OLD | NEW |