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

Unified Diff: media/base/android/java/src/org/chromium/media/MediaCodecBridge.java

Issue 68923003: MediaCodecBridge: remove CodecInfo.mIsSecureDecoderSupported since it's unused & crashy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | « no previous file | media/base/android/media_codec_bridge.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/java/src/org/chromium/media/MediaCodecBridge.java
diff --git a/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java b/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java
index b240fc4a0713be19b5e830787d6cef20316e8540..88416af7ef881ab3b9607f62983de226a5d04f3c 100644
--- a/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java
+++ b/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java
@@ -84,12 +84,10 @@ class MediaCodecBridge {
private static class CodecInfo {
private final String mCodecType; // e.g. "video/x-vnd.on2.vp8".
private final String mCodecName; // e.g. "OMX.google.vp8.decoder".
- private final boolean mIsSecureDecoderSupported;
- private CodecInfo(String codecType, String codecName, boolean isSecureDecoderSupported) {
+ private CodecInfo(String codecType, String codecName) {
mCodecType = codecType;
mCodecName = codecName;
- mIsSecureDecoderSupported = isSecureDecoderSupported;
}
@CalledByNative("CodecInfo")
@@ -97,9 +95,6 @@ class MediaCodecBridge {
@CalledByNative("CodecInfo")
private String codecName() { return mCodecName; }
-
- @CalledByNative("CodecInfo")
- private boolean isSecureDecoderSupported() { return mIsSecureDecoderSupported; }
}
private static class DequeueOutputResult {
@@ -152,29 +147,12 @@ class MediaCodecBridge {
continue;
}
- boolean secureDecoderSupported = false;
String codecString = info.getName();
- // ".secure" codecs sometimes crash instead of throwing on pre-JBMR2
- // platforms, but this code isn't run on them anyway (MediaDrm
- // unavailable) so we side-step the issue. http://crbug.com/314868
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
- String secureCodecName = codecString + ".secure";
- try {
- MediaCodec secureCodec = MediaCodec.createByCodecName(secureCodecName);
- if (secureCodec != null) {
- secureDecoderSupported = true;
- secureCodec.release();
- }
- } catch (Exception e) {
- Log.e(TAG, "Failed to create " + secureCodecName);
- }
- }
-
String[] supportedTypes = info.getSupportedTypes();
for (int j = 0; j < supportedTypes.length; ++j) {
- if (!CodecInfoMap.containsKey(supportedTypes[j]) || secureDecoderSupported) {
+ if (!CodecInfoMap.containsKey(supportedTypes[j])) {
wjia(left Chromium) 2013/11/11 19:48:22 OOC, what if two codec's support same type? Based
Ami GONE FROM CHROMIUM 2013/11/11 19:51:49 The idea is that the android platform presents cod
CodecInfoMap.put(supportedTypes[j], new CodecInfo(
- supportedTypes[j], codecString, secureDecoderSupported));
+ supportedTypes[j], codecString));
}
}
}
« no previous file with comments | « no previous file | media/base/android/media_codec_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698