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
bcbfe9f7
authored
Nov 17, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add AMR-NB and AMR-WB support to ExoPlayer
parent
b293cf2a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletions
library/src/main/java/com/google/android/exoplayer/extractor/mp4/Atom.java
library/src/main/java/com/google/android/exoplayer/extractor/mp4/AtomParsers.java
library/src/main/java/com/google/android/exoplayer/util/MimeTypes.java
library/src/main/java/com/google/android/exoplayer/extractor/mp4/Atom.java
View file @
bcbfe9f7
...
...
@@ -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
;
...
...
library/src/main/java/com/google/android/exoplayer/extractor/mp4/AtomParsers.java
View file @
bcbfe9f7
...
...
@@ -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
;
...
...
library/src/main/java/com/google/android/exoplayer/util/MimeTypes.java
View file @
bcbfe9f7
...
...
@@ -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"
;
...
...
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