Add AudioFormat.ENCODING_E_AC3_JOC
Added to Java API only. Conversion from/to native depends on having the constant on the native side. Bug: 63901775 Test: make Change-Id: I816562d40e98684d6ae1d4c27460324c99926525
This commit is contained in:
@@ -21870,6 +21870,7 @@ package android.media {
|
||||
field public static final int ENCODING_DTS = 7; // 0x7
|
||||
field public static final int ENCODING_DTS_HD = 8; // 0x8
|
||||
field public static final int ENCODING_E_AC3 = 6; // 0x6
|
||||
field public static final int ENCODING_E_AC3_JOC = 18; // 0x12
|
||||
field public static final int ENCODING_IEC61937 = 13; // 0xd
|
||||
field public static final int ENCODING_INVALID = 0; // 0x0
|
||||
field public static final int ENCODING_MP3 = 9; // 0x9
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#define ENCODING_AAC_ELD 15
|
||||
#define ENCODING_AAC_XHE 16
|
||||
#define ENCODING_AC4 17
|
||||
#define ENCODING_E_AC3_JOC 18
|
||||
|
||||
#define ENCODING_INVALID 0
|
||||
#define ENCODING_DEFAULT 1
|
||||
@@ -80,6 +81,8 @@ static inline audio_format_t audioFormatToNative(int audioFormat)
|
||||
return AUDIO_FORMAT_AAC; // FIXME temporary value, needs addition of xHE-AAC
|
||||
case ENCODING_AC4:
|
||||
return AUDIO_FORMAT_AC4;
|
||||
// case ENCODING_E_AC3_JOC: // FIXME Not defined on the native side yet
|
||||
// return AUDIO_FORMAT_E_AC3_JOC;
|
||||
case ENCODING_DEFAULT:
|
||||
return AUDIO_FORMAT_DEFAULT;
|
||||
default:
|
||||
@@ -130,6 +133,8 @@ static inline int audioFormatFromNative(audio_format_t nativeFormat)
|
||||
// return ENCODING_AAC_XHE;
|
||||
case AUDIO_FORMAT_AC4:
|
||||
return ENCODING_AC4;
|
||||
// case AUDIO_FORMAT_E_AC3_JOC: // FIXME Not defined on the native side yet
|
||||
// return ENCODING_E_AC3_JOC;
|
||||
case AUDIO_FORMAT_DEFAULT:
|
||||
return ENCODING_DEFAULT;
|
||||
default:
|
||||
|
||||
@@ -265,6 +265,12 @@ public final class AudioFormat implements Parcelable {
|
||||
public static final int ENCODING_AAC_XHE = 16;
|
||||
/** Audio data format: AC-4 sync frame transport format */
|
||||
public static final int ENCODING_AC4 = 17;
|
||||
/** Audio data format: E-AC-3-JOC compressed
|
||||
* E-AC-3-JOC streams can be decoded by downstream devices supporting {@link #ENCODING_E_AC3}.
|
||||
* Use {@link #ENCODING_E_AC3} as the AudioTrack encoding when the downstream device
|
||||
* supports {@link #ENCODING_E_AC3} but not {@link #ENCODING_E_AC3_JOC}.
|
||||
**/
|
||||
public static final int ENCODING_E_AC3_JOC = 18;
|
||||
|
||||
/** @hide */
|
||||
public static String toLogFriendlyEncoding(int enc) {
|
||||
@@ -512,6 +518,7 @@ public final class AudioFormat implements Parcelable {
|
||||
case ENCODING_PCM_FLOAT:
|
||||
case ENCODING_AC3:
|
||||
case ENCODING_E_AC3:
|
||||
case ENCODING_E_AC3_JOC:
|
||||
case ENCODING_DTS:
|
||||
case ENCODING_DTS_HD:
|
||||
case ENCODING_MP3:
|
||||
@@ -537,6 +544,7 @@ public final class AudioFormat implements Parcelable {
|
||||
case ENCODING_PCM_FLOAT:
|
||||
case ENCODING_AC3:
|
||||
case ENCODING_E_AC3:
|
||||
case ENCODING_E_AC3_JOC:
|
||||
case ENCODING_DTS:
|
||||
case ENCODING_DTS_HD:
|
||||
case ENCODING_IEC61937:
|
||||
@@ -564,6 +572,7 @@ public final class AudioFormat implements Parcelable {
|
||||
return true;
|
||||
case ENCODING_AC3:
|
||||
case ENCODING_E_AC3:
|
||||
case ENCODING_E_AC3_JOC:
|
||||
case ENCODING_DTS:
|
||||
case ENCODING_DTS_HD:
|
||||
case ENCODING_MP3:
|
||||
@@ -593,6 +602,7 @@ public final class AudioFormat implements Parcelable {
|
||||
return true;
|
||||
case ENCODING_AC3:
|
||||
case ENCODING_E_AC3:
|
||||
case ENCODING_E_AC3_JOC:
|
||||
case ENCODING_DTS:
|
||||
case ENCODING_DTS_HD:
|
||||
case ENCODING_MP3:
|
||||
@@ -829,6 +839,7 @@ public final class AudioFormat implements Parcelable {
|
||||
case ENCODING_PCM_FLOAT:
|
||||
case ENCODING_AC3:
|
||||
case ENCODING_E_AC3:
|
||||
case ENCODING_E_AC3_JOC:
|
||||
case ENCODING_DTS:
|
||||
case ENCODING_DTS_HD:
|
||||
case ENCODING_IEC61937:
|
||||
@@ -1044,6 +1055,7 @@ public final class AudioFormat implements Parcelable {
|
||||
ENCODING_PCM_FLOAT,
|
||||
ENCODING_AC3,
|
||||
ENCODING_E_AC3,
|
||||
ENCODING_E_AC3_JOC,
|
||||
ENCODING_DTS,
|
||||
ENCODING_DTS_HD,
|
||||
ENCODING_IEC61937,
|
||||
|
||||
Reference in New Issue
Block a user