Skip to content

Commit f1790eb

Browse files
Dave BurkeAndroid (Google) Code Review
authored andcommitted
Merge "Added support for HE-AAC recording." into jb-dev
2 parents 2f87014 + ec3f31f commit f1790eb

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

api/current.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11283,10 +11283,11 @@ package android.media {
1128311283

1128411284
public final class MediaRecorder.AudioEncoder {
1128511285
field public static final int AAC = 3; // 0x3
11286-
field public static final int AAC_ELD = 6; // 0x6
11286+
field public static final int AAC_ELD = 5; // 0x5
1128711287
field public static final int AMR_NB = 1; // 0x1
1128811288
field public static final int AMR_WB = 2; // 0x2
1128911289
field public static final int DEFAULT = 0; // 0x0
11290+
field public static final int HE_AAC = 4; // 0x4
1129011291
}
1129111292

1129211293
public final class MediaRecorder.AudioSource {

media/java/android/media/MediaRecorder.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,12 @@ private AudioEncoder() {}
251251
public static final int AMR_NB = 1;
252252
/** AMR (Wideband) audio codec */
253253
public static final int AMR_WB = 2;
254-
/** AAC audio codec */
254+
/** AAC Low Complexity (AAC-LC) audio codec */
255255
public static final int AAC = 3;
256-
/** @hide enhanced AAC audio codec */
257-
public static final int AAC_PLUS = 4;
258-
/** @hide enhanced AAC plus audio codec */
259-
public static final int EAAC_PLUS = 5;
260-
/** AAC-ELD audio codec */
261-
public static final int AAC_ELD = 6;
256+
/** High Efficiency AAC (HE-AAC) audio codec */
257+
public static final int HE_AAC = 4;
258+
/** Enhanced Low Delay AAC (AAC-ELD) audio codec */
259+
public static final int AAC_ELD = 5;
262260
}
263261

264262
/**

media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaProfileReader.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ public static String getAudioCodecName(int audioEncoder) {
8888
if (audioEncoder != MediaRecorder.AudioEncoder.AMR_NB &&
8989
audioEncoder != MediaRecorder.AudioEncoder.AMR_WB &&
9090
audioEncoder != MediaRecorder.AudioEncoder.AAC &&
91-
audioEncoder != MediaRecorder.AudioEncoder.AAC_PLUS &&
92-
audioEncoder != MediaRecorder.AudioEncoder.EAAC_PLUS) {
91+
audioEncoder != MediaRecorder.AudioEncoder.HE_AAC) {
9392
throw new IllegalArgumentException("Unsupported audio encodeer " + audioEncoder);
9493
}
9594
return audioEncoderMap.get(audioEncoder);
@@ -128,7 +127,6 @@ private static void initAudioEncoderMap() {
128127
audioEncoderMap.put(MediaRecorder.AudioEncoder.AMR_NB, "amrnb");
129128
audioEncoderMap.put(MediaRecorder.AudioEncoder.AMR_WB, "amrwb");
130129
audioEncoderMap.put(MediaRecorder.AudioEncoder.AAC, "aac");
131-
audioEncoderMap.put(MediaRecorder.AudioEncoder.AAC_PLUS, "aacplus");
132-
audioEncoderMap.put(MediaRecorder.AudioEncoder.EAAC_PLUS, "eaacplus");
130+
audioEncoderMap.put(MediaRecorder.AudioEncoder.HE_AAC, "heaac");
133131
}
134132
}

0 commit comments

Comments
 (0)