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_DECRYPTOR_H_ | 5 #ifndef MEDIA_BASE_DECRYPTOR_H_ |
6 #define MEDIA_BASE_DECRYPTOR_H_ | 6 #define MEDIA_BASE_DECRYPTOR_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 // upon completion. | 130 // upon completion. |
131 // |key_added_cb| should be called when a key is added to the decryptor. | 131 // |key_added_cb| should be called when a key is added to the decryptor. |
132 virtual void InitializeAudioDecoder(scoped_ptr<AudioDecoderConfig> config, | 132 virtual void InitializeAudioDecoder(scoped_ptr<AudioDecoderConfig> config, |
133 const DecoderInitCB& init_cb, | 133 const DecoderInitCB& init_cb, |
134 const KeyAddedCB& key_added_cb) = 0; | 134 const KeyAddedCB& key_added_cb) = 0; |
135 virtual void InitializeVideoDecoder(scoped_ptr<VideoDecoderConfig> config, | 135 virtual void InitializeVideoDecoder(scoped_ptr<VideoDecoderConfig> config, |
136 const DecoderInitCB& init_cb, | 136 const DecoderInitCB& init_cb, |
137 const KeyAddedCB& key_added_cb) = 0; | 137 const KeyAddedCB& key_added_cb) = 0; |
138 | 138 |
139 // Helper structure for managing multiple decoded audio buffers per input. | 139 // Helper structure for managing multiple decoded audio buffers per input. |
| 140 // TODO(xhwang): Rename this to AudioFrames. |
140 typedef std::list<scoped_refptr<Buffer> > AudioBuffers; | 141 typedef std::list<scoped_refptr<Buffer> > AudioBuffers; |
141 | 142 |
142 // Indicates completion of audio/video decrypt-and-decode operation. | 143 // Indicates completion of audio/video decrypt-and-decode operation. |
143 // | 144 // |
144 // First parameter: The status of the decrypt-and-decode operation. | 145 // First parameter: The status of the decrypt-and-decode operation. |
145 // - Set to kSuccess if the encrypted buffer is successfully decrypted and | 146 // - Set to kSuccess if the encrypted buffer is successfully decrypted and |
146 // decoded. In this case, the decoded frame/buffers can be/contain: | 147 // decoded. In this case, the decoded frame/buffers can be/contain: |
147 // 1) NULL, which means the operation has been aborted. | 148 // 1) NULL, which means the operation has been aborted. |
148 // 2) End-of-stream (EOS) frame, which means that the decoder has hit EOS, | 149 // 2) End-of-stream (EOS) frame, which means that the decoder has hit EOS, |
149 // flushed all internal buffers and cannot produce more video frames. | 150 // flushed all internal buffers and cannot produce more video frames. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 // The decoder can be reinitialized after it is uninitialized. | 192 // The decoder can be reinitialized after it is uninitialized. |
192 virtual void DeinitializeDecoder(StreamType stream_type) = 0; | 193 virtual void DeinitializeDecoder(StreamType stream_type) = 0; |
193 | 194 |
194 private: | 195 private: |
195 DISALLOW_COPY_AND_ASSIGN(Decryptor); | 196 DISALLOW_COPY_AND_ASSIGN(Decryptor); |
196 }; | 197 }; |
197 | 198 |
198 } // namespace media | 199 } // namespace media |
199 | 200 |
200 #endif // MEDIA_BASE_DECRYPTOR_H_ | 201 #endif // MEDIA_BASE_DECRYPTOR_H_ |
OLD | NEW |