diff options
author | Lajos Molnar <lajos@google.com> | 2013-09-18 17:20:08 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-09-18 17:20:08 +0000 |
commit | b84624571ba2d0431dda8fd7cd45ae995630dd17 (patch) | |
tree | 1e8036f9e6ee1d8b5b7f9d6f7a40594fa9eec59e /media | |
parent | e23ce3b1fccd605ab696c120f86bd3912651731c (diff) | |
parent | 8a39021dfaf401cabb7f46b83d936ed88bf209d9 (diff) | |
download | frameworks_base-b84624571ba2d0431dda8fd7cd45ae995630dd17.zip frameworks_base-b84624571ba2d0431dda8fd7cd45ae995630dd17.tar.gz frameworks_base-b84624571ba2d0431dda8fd7cd45ae995630dd17.tar.bz2 |
Merge "Misc. media API changes" into klp-dev
Diffstat (limited to 'media')
-rw-r--r-- | media/java/android/media/MediaCodec.java | 12 | ||||
-rw-r--r-- | media/java/android/media/MediaFormat.java | 11 |
2 files changed, 13 insertions, 10 deletions
diff --git a/media/java/android/media/MediaCodec.java b/media/java/android/media/MediaCodec.java index 1250cbc..5175830 100644 --- a/media/java/android/media/MediaCodec.java +++ b/media/java/android/media/MediaCodec.java @@ -20,7 +20,9 @@ import android.media.MediaCodecInfo; import android.media.MediaCodecList; import android.media.MediaCrypto; import android.media.MediaFormat; +import android.os.Bundle; import android.view.Surface; + import java.nio.ByteBuffer; import java.util.Arrays; import java.util.Map; @@ -576,7 +578,7 @@ final public class MediaCodec { * Change a video encoder's target bitrate on the fly. The value is an * Integer object containing the new bitrate in bps. */ - public static final String PARAMETER_KEY_VIDEO_BITRATE = "videoBitrate"; + public static final String PARAMETER_KEY_VIDEO_BITRATE = "video-bitrate"; /** * Temporarily suspend/resume encoding of input data. While suspended @@ -598,7 +600,7 @@ final public class MediaCodec { /** * Communicate additional parameter changes to the component instance. */ - public final void setParameters(Map<String, Object> params) { + public final void setParameters(Bundle params) { if (params == null) { return; } @@ -607,9 +609,9 @@ final public class MediaCodec { Object[] values = new Object[params.size()]; int i = 0; - for (Map.Entry<String, Object> entry: params.entrySet()) { - keys[i] = entry.getKey(); - values[i] = entry.getValue(); + for (final String key: params.keySet()) { + keys[i] = key; + values[i] = params.get(key); ++i; } diff --git a/media/java/android/media/MediaFormat.java b/media/java/android/media/MediaFormat.java index 1ae8901..0f7906e 100644 --- a/media/java/android/media/MediaFormat.java +++ b/media/java/android/media/MediaFormat.java @@ -85,8 +85,8 @@ public final class MediaFormat { public static final String KEY_MIME = "mime"; /** - * A key describing the language of the content. - * The associated value is a string. + * A key describing the language of the content, using either ISO 639-1 + * or 639-2/T codes. The associated value is a string. */ public static final String KEY_LANGUAGE = "language"; @@ -380,9 +380,10 @@ public final class MediaFormat { /** * Creates a minimal subtitle format. * @param mime The mime type of the content. - * @param language The language of the content. Specify "und" if language - * information is only included in the content (similarly, if there - * are multiple language tracks in the content.) + * @param language The language of the content, using either ISO 639-1 or 639-2/T + * codes. Specify null or "und" if language information is only included + * in the content. (This will also work if there are multiple language + * tracks in the content.) */ public static final MediaFormat createSubtitleFormat( String mime, |