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