Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(375)

Side by Side Diff: media/base/decryptor.h

Issue 11189082: Update PluginInstance for audio support for content decryption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | media/filters/decrypting_audio_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | media/filters/decrypting_audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698