Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8e29e76b
authored
Jul 23, 2021
by
kim-vde
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge pull request #9163 from ProtoScott:feature/dtsx_codec_updates
PiperOrigin-RevId: 386428758
parents
72cf9c38
83d2c39a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
2 deletions
RELEASENOTES.md
library/common/src/main/java/com/google/android/exoplayer2/util/MimeTypes.java
library/common/src/test/java/com/google/android/exoplayer2/util/MimeTypesTest.java
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/Atom.java
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java
RELEASENOTES.md
View file @
8e29e76b
...
@@ -103,6 +103,9 @@
...
@@ -103,6 +103,9 @@
*
Deprecate
`setControlDispatcher`
in
`PlayerView`
,
`StyledPlayerView`
,
*
Deprecate
`setControlDispatcher`
in
`PlayerView`
,
`StyledPlayerView`
,
`PlayerControlView`
,
`StyledPlayerControlView`
and
`PlayerControlView`
,
`StyledPlayerControlView`
and
`PlayerNotificationManager`
.
`PlayerNotificationManager`
.
*
Extractors:
*
Add support for DTS-UHD in MP4
(
[
#9163
](
https://github.com/google/ExoPlayer/issues/9163
)
.
*
Ad playback:
*
Ad playback:
*
Support changing ad break positions in the player logic
*
Support changing ad break positions in the player logic
(
[
#5067
](
https://github.com/google/ExoPlayer/issues/5067
)
.
(
[
#5067
](
https://github.com/google/ExoPlayer/issues/5067
)
.
...
...
library/common/src/main/java/com/google/android/exoplayer2/util/MimeTypes.java
View file @
8e29e76b
...
@@ -76,6 +76,7 @@ public final class MimeTypes {
...
@@ -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
=
BASE_TYPE_AUDIO
+
"/vnd.dts"
;
public
static
final
String
AUDIO_DTS_HD
=
BASE_TYPE_AUDIO
+
"/vnd.dts.hd"
;
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_EXPRESS
=
BASE_TYPE_AUDIO
+
"/vnd.dts.hd;profile=lbr"
;
public
static
final
String
AUDIO_DTS_UHD
=
BASE_TYPE_AUDIO
+
"/vnd.dts.uhd"
;
public
static
final
String
AUDIO_VORBIS
=
BASE_TYPE_AUDIO
+
"/vorbis"
;
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_OPUS
=
BASE_TYPE_AUDIO
+
"/opus"
;
public
static
final
String
AUDIO_AMR
=
BASE_TYPE_AUDIO
+
"/amr"
;
public
static
final
String
AUDIO_AMR
=
BASE_TYPE_AUDIO
+
"/amr"
;
...
@@ -380,10 +381,14 @@ public final class MimeTypes {
...
@@ -380,10 +381,14 @@ public final class MimeTypes {
return
MimeTypes
.
AUDIO_E_AC3_JOC
;
return
MimeTypes
.
AUDIO_E_AC3_JOC
;
}
else
if
(
codec
.
startsWith
(
"ac-4"
)
||
codec
.
startsWith
(
"dac4"
))
{
}
else
if
(
codec
.
startsWith
(
"ac-4"
)
||
codec
.
startsWith
(
"dac4"
))
{
return
MimeTypes
.
AUDIO_AC4
;
return
MimeTypes
.
AUDIO_AC4
;
}
else
if
(
codec
.
startsWith
(
"dtsc"
)
||
codec
.
startsWith
(
"dtse"
)
)
{
}
else
if
(
codec
.
startsWith
(
"dtsc"
))
{
return
MimeTypes
.
AUDIO_DTS
;
return
MimeTypes
.
AUDIO_DTS
;
}
else
if
(
codec
.
startsWith
(
"dtse"
))
{
return
MimeTypes
.
AUDIO_DTS_EXPRESS
;
}
else
if
(
codec
.
startsWith
(
"dtsh"
)
||
codec
.
startsWith
(
"dtsl"
))
{
}
else
if
(
codec
.
startsWith
(
"dtsh"
)
||
codec
.
startsWith
(
"dtsl"
))
{
return
MimeTypes
.
AUDIO_DTS_HD
;
return
MimeTypes
.
AUDIO_DTS_HD
;
}
else
if
(
codec
.
startsWith
(
"dtsx"
))
{
return
MimeTypes
.
AUDIO_DTS_UHD
;
}
else
if
(
codec
.
startsWith
(
"opus"
))
{
}
else
if
(
codec
.
startsWith
(
"opus"
))
{
return
MimeTypes
.
AUDIO_OPUS
;
return
MimeTypes
.
AUDIO_OPUS
;
}
else
if
(
codec
.
startsWith
(
"vorbis"
))
{
}
else
if
(
codec
.
startsWith
(
"vorbis"
))
{
...
...
library/common/src/test/java/com/google/android/exoplayer2/util/MimeTypesTest.java
View file @
8e29e76b
...
@@ -137,9 +137,10 @@ public final class MimeTypesTest {
...
@@ -137,9 +137,10 @@ public final class MimeTypesTest {
assertThat
(
MimeTypes
.
getMediaMimeType
(
"ec-3"
)).
isEqualTo
(
MimeTypes
.
AUDIO_E_AC3
);
assertThat
(
MimeTypes
.
getMediaMimeType
(
"ec-3"
)).
isEqualTo
(
MimeTypes
.
AUDIO_E_AC3
);
assertThat
(
MimeTypes
.
getMediaMimeType
(
"ec+3"
)).
isEqualTo
(
MimeTypes
.
AUDIO_E_AC3_JOC
);
assertThat
(
MimeTypes
.
getMediaMimeType
(
"ec+3"
)).
isEqualTo
(
MimeTypes
.
AUDIO_E_AC3_JOC
);
assertThat
(
MimeTypes
.
getMediaMimeType
(
"dtsc"
)).
isEqualTo
(
MimeTypes
.
AUDIO_DTS
);
assertThat
(
MimeTypes
.
getMediaMimeType
(
"dtsc"
)).
isEqualTo
(
MimeTypes
.
AUDIO_DTS
);
assertThat
(
MimeTypes
.
getMediaMimeType
(
"dtse"
)).
isEqualTo
(
MimeTypes
.
AUDIO_DTS
);
assertThat
(
MimeTypes
.
getMediaMimeType
(
"dtse"
)).
isEqualTo
(
MimeTypes
.
AUDIO_DTS
_EXPRESS
);
assertThat
(
MimeTypes
.
getMediaMimeType
(
"dtsh"
)).
isEqualTo
(
MimeTypes
.
AUDIO_DTS_HD
);
assertThat
(
MimeTypes
.
getMediaMimeType
(
"dtsh"
)).
isEqualTo
(
MimeTypes
.
AUDIO_DTS_HD
);
assertThat
(
MimeTypes
.
getMediaMimeType
(
"dtsl"
)).
isEqualTo
(
MimeTypes
.
AUDIO_DTS_HD
);
assertThat
(
MimeTypes
.
getMediaMimeType
(
"dtsl"
)).
isEqualTo
(
MimeTypes
.
AUDIO_DTS_HD
);
assertThat
(
MimeTypes
.
getMediaMimeType
(
"dtsx"
)).
isEqualTo
(
MimeTypes
.
AUDIO_DTS_UHD
);
assertThat
(
MimeTypes
.
getMediaMimeType
(
"opus"
)).
isEqualTo
(
MimeTypes
.
AUDIO_OPUS
);
assertThat
(
MimeTypes
.
getMediaMimeType
(
"opus"
)).
isEqualTo
(
MimeTypes
.
AUDIO_OPUS
);
assertThat
(
MimeTypes
.
getMediaMimeType
(
"vorbis"
)).
isEqualTo
(
MimeTypes
.
AUDIO_VORBIS
);
assertThat
(
MimeTypes
.
getMediaMimeType
(
"vorbis"
)).
isEqualTo
(
MimeTypes
.
AUDIO_VORBIS
);
assertThat
(
MimeTypes
.
getMediaMimeType
(
"mp4a"
)).
isEqualTo
(
MimeTypes
.
AUDIO_AAC
);
assertThat
(
MimeTypes
.
getMediaMimeType
(
"mp4a"
)).
isEqualTo
(
MimeTypes
.
AUDIO_AAC
);
...
...
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/Atom.java
View file @
8e29e76b
...
@@ -165,6 +165,9 @@ import java.util.List;
...
@@ -165,6 +165,9 @@ import java.util.List;
public
static
final
int
TYPE_dtse
=
0x64747365
;
public
static
final
int
TYPE_dtse
=
0x64747365
;
@SuppressWarnings
(
"ConstantCaseForConstants"
)
@SuppressWarnings
(
"ConstantCaseForConstants"
)
public
static
final
int
TYPE_dtsx
=
0x64747378
;
@SuppressWarnings
(
"ConstantCaseForConstants"
)
public
static
final
int
TYPE_ddts
=
0x64647473
;
public
static
final
int
TYPE_ddts
=
0x64647473
;
@SuppressWarnings
(
"ConstantCaseForConstants"
)
@SuppressWarnings
(
"ConstantCaseForConstants"
)
...
...
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java
View file @
8e29e76b
...
@@ -965,6 +965,7 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
...
@@ -965,6 +965,7 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
||
childAtomType
==
Atom
.
TYPE_dtse
||
childAtomType
==
Atom
.
TYPE_dtse
||
childAtomType
==
Atom
.
TYPE_dtsh
||
childAtomType
==
Atom
.
TYPE_dtsh
||
childAtomType
==
Atom
.
TYPE_dtsl
||
childAtomType
==
Atom
.
TYPE_dtsl
||
childAtomType
==
Atom
.
TYPE_dtsx
||
childAtomType
==
Atom
.
TYPE_samr
||
childAtomType
==
Atom
.
TYPE_samr
||
childAtomType
==
Atom
.
TYPE_sawb
||
childAtomType
==
Atom
.
TYPE_sawb
||
childAtomType
==
Atom
.
TYPE_lpcm
||
childAtomType
==
Atom
.
TYPE_lpcm
...
@@ -1371,6 +1372,8 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
...
@@ -1371,6 +1372,8 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
mimeType
=
MimeTypes
.
AUDIO_DTS_HD
;
mimeType
=
MimeTypes
.
AUDIO_DTS_HD
;
}
else
if
(
atomType
==
Atom
.
TYPE_dtse
)
{
}
else
if
(
atomType
==
Atom
.
TYPE_dtse
)
{
mimeType
=
MimeTypes
.
AUDIO_DTS_EXPRESS
;
mimeType
=
MimeTypes
.
AUDIO_DTS_EXPRESS
;
}
else
if
(
atomType
==
Atom
.
TYPE_dtsx
)
{
mimeType
=
MimeTypes
.
AUDIO_DTS_UHD
;
}
else
if
(
atomType
==
Atom
.
TYPE_samr
)
{
}
else
if
(
atomType
==
Atom
.
TYPE_samr
)
{
mimeType
=
MimeTypes
.
AUDIO_AMR_NB
;
mimeType
=
MimeTypes
.
AUDIO_AMR_NB
;
}
else
if
(
atomType
==
Atom
.
TYPE_sawb
)
{
}
else
if
(
atomType
==
Atom
.
TYPE_sawb
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment