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_DECRYPTING_AUDIO_DECODER_H_ | 5 #ifndef MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_ |
6 #define MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_ | 6 #define MEDIA_FILTERS_DECRYPTING_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 "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 // format designated by kSupportedBitsPerChannel. | 36 // format designated by kSupportedBitsPerChannel. |
37 // TODO(xhwang): Remove this restriction after http://crbug.com/169105 fixed. | 37 // TODO(xhwang): Remove this restriction after http://crbug.com/169105 fixed. |
38 static const int kSupportedBitsPerChannel; | 38 static const int kSupportedBitsPerChannel; |
39 | 39 |
40 DecryptingAudioDecoder( | 40 DecryptingAudioDecoder( |
41 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 41 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
42 const SetDecryptorReadyCB& set_decryptor_ready_cb); | 42 const SetDecryptorReadyCB& set_decryptor_ready_cb); |
43 virtual ~DecryptingAudioDecoder(); | 43 virtual ~DecryptingAudioDecoder(); |
44 | 44 |
45 // AudioDecoder implementation. | 45 // AudioDecoder implementation. |
| 46 virtual std::string GetDisplayName() const OVERRIDE; |
46 virtual void Initialize(const AudioDecoderConfig& config, | 47 virtual void Initialize(const AudioDecoderConfig& config, |
47 const PipelineStatusCB& status_cb, | 48 const PipelineStatusCB& status_cb, |
48 const OutputCB& output_cb) OVERRIDE; | 49 const OutputCB& output_cb) OVERRIDE; |
49 virtual void Decode(const scoped_refptr<DecoderBuffer>& buffer, | 50 virtual void Decode(const scoped_refptr<DecoderBuffer>& buffer, |
50 const DecodeCB& decode_cb) OVERRIDE; | 51 const DecodeCB& decode_cb) OVERRIDE; |
51 virtual void Reset(const base::Closure& closure) OVERRIDE; | 52 virtual void Reset(const base::Closure& closure) OVERRIDE; |
52 | 53 |
53 private: | 54 private: |
54 // For a detailed state diagram please see this link: http://goo.gl/8jAok | 55 // For a detailed state diagram please see this link: http://goo.gl/8jAok |
55 // TODO(xhwang): Add a ASCII state diagram in this file after this class | 56 // TODO(xhwang): Add a ASCII state diagram in this file after this class |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 // NOTE: Weak pointers must be invalidated before all other member variables. | 127 // NOTE: Weak pointers must be invalidated before all other member variables. |
127 base::WeakPtrFactory<DecryptingAudioDecoder> weak_factory_; | 128 base::WeakPtrFactory<DecryptingAudioDecoder> weak_factory_; |
128 base::WeakPtr<DecryptingAudioDecoder> weak_this_; | 129 base::WeakPtr<DecryptingAudioDecoder> weak_this_; |
129 | 130 |
130 DISALLOW_COPY_AND_ASSIGN(DecryptingAudioDecoder); | 131 DISALLOW_COPY_AND_ASSIGN(DecryptingAudioDecoder); |
131 }; | 132 }; |
132 | 133 |
133 } // namespace media | 134 } // namespace media |
134 | 135 |
135 #endif // MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_ | 136 #endif // MEDIA_FILTERS_DECRYPTING_AUDIO_DECODER_H_ |
OLD | NEW |