Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/dtsx codec updates #9163

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public final class MimeTypes {
public static final String AUDIO_DTS = BASE_TYPE_AUDIO + "/vnd.dts";
public static final String AUDIO_DTS_HD = BASE_TYPE_AUDIO + "/vnd.dts.hd";
public static final String AUDIO_DTS_EXPRESS = BASE_TYPE_AUDIO + "/vnd.dts.hd;profile=lbr";
public static final String AUDIO_DTS_X = BASE_TYPE_AUDIO + "/vnd.dts.uhd";
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 = BASE_TYPE_AUDIO + "/amr";
Expand Down Expand Up @@ -380,8 +381,12 @@ public static String getMediaMimeType(@Nullable String codec) {
return MimeTypes.AUDIO_E_AC3_JOC;
} else if (codec.startsWith("ac-4") || codec.startsWith("dac4")) {
return MimeTypes.AUDIO_AC4;
} else if (codec.startsWith("dtsc") || codec.startsWith("dtse")) {
} else if (codec.startsWith("dtsc")) {
return MimeTypes.AUDIO_DTS;
} else if (codec.startsWith("dtse")) {
return MimeTypes.AUDIO_DTS_EXPRESS;
} else if (codec.startsWith("dtsx")) {
return MimeTypes.AUDIO_DTS_X;
} else if (codec.startsWith("dtsh") || codec.startsWith("dtsl")) {
return MimeTypes.AUDIO_DTS_HD;
} else if (codec.startsWith("opus")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@
@SuppressWarnings("ConstantCaseForConstants")
public static final int TYPE_dtse = 0x64747365;

@SuppressWarnings("ConstantCaseForConstants")
public static final int TYPE_dtsx = 0x64747378;

@SuppressWarnings("ConstantCaseForConstants")
public static final int TYPE_ddts = 0x64647473;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,7 @@ private static StsdData parseStsd(
|| childAtomType == Atom.TYPE_dtse
|| childAtomType == Atom.TYPE_dtsh
|| childAtomType == Atom.TYPE_dtsl
|| childAtomType == Atom.TYPE_dtsx
|| childAtomType == Atom.TYPE_samr
|| childAtomType == Atom.TYPE_sawb
|| childAtomType == Atom.TYPE_lpcm
Expand Down Expand Up @@ -1368,6 +1369,8 @@ private static void parseAudioSampleEntry(
mimeType = MimeTypes.AUDIO_DTS_HD;
} else if (atomType == Atom.TYPE_dtse) {
mimeType = MimeTypes.AUDIO_DTS_EXPRESS;
} else if (atomType == Atom.TYPE_dtsx) {
mimeType = MimeTypes.AUDIO_DTS_X;
} else if (atomType == Atom.TYPE_samr) {
mimeType = MimeTypes.AUDIO_AMR_NB;
} else if (atomType == Atom.TYPE_sawb) {
Expand Down