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

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

Issue 2568463003: media: Rename MediaKeys to ContentDecryptionModule (Closed)
Patch Set: comments addressed Created 4 years 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
« no previous file with comments | « media/base/content_decryption_module.cc ('k') | media/base/ipc/media_param_traits_macros.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 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 24 matching lines...) Expand all
35 kError, // Key is available but an error occurred during decryption. 35 kError, // Key is available but an error occurred during decryption.
36 kStatusMax = kError 36 kStatusMax = kError
37 }; 37 };
38 38
39 // TODO(xhwang): Unify this with DemuxerStream::Type. 39 // TODO(xhwang): Unify this with DemuxerStream::Type.
40 enum StreamType { kAudio, kVideo, kStreamTypeMax = kVideo }; 40 enum StreamType { kAudio, kVideo, kStreamTypeMax = kVideo };
41 41
42 Decryptor(); 42 Decryptor();
43 virtual ~Decryptor(); 43 virtual ~Decryptor();
44 44
45 // Indicates that a new key has been added to the MediaKeys object associated 45 // Indicates that a new key has been added to the ContentDecryptionModule
46 // with the Decryptor. 46 // object associated with the Decryptor.
47 typedef base::Callback<void()> NewKeyCB; 47 typedef base::Callback<void()> NewKeyCB;
48 48
49 // Registers a NewKeyCB which should be called when a new key is added to the 49 // Registers a NewKeyCB which should be called when a new key is added to the
50 // decryptor. Only one NewKeyCB can be registered for one |stream_type|. 50 // decryptor. Only one NewKeyCB can be registered for one |stream_type|.
51 // If this function is called multiple times for the same |stream_type|, the 51 // If this function is called multiple times for the same |stream_type|, the
52 // previously registered callback will be replaced. In other words, 52 // previously registered callback will be replaced. In other words,
53 // registering a null callback cancels the originally registered callback. 53 // registering a null callback cancels the originally registered callback.
54 virtual void RegisterNewKeyCB(StreamType stream_type, 54 virtual void RegisterNewKeyCB(StreamType stream_type,
55 const NewKeyCB& key_added_cb) = 0; 55 const NewKeyCB& key_added_cb) = 0;
56 56
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // The decoder can be reinitialized after it is uninitialized. 155 // The decoder can be reinitialized after it is uninitialized.
156 virtual void DeinitializeDecoder(StreamType stream_type) = 0; 156 virtual void DeinitializeDecoder(StreamType stream_type) = 0;
157 157
158 private: 158 private:
159 DISALLOW_COPY_AND_ASSIGN(Decryptor); 159 DISALLOW_COPY_AND_ASSIGN(Decryptor);
160 }; 160 };
161 161
162 } // namespace media 162 } // namespace media
163 163
164 #endif // MEDIA_BASE_DECRYPTOR_H_ 164 #endif // MEDIA_BASE_DECRYPTOR_H_
OLDNEW
« no previous file with comments | « media/base/content_decryption_module.cc ('k') | media/base/ipc/media_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698