mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Add AMR-NB and AMR-WB support to ExoPlayer
This commit is contained in:
parent
b293cf2a76
commit
bcbfe9f708
@ -111,6 +111,8 @@ import java.util.List;
|
||||
public static final int TYPE_co64 = Util.getIntegerCodeForString("co64");
|
||||
public static final int TYPE_tx3g = Util.getIntegerCodeForString("tx3g");
|
||||
public static final int TYPE_stpp = Util.getIntegerCodeForString("stpp");
|
||||
public static final int TYPE_samr = Util.getIntegerCodeForString("samr");
|
||||
public static final int TYPE_sawb = Util.getIntegerCodeForString("sawb");
|
||||
|
||||
public final int type;
|
||||
|
||||
|
@ -452,7 +452,8 @@ import java.util.List;
|
||||
} else if (childAtomType == Atom.TYPE_mp4a || childAtomType == Atom.TYPE_enca
|
||||
|| childAtomType == Atom.TYPE_ac_3 || childAtomType == Atom.TYPE_ec_3
|
||||
|| childAtomType == Atom.TYPE_dtsc || childAtomType == Atom.TYPE_dtse
|
||||
|| childAtomType == Atom.TYPE_dtsh || childAtomType == Atom.TYPE_dtsl) {
|
||||
|| childAtomType == Atom.TYPE_dtsh || childAtomType == Atom.TYPE_dtsl
|
||||
|| childAtomType == Atom.TYPE_samr || childAtomType == Atom.TYPE_sawb) {
|
||||
parseAudioSampleEntry(stsd, childAtomType, childStartPosition, childAtomSize, trackId,
|
||||
durationUs, language, isQuickTime, out, i);
|
||||
} else if (childAtomType == Atom.TYPE_TTML) {
|
||||
@ -732,6 +733,10 @@ import java.util.List;
|
||||
mimeType = MimeTypes.AUDIO_DTS;
|
||||
} else if (atomType == Atom.TYPE_dtsh || atomType == Atom.TYPE_dtsl) {
|
||||
mimeType = MimeTypes.AUDIO_DTS_HD;
|
||||
} else if (atomType == Atom.TYPE_samr) {
|
||||
mimeType = MimeTypes.AUDIO_AMR_NB;
|
||||
} else if (atomType == Atom.TYPE_sawb) {
|
||||
mimeType = MimeTypes.AUDIO_AMR_WB;
|
||||
}
|
||||
|
||||
byte[] initializationData = null;
|
||||
|
@ -51,6 +51,8 @@ public final class MimeTypes {
|
||||
public static final String AUDIO_DTS_HD = BASE_TYPE_AUDIO + "/vnd.dts.hd";
|
||||
public static final String AUDIO_VORBIS = BASE_TYPE_AUDIO + "/vorbis";
|
||||
public static final String AUDIO_OPUS = BASE_TYPE_AUDIO + "/opus";
|
||||
public static final String AUDIO_AMR_NB = BASE_TYPE_AUDIO + "/3gpp";
|
||||
public static final String AUDIO_AMR_WB = BASE_TYPE_AUDIO + "/amr-wb";
|
||||
|
||||
public static final String TEXT_UNKNOWN = BASE_TYPE_TEXT + "/x-unknown";
|
||||
public static final String TEXT_VTT = BASE_TYPE_TEXT + "/vtt";
|
||||
|
Loading…
x
Reference in New Issue
Block a user