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

Side by Side Diff: webkit/media/crypto/key_systems.cc

Issue 10836038: Call CDMWrapper from PpapiDecryptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add PP_DecryptionBuffer_Dev and update Decrypt() PPP call. 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 unified diff | Download patch | Annotate | Revision Log
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 #include "webkit/media/crypto/key_systems.h" 5 #include "webkit/media/crypto/key_systems.h"
6 6
7 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h " 7 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h "
8 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" 8 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
9 9
10 namespace webkit_media { 10 namespace webkit_media {
(...skipping 30 matching lines...) Expand all
41 { "video/webm", "vorbis", kExternalClearKeyKeySystem }, 41 { "video/webm", "vorbis", kExternalClearKeyKeySystem },
42 { "video/webm", "vp8", kExternalClearKeyKeySystem }, 42 { "video/webm", "vp8", kExternalClearKeyKeySystem },
43 { "video/webm", "vp8.0", kExternalClearKeyKeySystem }, 43 { "video/webm", "vp8.0", kExternalClearKeyKeySystem },
44 { "audio/webm", "vorbis", kExternalClearKeyKeySystem }, 44 { "audio/webm", "vorbis", kExternalClearKeyKeySystem },
45 { "video/webm", "", kExternalClearKeyKeySystem }, 45 { "video/webm", "", kExternalClearKeyKeySystem },
46 { "audio/webm", "", kExternalClearKeyKeySystem } 46 { "audio/webm", "", kExternalClearKeyKeySystem }
47 }; 47 };
48 48
49 static const KeySystemPluginTypePair key_system_to_plugin_type_mapping[] = { 49 static const KeySystemPluginTypePair key_system_to_plugin_type_mapping[] = {
50 // TODO(xhwang): Update this with the real plugin name. 50 // TODO(xhwang): Update this with the real plugin name.
51 { kExternalClearKeyKeySystem, "application/x-ppapi-example" } 51 { kExternalClearKeyKeySystem, "application/x-ppapi-content-encryption" }
52 }; 52 };
53 53
54 static bool IsSupportedKeySystemWithContainerAndCodec( 54 static bool IsSupportedKeySystemWithContainerAndCodec(
55 const std::string& mime_type, 55 const std::string& mime_type,
56 const std::string& codec, 56 const std::string& codec,
57 const std::string& key_system) { 57 const std::string& key_system) {
58 for (size_t i = 0; 58 for (size_t i = 0;
59 i < arraysize(supported_format_key_system_combinations); 59 i < arraysize(supported_format_key_system_combinations);
60 ++i) { 60 ++i) {
61 const MediaFormatAndKeySystem& combination = 61 const MediaFormatAndKeySystem& combination =
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 std::string GetPluginType(const std::string& key_system) { 97 std::string GetPluginType(const std::string& key_system) {
98 for (size_t i = 0; i < arraysize(key_system_to_plugin_type_mapping); ++i) { 98 for (size_t i = 0; i < arraysize(key_system_to_plugin_type_mapping); ++i) {
99 if (key_system_to_plugin_type_mapping[i].key_system == key_system) 99 if (key_system_to_plugin_type_mapping[i].key_system == key_system)
100 return key_system_to_plugin_type_mapping[i].plugin_type; 100 return key_system_to_plugin_type_mapping[i].plugin_type;
101 } 101 }
102 102
103 return std::string(); 103 return std::string();
104 } 104 }
105 105
106 } // namespace webkit_media 106 } // namespace webkit_media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698