| 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_BASE_AUDIO_DECODER_H_ | 5 #ifndef MEDIA_BASE_AUDIO_DECODER_H_ |
| 6 #define MEDIA_BASE_AUDIO_DECODER_H_ | 6 #define MEDIA_BASE_AUDIO_DECODER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "media/base/audio_decoder_config.h" | 10 #include "media/base/audio_decoder_config.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 // Resets decoder state, dropping any queued encoded data. | 62 // Resets decoder state, dropping any queued encoded data. |
| 63 virtual void Reset(const base::Closure& closure) = 0; | 63 virtual void Reset(const base::Closure& closure) = 0; |
| 64 | 64 |
| 65 // Stops decoder, fires any pending callbacks and sets the decoder to an | 65 // Stops decoder, fires any pending callbacks and sets the decoder to an |
| 66 // uninitialized state. An AudioDecoder cannot be re-initialized after it has | 66 // uninitialized state. An AudioDecoder cannot be re-initialized after it has |
| 67 // been stopped. | 67 // been stopped. |
| 68 // Note that if Initialize() has been called, Stop() must be called and | 68 // Note that if Initialize() has been called, Stop() must be called and |
| 69 // complete before deleting the decoder. | 69 // complete before deleting the decoder. |
| 70 virtual void Stop(const base::Closure& closure) = 0; | 70 virtual void Stop(const base::Closure& closure) = 0; |
| 71 | 71 |
| 72 // Returns various information about the decoded audio format. | |
| 73 virtual int bits_per_channel() = 0; | |
| 74 virtual ChannelLayout channel_layout() = 0; | |
| 75 virtual int samples_per_second() = 0; | |
| 76 | |
| 77 private: | 72 private: |
| 78 DISALLOW_COPY_AND_ASSIGN(AudioDecoder); | 73 DISALLOW_COPY_AND_ASSIGN(AudioDecoder); |
| 79 }; | 74 }; |
| 80 | 75 |
| 81 } // namespace media | 76 } // namespace media |
| 82 | 77 |
| 83 #endif // MEDIA_BASE_AUDIO_DECODER_H_ | 78 #endif // MEDIA_BASE_AUDIO_DECODER_H_ |
| OLD | NEW |