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

Side by Side Diff: media/cdm/ppapi/cdm_adapter.h

Issue 813683005: Add |legacy_destination_url| back to SessionMessage for EME (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes Created 5 years, 11 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
« no previous file with comments | « media/cdm/aes_decryptor_unittest.cc ('k') | media/cdm/ppapi/cdm_adapter.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_CDM_PPAPI_CDM_ADAPTER_H_ 5 #ifndef MEDIA_CDM_PPAPI_CDM_ADAPTER_H_
6 #define MEDIA_CDM_PPAPI_CDM_ADAPTER_H_ 6 #define MEDIA_CDM_PPAPI_CDM_ADAPTER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 void QueryOutputProtectionStatus() override; 108 void QueryOutputProtectionStatus() override;
109 void OnDeferredInitializationDone(cdm::StreamType stream_type, 109 void OnDeferredInitializationDone(cdm::StreamType stream_type,
110 cdm::Status decoder_status) override; 110 cdm::Status decoder_status) override;
111 cdm::FileIO* CreateFileIO(cdm::FileIOClient* client) override; 111 cdm::FileIO* CreateFileIO(cdm::FileIOClient* client) override;
112 112
113 // cdm::Host_7 implementation. 113 // cdm::Host_7 implementation.
114 void OnSessionMessage(const char* session_id, 114 void OnSessionMessage(const char* session_id,
115 uint32_t session_id_size, 115 uint32_t session_id_size,
116 cdm::MessageType message_type, 116 cdm::MessageType message_type,
117 const char* message, 117 const char* message,
118 uint32_t message_size) override; 118 uint32_t message_size,
119 const char* legacy_destination_url,
120 uint32_t legacy_destination_url_size) override;
119 void OnSessionKeysChange(const char* session_id, 121 void OnSessionKeysChange(const char* session_id,
120 uint32_t session_id_size, 122 uint32_t session_id_size,
121 bool has_additional_usable_key, 123 bool has_additional_usable_key,
122 const cdm::KeyInformation* keys_info, 124 const cdm::KeyInformation* keys_info,
123 uint32_t keys_info_count) override; 125 uint32_t keys_info_count) override;
124 void OnLegacySessionError(const char* session_id, 126 void OnLegacySessionError(const char* session_id,
125 uint32_t session_id_size, 127 uint32_t session_id_size,
126 cdm::Error error, 128 cdm::Error error,
127 uint32_t system_code, 129 uint32_t system_code,
128 const char* error_message, 130 const char* error_message,
(...skipping 28 matching lines...) Expand all
157 OUTPUT_PROTECTION_MAX = 3 159 OUTPUT_PROTECTION_MAX = 3
158 }; 160 };
159 161
160 typedef linked_ptr<DecryptedBlockImpl> LinkedDecryptedBlock; 162 typedef linked_ptr<DecryptedBlockImpl> LinkedDecryptedBlock;
161 typedef linked_ptr<VideoFrameImpl> LinkedVideoFrame; 163 typedef linked_ptr<VideoFrameImpl> LinkedVideoFrame;
162 typedef linked_ptr<AudioFramesImpl> LinkedAudioFrames; 164 typedef linked_ptr<AudioFramesImpl> LinkedAudioFrames;
163 165
164 struct SessionError { 166 struct SessionError {
165 SessionError(cdm::Error error, 167 SessionError(cdm::Error error,
166 uint32_t system_code, 168 uint32_t system_code,
167 std::string error_description); 169 const std::string& error_description);
168 cdm::Error error; 170 cdm::Error error;
169 uint32_t system_code; 171 uint32_t system_code;
170 std::string error_description; 172 std::string error_description;
171 }; 173 };
172 174
175 struct SessionMessage {
176 SessionMessage(const std::string& session_id,
177 cdm::MessageType message_type,
178 const char* message,
179 uint32_t message_size,
180 const std::string& legacy_destination_url);
181 std::string session_id;
182 cdm::MessageType message_type;
183 std::vector<uint8_t> message;
184 std::string legacy_destination_url;
185 };
186
173 bool CreateCdmInstance(const std::string& key_system); 187 bool CreateCdmInstance(const std::string& key_system);
174 188
175 // <code>PPB_ContentDecryptor_Private</code> dispatchers. These are passed to 189 // <code>PPB_ContentDecryptor_Private</code> dispatchers. These are passed to
176 // <code>callback_factory_</code> to ensure that calls into 190 // <code>callback_factory_</code> to ensure that calls into
177 // <code>PPP_ContentDecryptor_Private</code> are asynchronous. 191 // <code>PPP_ContentDecryptor_Private</code> are asynchronous.
178 void SendPromiseResolvedInternal(int32_t result, uint32_t promise_id); 192 void SendPromiseResolvedInternal(int32_t result, uint32_t promise_id);
179 void SendPromiseResolvedWithSessionInternal(int32_t result, 193 void SendPromiseResolvedWithSessionInternal(int32_t result,
180 uint32_t promise_id, 194 uint32_t promise_id,
181 const std::string& session_id); 195 const std::string& session_id);
182 void SendPromiseRejectedInternal(int32_t result, 196 void SendPromiseRejectedInternal(int32_t result,
183 uint32_t promise_id, 197 uint32_t promise_id,
184 const SessionError& error); 198 const SessionError& error);
185 void SendSessionMessageInternal(int32_t result, 199 void SendSessionMessageInternal(int32_t result,
186 const std::string& session_id, 200 const SessionMessage& message);
187 cdm::MessageType message_type,
188 const std::vector<uint8_t>& message);
189 void SendSessionClosedInternal(int32_t result, const std::string& session_id); 201 void SendSessionClosedInternal(int32_t result, const std::string& session_id);
190 void SendSessionErrorInternal(int32_t result, 202 void SendSessionErrorInternal(int32_t result,
191 const std::string& session_id, 203 const std::string& session_id,
192 const SessionError& error); 204 const SessionError& error);
193 void SendSessionKeysChangeInternal( 205 void SendSessionKeysChangeInternal(
194 int32_t result, 206 int32_t result,
195 const std::string& session_id, 207 const std::string& session_id,
196 bool has_additional_usable_key, 208 bool has_additional_usable_key,
197 const std::vector<PP_KeyInformation>& key_info); 209 const std::vector<PP_KeyInformation>& key_info);
198 void SendExpirationChangeInternal(int32_t result, 210 void SendExpirationChangeInternal(int32_t result,
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 299
288 uint32_t last_read_file_size_kb_; 300 uint32_t last_read_file_size_kb_;
289 bool file_size_uma_reported_; 301 bool file_size_uma_reported_;
290 302
291 DISALLOW_COPY_AND_ASSIGN(CdmAdapter); 303 DISALLOW_COPY_AND_ASSIGN(CdmAdapter);
292 }; 304 };
293 305
294 } // namespace media 306 } // namespace media
295 307
296 #endif // MEDIA_CDM_PPAPI_CDM_ADAPTER_H_ 308 #endif // MEDIA_CDM_PPAPI_CDM_ADAPTER_H_
OLDNEW
« no previous file with comments | « media/cdm/aes_decryptor_unittest.cc ('k') | media/cdm/ppapi/cdm_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698