OLD | NEW |
---|---|
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 #include "webkit/media/webmediaplayer_proxy.h" | 5 #include "webkit/media/webmediaplayer_proxy.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
10 #include "media/base/pipeline_status.h" | 10 #include "media/base/pipeline_status.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
159 webmediaplayer_->OnKeyError(key_system, session_id, | 159 webmediaplayer_->OnKeyError(key_system, session_id, |
160 error_code, system_code); | 160 error_code, system_code); |
161 } | 161 } |
162 | 162 |
163 void WebMediaPlayerProxy::KeyMessageTask(const std::string& key_system, | 163 void WebMediaPlayerProxy::KeyMessageTask(const std::string& key_system, |
164 const std::string& session_id, | 164 const std::string& session_id, |
165 scoped_array<uint8> message, | 165 scoped_array<uint8> message, |
166 int message_length, | 166 int message_length, |
167 const std::string& default_url) { | 167 const std::string& default_url) { |
168 DCHECK(render_loop_->BelongsToCurrentThread()); | 168 DCHECK(render_loop_->BelongsToCurrentThread()); |
169 if (webmediaplayer_) | 169 if (webmediaplayer_) { |
170 const GURL default_url_gurl(default_url); | |
171 DLOG_IF(WARNING, !default_url.empty() && !default_url_gurl.is_valid()) | |
172 << "Invalid URL in default_url: " << default_url.c_str(); | |
xhwang
2012/12/08 01:16:44
do you need c_str() here?
ddorwin
2012/12/08 01:20:58
Yes. Without it, no newline is added and all text
scherkus (not reviewing)
2012/12/11 21:07:43
huh? what text following default_str?
ddorwin
2012/12/14 20:52:27
Removed. Bug in the sample code. I updated cdm.h s
| |
170 webmediaplayer_->OnKeyMessage(key_system, session_id, | 173 webmediaplayer_->OnKeyMessage(key_system, session_id, |
171 message.Pass(), message_length, default_url); | 174 message.Pass(), message_length, |
175 default_url_gurl); | |
176 } | |
172 } | 177 } |
173 | 178 |
174 void WebMediaPlayerProxy::NeedKeyTask(const std::string& key_system, | 179 void WebMediaPlayerProxy::NeedKeyTask(const std::string& key_system, |
175 const std::string& session_id, | 180 const std::string& session_id, |
176 const std::string& type, | 181 const std::string& type, |
177 scoped_array<uint8> init_data, | 182 scoped_array<uint8> init_data, |
178 int init_data_size) { | 183 int init_data_size) { |
179 DCHECK(render_loop_->BelongsToCurrentThread()); | 184 DCHECK(render_loop_->BelongsToCurrentThread()); |
180 if (webmediaplayer_) | 185 if (webmediaplayer_) |
181 webmediaplayer_->OnNeedKey(key_system, session_id, type, | 186 webmediaplayer_->OnNeedKey(key_system, session_id, type, |
182 init_data.Pass(), init_data_size); | 187 init_data.Pass(), init_data_size); |
183 } | 188 } |
184 | 189 |
185 } // namespace webkit_media | 190 } // namespace webkit_media |
OLD | NEW |