| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "media/base/audio_decoder_config.h" | 13 #include "media/base/audio_decoder_config.h" |
| 14 #include "media/base/channel_layout.h" | 14 #include "media/base/channel_layout.h" |
| 15 #include "media/base/decode_status.h" | 15 #include "media/base/decode_status.h" |
| 16 #include "media/base/decoder_buffer.h" | 16 #include "media/base/decoder_buffer.h" |
| 17 #include "media/base/media_export.h" | 17 #include "media/base/media_export.h" |
| 18 #include "media/base/pipeline_status.h" | 18 #include "media/base/pipeline_status.h" |
| 19 | 19 |
| 20 namespace media { | 20 namespace media { |
| 21 | 21 |
| 22 class AudioBuffer; | 22 class AudioBuffer; |
| 23 class CdmContext; | 23 class CdmContext; |
| 24 class DemuxerStream; | |
| 25 | 24 |
| 26 class MEDIA_EXPORT AudioDecoder { | 25 class MEDIA_EXPORT AudioDecoder { |
| 27 public: | 26 public: |
| 28 // Callback for VideoDecoder initialization. | 27 // Callback for VideoDecoder initialization. |
| 29 typedef base::Callback<void(bool success)> InitCB; | 28 typedef base::Callback<void(bool success)> InitCB; |
| 30 | 29 |
| 31 // Callback for AudioDecoder to return a decoded frame whenever it becomes | 30 // Callback for AudioDecoder to return a decoded frame whenever it becomes |
| 32 // available. Only non-EOS frames should be returned via this callback. | 31 // available. Only non-EOS frames should be returned via this callback. |
| 33 typedef base::Callback<void(const scoped_refptr<AudioBuffer>&)> OutputCB; | 32 typedef base::Callback<void(const scoped_refptr<AudioBuffer>&)> OutputCB; |
| 34 | 33 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // Returns true if the decoder needs bitstream conversion before decoding. | 79 // Returns true if the decoder needs bitstream conversion before decoding. |
| 81 virtual bool NeedsBitstreamConversion() const; | 80 virtual bool NeedsBitstreamConversion() const; |
| 82 | 81 |
| 83 private: | 82 private: |
| 84 DISALLOW_COPY_AND_ASSIGN(AudioDecoder); | 83 DISALLOW_COPY_AND_ASSIGN(AudioDecoder); |
| 85 }; | 84 }; |
| 86 | 85 |
| 87 } // namespace media | 86 } // namespace media |
| 88 | 87 |
| 89 #endif // MEDIA_BASE_AUDIO_DECODER_H_ | 88 #endif // MEDIA_BASE_AUDIO_DECODER_H_ |
| OLD | NEW |