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

Unified Diff: webkit/media/webmediaplayer_impl.cc

Issue 10829470: Support for parsing encrypted WebM streams by src. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« webkit/media/webmediaplayer_impl.h ('K') | « webkit/media/webmediaplayer_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/media/webmediaplayer_impl.cc
diff --git a/webkit/media/webmediaplayer_impl.cc b/webkit/media/webmediaplayer_impl.cc
index e07b0d4c3cdcf42d2a88e7603b9c4a5e16aa521f..42d7e385f6071f6e311bc6a8f0591df0e9001f4e 100644
--- a/webkit/media/webmediaplayer_impl.cc
+++ b/webkit/media/webmediaplayer_impl.cc
@@ -274,7 +274,9 @@ void WebMediaPlayerImpl::load(const WebKit::WebURL& url, CORSMode cors_mode) {
BuildDefaultCollection(proxy_->data_source(),
message_loop_factory_.get(),
filter_collection_.get(),
- &decryptor_);
+ &decryptor_,
+ base::Bind(&WebMediaPlayerImpl::SendNeedKey,
+ base::Unretained(this)));
}
void WebMediaPlayerImpl::cancelLoad() {
@@ -888,6 +890,7 @@ void WebMediaPlayerImpl::OnKeyAdded(const std::string& key_system,
GetClient()->keyAdded(WebString::fromUTF8(key_system),
WebString::fromUTF8(session_id));
+ pipeline_->KeyAdded();
}
void WebMediaPlayerImpl::OnNeedKey(const std::string& key_system,
@@ -902,6 +905,12 @@ void WebMediaPlayerImpl::OnNeedKey(const std::string& key_system,
init_data_size);
}
+bool WebMediaPlayerImpl::SendNeedKey(scoped_array<uint8> init_data,
+ int init_data_size) {
+ proxy_->DemuxerNeedKey(init_data.Pass(), init_data_size);
ddorwin 2012/08/22 23:20:29 Why is this different from the above? Isn't the ch
fgalligan1 2012/08/23 02:39:11 Because right now the the interface is defined in
ddorwin 2012/08/24 00:20:30 Okay, maybe a media/base version of ChunkDemuxerCl
fgalligan1 2012/08/24 20:01:26 Removed SendNeedKey
+ return true;
+}
+
#define COMPILE_ASSERT_MATCHING_ENUM(name) \
COMPILE_ASSERT(static_cast<int>(WebKit::WebMediaPlayerClient::name) == \
static_cast<int>(media::Decryptor::k ## name), \
« webkit/media/webmediaplayer_impl.h ('K') | « webkit/media/webmediaplayer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698