summaryrefslogtreecommitdiffstats
path: root/media/java/android/media/MediaCodec.java
diff options
context:
space:
mode:
Diffstat (limited to 'media/java/android/media/MediaCodec.java')
-rw-r--r--media/java/android/media/MediaCodec.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/media/java/android/media/MediaCodec.java b/media/java/android/media/MediaCodec.java
index 99db066..d5515eb 100644
--- a/media/java/android/media/MediaCodec.java
+++ b/media/java/android/media/MediaCodec.java
@@ -16,6 +16,8 @@
package android.media;
+import android.media.MediaCodecInfo;
+import android.media.MediaCodecList;
import android.media.MediaCrypto;
import android.media.MediaFormat;
import android.view.Surface;
@@ -498,6 +500,22 @@ final public class MediaCodec {
*/
public native final void setVideoScalingMode(int mode);
+ /**
+ * Get the component name. If the codec was created by createDecoderByType
+ * or createEncoderByType, what component is chosen is not known beforehand.
+ */
+ public native final String getName();
+
+ /**
+ * Get the codec info. If the codec was created by createDecoderByType
+ * or createEncoderByType, what component is chosen is not known beforehand,
+ * and thus the caller does not have the MediaCodecInfo.
+ */
+ public MediaCodecInfo getCodecInfo() {
+ return MediaCodecList.getCodecInfoAt(
+ MediaCodecList.findCodecByName(getName()));
+ }
+
private native final ByteBuffer[] getBuffers(boolean input);
private static native final void native_init();