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

Side by Side Diff: media/filters/opus_audio_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/gpu_video_decoder.cc ('k') | media/filters/opus_audio_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_OPUS_AUDIO_DECODER_H_ 5 #ifndef MEDIA_FILTERS_OPUS_AUDIO_DECODER_H_
6 #define MEDIA_FILTERS_OPUS_AUDIO_DECODER_H_ 6 #define MEDIA_FILTERS_OPUS_AUDIO_DECODER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/weak_ptr.h"
10 #include "base/time/time.h" 9 #include "base/time/time.h"
11 #include "media/base/audio_decoder.h" 10 #include "media/base/audio_decoder.h"
12 #include "media/base/demuxer_stream.h" 11 #include "media/base/demuxer_stream.h"
13 #include "media/base/sample_format.h" 12 #include "media/base/sample_format.h"
14 13
15 struct OpusMSDecoder; 14 struct OpusMSDecoder;
16 15
17 namespace base { 16 namespace base {
18 class SingleThreadTaskRunner; 17 class SingleThreadTaskRunner;
19 } 18 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void DecodeBuffer(const scoped_refptr<DecoderBuffer>& input, 50 void DecodeBuffer(const scoped_refptr<DecoderBuffer>& input,
52 const DecodeCB& decode_cb); 51 const DecodeCB& decode_cb);
53 52
54 bool ConfigureDecoder(); 53 bool ConfigureDecoder();
55 void CloseDecoder(); 54 void CloseDecoder();
56 void ResetTimestampState(); 55 void ResetTimestampState();
57 bool Decode(const scoped_refptr<DecoderBuffer>& input, 56 bool Decode(const scoped_refptr<DecoderBuffer>& input,
58 scoped_refptr<AudioBuffer>* output_buffer); 57 scoped_refptr<AudioBuffer>* output_buffer);
59 58
60 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 59 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
61 base::WeakPtrFactory<OpusAudioDecoder> weak_factory_;
62 base::WeakPtr<OpusAudioDecoder> weak_this_;
63 60
64 AudioDecoderConfig config_; 61 AudioDecoderConfig config_;
65 OpusMSDecoder* opus_decoder_; 62 OpusMSDecoder* opus_decoder_;
66 63
67 // Decoded audio format. 64 // Decoded audio format.
68 ChannelLayout channel_layout_; 65 ChannelLayout channel_layout_;
69 int samples_per_second_; 66 int samples_per_second_;
70 const SampleFormat sample_format_; 67 const SampleFormat sample_format_;
71 const int bits_per_channel_; 68 const int bits_per_channel_;
72 69
(...skipping 17 matching lines...) Expand all
90 // Timestamp to be subtracted from all the frames. This is typically computed 87 // Timestamp to be subtracted from all the frames. This is typically computed
91 // from the CodecDelay value in the container. 88 // from the CodecDelay value in the container.
92 base::TimeDelta timestamp_offset_; 89 base::TimeDelta timestamp_offset_;
93 90
94 DISALLOW_IMPLICIT_CONSTRUCTORS(OpusAudioDecoder); 91 DISALLOW_IMPLICIT_CONSTRUCTORS(OpusAudioDecoder);
95 }; 92 };
96 93
97 } // namespace media 94 } // namespace media
98 95
99 #endif // MEDIA_FILTERS_OPUS_AUDIO_DECODER_H_ 96 #endif // MEDIA_FILTERS_OPUS_AUDIO_DECODER_H_
OLDNEW
« no previous file with comments | « media/filters/gpu_video_decoder.cc ('k') | media/filters/opus_audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698