Commit 0effffb8 by andrewlewis Committed by Oliver Woodman

Add support for reading .mp3 boxes in stsd.

This is used by Quicktime for MP3 tracks.

Issue: #2066

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139209989
parent 21e3361d
...@@ -52,6 +52,7 @@ import java.util.List; ...@@ -52,6 +52,7 @@ import java.util.List;
public static final int TYPE_d263 = Util.getIntegerCodeForString("d263"); public static final int TYPE_d263 = Util.getIntegerCodeForString("d263");
public static final int TYPE_mdat = Util.getIntegerCodeForString("mdat"); public static final int TYPE_mdat = Util.getIntegerCodeForString("mdat");
public static final int TYPE_mp4a = Util.getIntegerCodeForString("mp4a"); public static final int TYPE_mp4a = Util.getIntegerCodeForString("mp4a");
public static final int TYPE__mp3 = Util.getIntegerCodeForString(".mp3");
public static final int TYPE_wave = Util.getIntegerCodeForString("wave"); public static final int TYPE_wave = Util.getIntegerCodeForString("wave");
public static final int TYPE_lpcm = Util.getIntegerCodeForString("lpcm"); public static final int TYPE_lpcm = Util.getIntegerCodeForString("lpcm");
public static final int TYPE_sowt = Util.getIntegerCodeForString("sowt"); public static final int TYPE_sowt = Util.getIntegerCodeForString("sowt");
......
...@@ -600,7 +600,8 @@ import java.util.List; ...@@ -600,7 +600,8 @@ import java.util.List;
|| childAtomType == Atom.TYPE_dtsc || childAtomType == Atom.TYPE_dtse || 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 || childAtomType == Atom.TYPE_samr || childAtomType == Atom.TYPE_sawb
|| childAtomType == Atom.TYPE_lpcm || childAtomType == Atom.TYPE_sowt) { || childAtomType == Atom.TYPE_lpcm || childAtomType == Atom.TYPE_sowt
|| childAtomType == Atom.TYPE__mp3) {
parseAudioSampleEntry(stsd, childAtomType, childStartPosition, childAtomSize, trackId, parseAudioSampleEntry(stsd, childAtomType, childStartPosition, childAtomSize, trackId,
language, isQuickTime, drmInitData, out, i); language, isQuickTime, drmInitData, out, i);
} else if (childAtomType == Atom.TYPE_TTML) { } else if (childAtomType == Atom.TYPE_TTML) {
...@@ -829,6 +830,8 @@ import java.util.List; ...@@ -829,6 +830,8 @@ import java.util.List;
mimeType = MimeTypes.AUDIO_AMR_WB; mimeType = MimeTypes.AUDIO_AMR_WB;
} else if (atomType == Atom.TYPE_lpcm || atomType == Atom.TYPE_sowt) { } else if (atomType == Atom.TYPE_lpcm || atomType == Atom.TYPE_sowt) {
mimeType = MimeTypes.AUDIO_RAW; mimeType = MimeTypes.AUDIO_RAW;
} else if (atomType == Atom.TYPE__mp3) {
mimeType = MimeTypes.AUDIO_MPEG;
} }
byte[] initializationData = null; byte[] initializationData = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment