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

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

Issue 11342031: Add DecryptingDemuxerStream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 1 month 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.h » ('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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 // TODO(xhwang): Replace kError with kDecryptError and kDecodeError. 50 // TODO(xhwang): Replace kError with kDecryptError and kDecodeError.
51 // TODO(xhwang): Replace kNeedMoreData with kNotEnoughData. 51 // TODO(xhwang): Replace kNeedMoreData with kNotEnoughData.
52 enum Status { 52 enum Status {
53 kSuccess, // Decryption successfully completed. Decrypted buffer ready. 53 kSuccess, // Decryption successfully completed. Decrypted buffer ready.
54 kNoKey, // No key is available to decrypt. 54 kNoKey, // No key is available to decrypt.
55 kNeedMoreData, // Decoder needs more data to produce a frame. 55 kNeedMoreData, // Decoder needs more data to produce a frame.
56 kError // Key is available but an error occurred during decryption. 56 kError // Key is available but an error occurred during decryption.
57 }; 57 };
58 58
59 // TODO(xhwang): Unify this with DemuxerStream::Type.
59 enum StreamType { 60 enum StreamType {
60 kAudio, 61 kAudio,
61 kVideo 62 kVideo
62 }; 63 };
63 64
64 Decryptor(); 65 Decryptor();
65 virtual ~Decryptor(); 66 virtual ~Decryptor();
66 67
67 // Generates a key request for the |key_system| with |type| and 68 // Generates a key request for the |key_system| with |type| and
68 // |init_data| provided. 69 // |init_data| provided.
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 // The decoder can be reinitialized after it is uninitialized. 200 // The decoder can be reinitialized after it is uninitialized.
200 virtual void DeinitializeDecoder(StreamType stream_type) = 0; 201 virtual void DeinitializeDecoder(StreamType stream_type) = 0;
201 202
202 private: 203 private:
203 DISALLOW_COPY_AND_ASSIGN(Decryptor); 204 DISALLOW_COPY_AND_ASSIGN(Decryptor);
204 }; 205 };
205 206
206 } // namespace media 207 } // namespace media
207 208
208 #endif // MEDIA_BASE_DECRYPTOR_H_ 209 #endif // MEDIA_BASE_DECRYPTOR_H_
OLDNEW
« no previous file with comments | « no previous file | media/filters/decrypting_audio_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698