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

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

Issue 2114473002: Remove usage of MediaCodec.getName(), use proxy instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « 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 d0ee73e2419618f7028a8f5a848963caf3ee1553..960e2f96e5af9612514841984af6535cea67bdaa 100644
--- a/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java
+++ b/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java
@@ -226,7 +226,10 @@ class MediaCodecBridge {
@CalledByNative
private void release() {
try {
- Log.w(TAG, "calling MediaCodec.release() on " + mMediaCodec.getName());
+ String codecName = "unknown";
+ if (Build.VERSION.SDK_INT >= Build.VERSION.JELLY_BEAN_MR2)
watk 2016/06/30 00:38:20 Needs to be Build.VERSION_CODES.JELLY_BEAN_MR2
DaleCurtis 2016/06/30 00:59:26 Heh, impressed that's the only error given I wrote
+ codecName = mMediaCodec.getName();
+ Log.w(TAG, "calling MediaCodec.release() on " + codecName);
mMediaCodec.release();
} catch (IllegalStateException e) {
// The MediaCodec is stuck in a wrong state, possibly due to losing
@@ -750,19 +753,4 @@ class MediaCodecBridge {
return AudioFormat.CHANNEL_OUT_DEFAULT;
}
}
-
- /**
- * Return true if and only if this codec is a software codec.
- */
- @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
- @CalledByNative
- private boolean isSoftwareCodec() {
- boolean result = false;
- try {
- result = MediaCodecUtil.isSoftwareCodec(mMediaCodec.getName());
- } catch (Exception e) {
- Log.e(TAG, "Cannot determine software codec", e);
- }
- return result;
- }
}
« 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