summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/current.txt2
-rw-r--r--media/java/android/media/MediaCodec.java13
-rw-r--r--media/java/android/media/MediaFormat.java5
3 files changed, 15 insertions, 5 deletions
diff --git a/api/current.txt b/api/current.txt
index 87fd7df..5b8398b 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -15093,6 +15093,7 @@ package android.media {
field public static final java.lang.String KEY_AAC_MAX_OUTPUT_CHANNEL_COUNT = "aac-max-output-channel_count";
field public static final java.lang.String KEY_AAC_PROFILE = "aac-profile";
field public static final java.lang.String KEY_AAC_SBR_MODE = "aac-sbr-mode";
+ field public static final java.lang.String KEY_AUDIO_SESSION_ID = "audio-session-id";
field public static final java.lang.String KEY_BITRATE_MODE = "bitrate-mode";
field public static final java.lang.String KEY_BIT_RATE = "bitrate";
field public static final java.lang.String KEY_CAPTURE_RATE = "capture-rate";
@@ -15118,7 +15119,6 @@ package android.media {
field public static final java.lang.String KEY_PROFILE = "profile";
field public static final java.lang.String KEY_PUSH_BLANK_BUFFERS_ON_STOP = "push-blank-buffers-on-shutdown";
field public static final java.lang.String KEY_QUALITY = "quality";
- field public static final java.lang.String KEY_REFERENCE_CLOCK_ID = "reference-clock-id";
field public static final java.lang.String KEY_REPEAT_PREVIOUS_FRAME_AFTER = "repeat-previous-frame-after";
field public static final java.lang.String KEY_SAMPLE_RATE = "sample-rate";
field public static final java.lang.String KEY_TEMPORAL_LAYERING = "ts-schema";
diff --git a/media/java/android/media/MediaCodec.java b/media/java/android/media/MediaCodec.java
index 4a1c0ae..7bf9e98 100644
--- a/media/java/android/media/MediaCodec.java
+++ b/media/java/android/media/MediaCodec.java
@@ -502,8 +502,17 @@ final public class MediaCodec {
int i = 0;
for (Map.Entry<String, Object> entry: formatMap.entrySet()) {
- keys[i] = entry.getKey();
- values[i] = entry.getValue();
+ if (entry.getKey().equals(MediaFormat.KEY_AUDIO_SESSION_ID)) {
+ // TODO: Wire up as soon as AudioService is ready. Check entry.getValue() for
+ // non-integral type.
+ // long audioHwSync = audioService.getAudioHwSyncForSession(entry.getValue());
+ long audioHwSync = 0;
+ keys[i] = "audio-hw-sync";
+ values[i] = audioHwSync;
+ } else {
+ keys[i] = entry.getKey();
+ values[i] = entry.getValue();
+ }
++i;
}
}
diff --git a/media/java/android/media/MediaFormat.java b/media/java/android/media/MediaFormat.java
index c6586c0..fd79495 100644
--- a/media/java/android/media/MediaFormat.java
+++ b/media/java/android/media/MediaFormat.java
@@ -444,12 +444,13 @@ public final class MediaFormat {
public static final String KEY_BITRATE_MODE = "bitrate-mode";
/**
- * A key describing the reference clock ID for a tunneled codec.
+ * A key describing the audio session ID of the AudioTrack associated
+ * to a tunneled video codec.
* The associated value is an integer.
*
* @see MediaCodecInfo.CodecCapabilities#FEATURE_TunneledPlayback
*/
- public static final String KEY_REFERENCE_CLOCK_ID = "reference-clock-id";
+ public static final String KEY_AUDIO_SESSION_ID = "audio-session-id";
/**
* A key for boolean AUTOSELECT behavior for the track. Tracks with AUTOSELECT=true