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

Side by Side Diff: webkit/media/crypto/ppapi/clear_key_cdm.h

Issue 11313016: Add "type" in GenerateKeyRequest() and OnNeedKey(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix the DCHECK where init_data_type_ is set but NeedKey from decoder passes empty "type". 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 | « media/webm/webm_stream_parser.cc ('k') | webkit/media/crypto/ppapi/clear_key_cdm.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 WEBKIT_MEDIA_CRYPTO_PPAPI_CLEAR_KEY_CDM_H_ 5 #ifndef WEBKIT_MEDIA_CRYPTO_PPAPI_CLEAR_KEY_CDM_H_
6 #define WEBKIT_MEDIA_CRYPTO_PPAPI_CLEAR_KEY_CDM_H_ 6 #define WEBKIT_MEDIA_CRYPTO_PPAPI_CLEAR_KEY_CDM_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 27 matching lines...) Expand all
38 class FFmpegCdmAudioDecoder; 38 class FFmpegCdmAudioDecoder;
39 class FFmpegCdmVideoDecoder; 39 class FFmpegCdmVideoDecoder;
40 40
41 // Clear key implementation of the cdm::ContentDecryptionModule interface. 41 // Clear key implementation of the cdm::ContentDecryptionModule interface.
42 class ClearKeyCdm : public cdm::ContentDecryptionModule { 42 class ClearKeyCdm : public cdm::ContentDecryptionModule {
43 public: 43 public:
44 explicit ClearKeyCdm(cdm::Allocator* allocator, cdm::CdmHost*); 44 explicit ClearKeyCdm(cdm::Allocator* allocator, cdm::CdmHost*);
45 virtual ~ClearKeyCdm(); 45 virtual ~ClearKeyCdm();
46 46
47 // ContentDecryptionModule implementation. 47 // ContentDecryptionModule implementation.
48 // TODO(tomfinegan): Update ContentDecryptionModule to pass "type" through.
48 virtual cdm::Status GenerateKeyRequest( 49 virtual cdm::Status GenerateKeyRequest(
49 const uint8_t* init_data, 50 const uint8_t* init_data,
50 int init_data_size, 51 int init_data_size,
51 cdm::KeyMessage* key_request) OVERRIDE; 52 cdm::KeyMessage* key_request) OVERRIDE;
52 virtual cdm::Status AddKey(const char* session_id, 53 virtual cdm::Status AddKey(const char* session_id,
53 int session_id_size, 54 int session_id_size,
54 const uint8_t* key, 55 const uint8_t* key,
55 int key_size, 56 int key_size,
56 const uint8_t* key_id, 57 const uint8_t* key_id,
57 int key_id_size) OVERRIDE; 58 int key_id_size) OVERRIDE;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 const std::string& session_id, 103 const std::string& session_id,
103 media::Decryptor::KeyError error_code, 104 media::Decryptor::KeyError error_code,
104 int system_code) OVERRIDE; 105 int system_code) OVERRIDE;
105 virtual void KeyMessage(const std::string& key_system, 106 virtual void KeyMessage(const std::string& key_system,
106 const std::string& session_id, 107 const std::string& session_id,
107 scoped_array<uint8> message, 108 scoped_array<uint8> message,
108 int message_length, 109 int message_length,
109 const std::string& default_url) OVERRIDE; 110 const std::string& default_url) OVERRIDE;
110 virtual void NeedKey(const std::string& key_system, 111 virtual void NeedKey(const std::string& key_system,
111 const std::string& session_id, 112 const std::string& session_id,
113 const std::string& type,
112 scoped_array<uint8> init_data, 114 scoped_array<uint8> init_data,
113 int init_data_length) OVERRIDE; 115 int init_data_length) OVERRIDE;
114 116
115 private: 117 private:
116 Status status_; 118 Status status_;
117 std::string session_id_; 119 std::string session_id_;
118 scoped_array<uint8> key_message_; 120 scoped_array<uint8> key_message_;
119 int key_message_length_; 121 int key_message_length_;
120 std::string default_url_; 122 std::string default_url_;
121 }; 123 };
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 #endif // CLEAR_KEY_CDM_USE_FFMPEG_DECODER 168 #endif // CLEAR_KEY_CDM_USE_FFMPEG_DECODER
167 169
168 #if defined(CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER) 170 #if defined(CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER)
169 cdm::Size video_size_; 171 cdm::Size video_size_;
170 #endif // CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER 172 #endif // CLEAR_KEY_CDM_USE_FAKE_VIDEO_DECODER
171 }; 173 };
172 174
173 } // namespace webkit_media 175 } // namespace webkit_media
174 176
175 #endif // WEBKIT_MEDIA_CRYPTO_PPAPI_CLEAR_KEY_CDM_H_ 177 #endif // WEBKIT_MEDIA_CRYPTO_PPAPI_CLEAR_KEY_CDM_H_
OLDNEW
« no previous file with comments | « media/webm/webm_stream_parser.cc ('k') | webkit/media/crypto/ppapi/clear_key_cdm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698