Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad981484 authored by Lajos Molnar's avatar Lajos Molnar
Browse files

MediaFormat: add more getters, setters as well as iterators

Add getters with default value.
Add numeric getters for arbitrary numeric format.
Add ability to enumerate and remove keys and feature keys.
Add copy constructor.
Add nullable annotations.

Bug: 112369509
Change-Id: Ifcb4ab7c4b3599aae5f6bf49001e9e8bb24b0a33
parent 950c469c
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -24549,16 +24549,30 @@ package android.media {
  public final class MediaFormat {
    ctor public MediaFormat();
    ctor public MediaFormat(android.media.MediaFormat);
    method public boolean containsFeature(java.lang.String);
    method public boolean containsKey(java.lang.String);
    method public static android.media.MediaFormat createAudioFormat(java.lang.String, int, int);
    method public static android.media.MediaFormat createSubtitleFormat(java.lang.String, java.lang.String);
    method public static android.media.MediaFormat createVideoFormat(java.lang.String, int, int);
    method public java.nio.ByteBuffer getByteBuffer(java.lang.String);
    method public java.nio.ByteBuffer getByteBuffer(java.lang.String, java.nio.ByteBuffer);
    method public boolean getFeatureEnabled(java.lang.String);
    method public java.util.Set<java.lang.String> getFeatures();
    method public float getFloat(java.lang.String);
    method public float getFloat(java.lang.String, float);
    method public int getInteger(java.lang.String);
    method public int getInteger(java.lang.String, int);
    method public java.util.Set<java.lang.String> getKeys();
    method public long getLong(java.lang.String);
    method public long getLong(java.lang.String, long);
    method public java.lang.Number getNumber(java.lang.String);
    method public java.lang.Number getNumber(java.lang.String, java.lang.Number);
    method public java.lang.String getString(java.lang.String);
    method public java.lang.String getString(java.lang.String, java.lang.String);
    method public int getValueTypeForKey(java.lang.String);
    method public void removeFeature(java.lang.String);
    method public void removeKey(java.lang.String);
    method public void setByteBuffer(java.lang.String, java.nio.ByteBuffer);
    method public void setFeatureEnabled(java.lang.String, boolean);
    method public void setFloat(java.lang.String, float);
@@ -24663,6 +24677,12 @@ package android.media {
    field public static final java.lang.String MIMETYPE_VIDEO_SCRAMBLED = "video/scrambled";
    field public static final java.lang.String MIMETYPE_VIDEO_VP8 = "video/x-vnd.on2.vp8";
    field public static final java.lang.String MIMETYPE_VIDEO_VP9 = "video/x-vnd.on2.vp9";
    field public static final int TYPE_BYTE_BUFFER = 5; // 0x5
    field public static final int TYPE_FLOAT = 3; // 0x3
    field public static final int TYPE_INTEGER = 1; // 0x1
    field public static final int TYPE_LONG = 2; // 0x2
    field public static final int TYPE_NULL = 0; // 0x0
    field public static final int TYPE_STRING = 4; // 0x4
  }
  public final class MediaMetadata implements android.os.Parcelable {
+387 −34

File changed.

Preview size limit exceeded, changes collapsed.