Merge "Publish new MediaCodec API" into jb-mr2-dev
diff --git a/api/current.txt b/api/current.txt
index 72aecbb..6fce7a4 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -11265,6 +11265,7 @@
method public static android.media.MediaCodec createByCodecName(java.lang.String);
method public static android.media.MediaCodec createDecoderByType(java.lang.String);
method public static android.media.MediaCodec createEncoderByType(java.lang.String);
+ method public final android.view.Surface createInputSurface();
method public final int dequeueInputBuffer(long);
method public final int dequeueOutputBuffer(android.media.MediaCodec.BufferInfo, long);
method public final void flush();
@@ -11278,6 +11279,7 @@
method public final void release();
method public final void releaseOutputBuffer(int, boolean);
method public final void setVideoScalingMode(int);
+ method public final void signalEndOfInputStream();
method public final void start();
method public final void stop();
field public static final int BUFFER_FLAG_CODEC_CONFIG = 2; // 0x2
@@ -11357,6 +11359,7 @@
field public static final int COLOR_FormatRawBayer10bit = 31; // 0x1f
field public static final int COLOR_FormatRawBayer8bit = 30; // 0x1e
field public static final int COLOR_FormatRawBayer8bitcompressed = 32; // 0x20
+ field public static final int COLOR_FormatSurface = 2130708361; // 0x7f000789
field public static final int COLOR_FormatYCbYCr = 25; // 0x19
field public static final int COLOR_FormatYCrYCb = 26; // 0x1a
field public static final int COLOR_FormatYUV411PackedPlanar = 18; // 0x12
@@ -14112,6 +14115,7 @@
method public static int eglGetError();
method public static boolean eglInitialize(android.opengl.EGLDisplay, int[], int, int[], int);
method public static boolean eglMakeCurrent(android.opengl.EGLDisplay, android.opengl.EGLSurface, android.opengl.EGLSurface, android.opengl.EGLContext);
+ method public static boolean eglPresentationTimeANDROID(android.opengl.EGLDisplay, android.opengl.EGLSurface, long);
method public static int eglQueryAPI();
method public static boolean eglQueryContext(android.opengl.EGLDisplay, android.opengl.EGLContext, int, int[], int);
method public static java.lang.String eglQueryString(android.opengl.EGLDisplay, int);
diff --git a/media/java/android/media/MediaCodec.java b/media/java/android/media/MediaCodec.java
index e155385..bdee6fa 100644
--- a/media/java/android/media/MediaCodec.java
+++ b/media/java/android/media/MediaCodec.java
@@ -268,7 +268,6 @@
* <p>
* The application is responsible for calling release() on the Surface when
* done.
- * @hide -- TODO(fadden): make this public before release
*/
public native final Surface createInputSurface();
@@ -471,7 +470,6 @@
* Signals end-of-stream on input. Equivalent to submitting an empty buffer with
* {@link #BUFFER_FLAG_END_OF_STREAM} set. This may only be used with
* encoders receiving input from a Surface created by {@link #createInputSurface}.
- * @hide -- TODO(fadden): make this public before release
*/
public native final void signalEndOfInputStream();
diff --git a/media/java/android/media/MediaCodecInfo.java b/media/java/android/media/MediaCodecInfo.java
index 6c1b87a..1501c79 100644
--- a/media/java/android/media/MediaCodecInfo.java
+++ b/media/java/android/media/MediaCodecInfo.java
@@ -93,8 +93,9 @@
public final static int COLOR_Format24BitABGR6666 = 43;
public final static int COLOR_TI_FormatYUV420PackedSemiPlanar = 0x7f000100;
- /** @hide -- TODO(fadden): make this public before release */
- public final static int COLOR_FormatAndroidOpaque = 0x7F000789;
+ // COLOR_FormatSurface indicates that the data will be a GraphicBuffer metadata reference.
+ // In OMX this is called OMX_COLOR_FormatAndroidOpaque.
+ public final static int COLOR_FormatSurface = 0x7F000789;
public final static int COLOR_QCOM_FormatYUV420SemiPlanar = 0x7fa30c00;
/**
diff --git a/opengl/java/android/opengl/EGL14.java b/opengl/java/android/opengl/EGL14.java
index d1e2a9ed..2c9508a 100644
--- a/opengl/java/android/opengl/EGL14.java
+++ b/opengl/java/android/opengl/EGL14.java
@@ -447,7 +447,6 @@
// C function EGLBoolean eglPresentationTimeANDROID ( EGLDisplay dpy, EGLSurface sur, EGLnsecsANDROID time )
- /** @hide -- TODO(fadden) unhide this */
public static native boolean eglPresentationTimeANDROID(
EGLDisplay dpy,
EGLSurface sur,