am b8462457: Merge "Misc. media API changes" into klp-dev
* commit 'b84624571ba2d0431dda8fd7cd45ae995630dd17': Misc. media API changes
This commit is contained in:
@@ -12431,7 +12431,7 @@ package android.media {
|
||||
method public final void queueSecureInputBuffer(int, int, android.media.MediaCodec.CryptoInfo, long, int) throws android.media.MediaCodec.CryptoException;
|
||||
method public final void release();
|
||||
method public final void releaseOutputBuffer(int, boolean);
|
||||
method public final void setParameters(java.util.Map<java.lang.String, java.lang.Object>);
|
||||
method public final void setParameters(android.os.Bundle);
|
||||
method public final void setVideoScalingMode(int);
|
||||
method public final void signalEndOfInputStream();
|
||||
method public final void start();
|
||||
@@ -12447,7 +12447,7 @@ package android.media {
|
||||
field public static final int INFO_TRY_AGAIN_LATER = -1; // 0xffffffff
|
||||
field public static final java.lang.String PARAMETER_KEY_REQUEST_SYNC_FRAME = "request-sync";
|
||||
field public static final java.lang.String PARAMETER_KEY_SUSPEND = "drop-input-frames";
|
||||
field public static final java.lang.String PARAMETER_KEY_VIDEO_BITRATE = "videoBitrate";
|
||||
field public static final java.lang.String PARAMETER_KEY_VIDEO_BITRATE = "video-bitrate";
|
||||
field public static final int VIDEO_SCALING_MODE_SCALE_TO_FIT = 1; // 0x1
|
||||
field public static final int VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING = 2; // 0x2
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user