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

Unified Diff: content/renderer/media/crypto/proxy_decryptor.cc

Issue 611513005: Pass initDataType instead of contentType on OnNeedKey(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Again. Created 6 years, 3 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
« no previous file with comments | « content/renderer/media/crypto/proxy_decryptor.h ('k') | media/filters/pipeline_integration_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/crypto/proxy_decryptor.cc
diff --git a/content/renderer/media/crypto/proxy_decryptor.cc b/content/renderer/media/crypto/proxy_decryptor.cc
index 98c301c573c235d3378cd7383a112f60b7a13ef2..c24e0d2a8216c5e1bc88148c8fb33b1489b03917 100644
--- a/content/renderer/media/crypto/proxy_decryptor.cc
+++ b/content/renderer/media/crypto/proxy_decryptor.cc
@@ -95,7 +95,7 @@ bool HasHeader(const uint8* data, int data_length, const std::string& header) {
std::equal(data, data + header.size(), header.begin());
}
-bool ProxyDecryptor::GenerateKeyRequest(const std::string& content_type,
+bool ProxyDecryptor::GenerateKeyRequest(const std::string& init_data_type,
const uint8* init_data,
int init_data_length) {
DVLOG(1) << "GenerateKeyRequest()";
@@ -134,17 +134,6 @@ bool ProxyDecryptor::GenerateKeyRequest(const std::string& content_type,
? media::MediaKeys::PERSISTENT_SESSION
: media::MediaKeys::TEMPORARY_SESSION;
- // Convert MIME types used in the prefixed implementation.
- std::string init_data_type;
- if (content_type == "audio/mp4" || content_type == "video/mp4") {
- init_data_type = "cenc";
- } else if (content_type == "audio/webm" || content_type == "video/webm") {
- init_data_type = "webm";
- } else {
- NOTREACHED();
- init_data_type = content_type;
- }
-
media_keys_->CreateSession(init_data_type, init_data, init_data_length,
session_type, promise.Pass());
return true;
« no previous file with comments | « content/renderer/media/crypto/proxy_decryptor.h ('k') | media/filters/pipeline_integration_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698