| 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/channel_layout.h" | 10 #include "media/base/channel_layout.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 kAborted, | 24 kAborted, |
| 25 kDecodeError, | 25 kDecodeError, |
| 26 }; | 26 }; |
| 27 | 27 |
| 28 AudioDecoder(); | 28 AudioDecoder(); |
| 29 virtual ~AudioDecoder(); | 29 virtual ~AudioDecoder(); |
| 30 | 30 |
| 31 // Initialize an AudioDecoder with the given DemuxerStream, executing the | 31 // Initialize an AudioDecoder with the given DemuxerStream, executing the |
| 32 // callback upon completion. | 32 // callback upon completion. |
| 33 // statistics_cb is used to update global pipeline statistics. | 33 // statistics_cb is used to update global pipeline statistics. |
| 34 virtual void Initialize(const scoped_refptr<DemuxerStream>& stream, | 34 virtual void Initialize(DemuxerStream* stream, |
| 35 const PipelineStatusCB& status_cb, | 35 const PipelineStatusCB& status_cb, |
| 36 const StatisticsCB& statistics_cb) = 0; | 36 const StatisticsCB& statistics_cb) = 0; |
| 37 | 37 |
| 38 // Request samples to be decoded and returned via the provided callback. | 38 // Request samples to be decoded and returned via the provided callback. |
| 39 // Only one read may be in flight at any given time. | 39 // Only one read may be in flight at any given time. |
| 40 // | 40 // |
| 41 // Implementations guarantee that the callback will not be called from within | 41 // Implementations guarantee that the callback will not be called from within |
| 42 // this method. | 42 // this method. |
| 43 // | 43 // |
| 44 // Non-NULL sample buffer pointers will contain decoded audio data or may | 44 // Non-NULL sample buffer pointers will contain decoded audio data or may |
| (...skipping 11 matching lines...) Expand all Loading... |
| 56 virtual ChannelLayout channel_layout() = 0; | 56 virtual ChannelLayout channel_layout() = 0; |
| 57 virtual int samples_per_second() = 0; | 57 virtual int samples_per_second() = 0; |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 DISALLOW_COPY_AND_ASSIGN(AudioDecoder); | 60 DISALLOW_COPY_AND_ASSIGN(AudioDecoder); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace media | 63 } // namespace media |
| 64 | 64 |
| 65 #endif // MEDIA_BASE_AUDIO_DECODER_H_ | 65 #endif // MEDIA_BASE_AUDIO_DECODER_H_ |
| OLD | NEW |