summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lajos Molnar <lajos@google.com> 2019-06-21 12:50:37 -0700
committer android-build-merger <android-build-merger@google.com> 2019-06-21 12:50:37 -0700
commitba0ce1d6a90cc47597137a19eefecd2da75a2a80 (patch)
tree6961ae7a1af6215d9a766c5ffdb9b3f9a5108052
parent7cfda2b91c73eb6b54b2ca1f9bc1d4fbf10384ad (diff)
parentcfb6f9344399c99c1bea6d6bb33e426c593ce400 (diff)
Merge "media: clarify frame dropping behavior for decoder output" into qt-dev
am: cfb6f93443 Change-Id: I069b15b05fc1032177c4874cd7ff2d2041076e22
-rw-r--r--media/java/android/media/MediaCodec.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/media/java/android/media/MediaCodec.java b/media/java/android/media/MediaCodec.java
index 56e8e8579ec4..510ee442f852 100644
--- a/media/java/android/media/MediaCodec.java
+++ b/media/java/android/media/MediaCodec.java
@@ -644,6 +644,16 @@ import java.util.concurrent.locks.ReentrantLock;
<p>
Also since {@link android.os.Build.VERSION_CODES#M}, you can change the output Surface
dynamically using {@link #setOutputSurface setOutputSurface}.
+ <p>
+ When rendering output to a Surface, the Surface may be configured to drop excessive frames (that
+ are not consumed by the Surface in a timely manner). Or it may be configured to not drop excessive
+ frames. In the latter mode if the Surface is not consuming output frames fast enough, it will
+ eventually block the decoder. Prior to {@link android.os.Build.VERSION_CODES#Q} the exact behavior
+ was undefined, with the exception that View surfaces (SuerfaceView or TextureView) always dropped
+ excessive frames. Since {@link android.os.Build.VERSION_CODES#Q} the default behavior is to drop
+ excessive frames. Applications can opt out of this behavior for non-View surfaces (such as
+ ImageReader or SurfaceTexture) by targeting SDK {@link android.os.Build.VERSION_CODES#Q} and
+ setting the key {@code "allow-frame-drop"} to {@code 0} in their configure format.
<h4>Transformations When Rendering onto Surface</h4>