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_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" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 // Decoded audio format. | 64 // Decoded audio format. |
65 int bits_per_channel_; | 65 int bits_per_channel_; |
66 ChannelLayout channel_layout_; | 66 ChannelLayout channel_layout_; |
67 int samples_per_second_; | 67 int samples_per_second_; |
68 | 68 |
69 // Used for computing output timestamps. | 69 // Used for computing output timestamps. |
70 scoped_ptr<AudioTimestampHelper> output_timestamp_helper_; | 70 scoped_ptr<AudioTimestampHelper> output_timestamp_helper_; |
71 base::TimeDelta last_input_timestamp_; | 71 base::TimeDelta last_input_timestamp_; |
72 | 72 |
73 // Number of output sample bytes to drop before generating | |
74 // output buffers. | |
75 int output_bytes_to_drop_; | |
76 | |
77 ReadCB read_cb_; | 73 ReadCB read_cb_; |
78 | 74 |
79 int skip_samples_; | 75 int skip_samples_; |
80 | 76 |
81 // Buffer for output from libopus. | 77 // Buffer for output from libopus. |
82 scoped_ptr<int16[]> output_buffer_; | 78 scoped_ptr<int16[]> output_buffer_; |
83 | 79 |
84 DISALLOW_IMPLICIT_CONSTRUCTORS(OpusAudioDecoder); | 80 DISALLOW_IMPLICIT_CONSTRUCTORS(OpusAudioDecoder); |
85 }; | 81 }; |
86 | 82 |
87 } // namespace media | 83 } // namespace media |
88 | 84 |
89 #endif // MEDIA_FILTERS_OPUS_AUDIO_DECODER_H_ | 85 #endif // MEDIA_FILTERS_OPUS_AUDIO_DECODER_H_ |
OLD | NEW |