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

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

Issue 2672313006: media: Remove the unused NdkMediaCodecBridge (Closed)
Patch Set: rebase past conflict Created 3 years, 10 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 | « media/base/android/BUILD.gn ('k') | 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 3abbe46d5573ca0d429ae22e1b4e14cf5ece154c..35f7deea44a321d79568a136485c38018807fc3c 100644
--- a/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java
+++ b/media/base/android/java/src/org/chromium/media/MediaCodecBridge.java
@@ -24,25 +24,20 @@ import org.chromium.media.MediaCodecUtil.MimeTypes;
import java.nio.ByteBuffer;
/**
- * A wrapper of the MediaCodec class to facilitate exception capturing and
- * audio rendering.
+ * A MediaCodec wrapper for adapting the API and catching exceptions.
*/
@JNINamespace("media")
class MediaCodecBridge {
private static final String TAG = "cr_MediaCodecBridge";
- // Error code for MediaCodecBridge. Keep this value in sync with
- // MediaCodecStatus in media_codec_bridge.h.
+ // Status codes. Keep these in sync with MediaCodecStatus in media_codec_bridge.h.
private static final int MEDIA_CODEC_OK = 0;
private static final int MEDIA_CODEC_DEQUEUE_INPUT_AGAIN_LATER = 1;
private static final int MEDIA_CODEC_DEQUEUE_OUTPUT_AGAIN_LATER = 2;
private static final int MEDIA_CODEC_OUTPUT_BUFFERS_CHANGED = 3;
private static final int MEDIA_CODEC_OUTPUT_FORMAT_CHANGED = 4;
- private static final int MEDIA_CODEC_INPUT_END_OF_STREAM = 5;
- private static final int MEDIA_CODEC_OUTPUT_END_OF_STREAM = 6;
- private static final int MEDIA_CODEC_NO_KEY = 7;
- private static final int MEDIA_CODEC_ABORT = 8;
- private static final int MEDIA_CODEC_ERROR = 9;
+ private static final int MEDIA_CODEC_NO_KEY = 5;
+ private static final int MEDIA_CODEC_ERROR = 6;
// After a flush(), dequeueOutputBuffer() can often produce empty presentation timestamps
// for several frames. As a result, the player may find that the time does not increase
@@ -241,10 +236,12 @@ class MediaCodecBridge {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
codecName = mMediaCodec.getName();
}
- Log.w(TAG, "calling MediaCodec.release() on " + codecName);
+ // This logging is to help us identify hung MediaCodecs in crash reports.
+ Log.w(TAG, "Releasing: " + codecName);
mMediaCodec.release();
+ Log.w(TAG, "Codec released");
} catch (IllegalStateException e) {
- // The MediaCodec is stuck in a wrong state, possibly due to losing
+ // The MediaCodec is stuck in a bad state, possibly due to losing
// the surface.
Log.e(TAG, "Cannot release media codec", e);
}
« no previous file with comments | « media/base/android/BUILD.gn ('k') | media/base/android/media_codec_bridge.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698