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

Side by Side Diff: media/base/android/media_drm_bridge.h

Issue 230843004: Reland r262568 "Encrypted Media: Check container mime type in MediaDrmBridge". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_ 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_
6 #define MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_ 6 #define MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 26 matching lines...) Expand all
37 virtual ~MediaDrmBridge(); 37 virtual ~MediaDrmBridge();
38 38
39 // Checks whether MediaDRM is available. 39 // Checks whether MediaDRM is available.
40 // All other static methods check IsAvailable() internally. There's no need 40 // All other static methods check IsAvailable() internally. There's no need
41 // to check IsAvailable() explicitly before calling them. 41 // to check IsAvailable() explicitly before calling them.
42 static bool IsAvailable(); 42 static bool IsAvailable();
43 43
44 static bool IsSecurityLevelSupported(const std::string& key_system, 44 static bool IsSecurityLevelSupported(const std::string& key_system,
45 SecurityLevel security_level); 45 SecurityLevel security_level);
46 46
47 // TODO(xhwang): The |container_mime_type| is not the same as contentType in 47 // Checks whether |key_system| is supported.
48 // the EME spec. Revisit this once the spec issue with initData type is 48 static bool IsKeySystemSupported(const std::string& key_system);
49 // resolved. 49
50 // Checks whether |key_system| is supported with |container_mime_type|.
51 // |container_mime_type| must not be empty.
50 static bool IsKeySystemSupportedWithType( 52 static bool IsKeySystemSupportedWithType(
51 const std::string& key_system, 53 const std::string& key_system,
52 const std::string& container_mime_type); 54 const std::string& container_mime_type);
53 55
54 static bool IsSecureDecoderRequired(SecurityLevel security_level); 56 static bool IsSecureDecoderRequired(SecurityLevel security_level);
55 57
56 static bool RegisterMediaDrmBridge(JNIEnv* env); 58 static bool RegisterMediaDrmBridge(JNIEnv* env);
57 59
58 // Returns a MediaDrmBridge instance if |key_system| is supported, or a NULL 60 // Returns a MediaDrmBridge instance if |key_system| is supported, or a NULL
59 // pointer otherwise. 61 // pointer otherwise.
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 base::Closure media_crypto_ready_cb_; 151 base::Closure media_crypto_ready_cb_;
150 152
151 ResetCredentialsCB reset_credentials_cb_; 153 ResetCredentialsCB reset_credentials_cb_;
152 154
153 DISALLOW_COPY_AND_ASSIGN(MediaDrmBridge); 155 DISALLOW_COPY_AND_ASSIGN(MediaDrmBridge);
154 }; 156 };
155 157
156 } // namespace media 158 } // namespace media
157 159
158 #endif // MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_ 160 #endif // MEDIA_BASE_ANDROID_MEDIA_DRM_BRIDGE_H_
OLDNEW
« no previous file with comments | « media/base/android/java/src/org/chromium/media/MediaDrmBridge.java ('k') | media/base/android/media_drm_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698