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
79638d1e
authored
Sep 23, 2020
by
andrewlewis
Committed by
Oliver Woodman
Oct 17, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add support for 'mett' sample description
PiperOrigin-RevId: 333272292
parent
884a0f52
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
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
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/Atom.java
View file @
79638d1e
...
@@ -356,6 +356,9 @@ import java.util.List;
...
@@ -356,6 +356,9 @@ import java.util.List;
public
static
final
int
TYPE_camm
=
0x63616d6d
;
public
static
final
int
TYPE_camm
=
0x63616d6d
;
@SuppressWarnings
(
"ConstantCaseForConstants"
)
@SuppressWarnings
(
"ConstantCaseForConstants"
)
public
static
final
int
TYPE_mett
=
0x6d657474
;
@SuppressWarnings
(
"ConstantCaseForConstants"
)
public
static
final
int
TYPE_alac
=
0x616c6163
;
public
static
final
int
TYPE_alac
=
0x616c6163
;
@SuppressWarnings
(
"ConstantCaseForConstants"
)
@SuppressWarnings
(
"ConstantCaseForConstants"
)
...
...
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java
View file @
79638d1e
...
@@ -891,6 +891,8 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
...
@@ -891,6 +891,8 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
||
childAtomType
==
Atom
.
TYPE_c608
)
{
||
childAtomType
==
Atom
.
TYPE_c608
)
{
parseTextSampleEntry
(
stsd
,
childAtomType
,
childStartPosition
,
childAtomSize
,
trackId
,
parseTextSampleEntry
(
stsd
,
childAtomType
,
childStartPosition
,
childAtomSize
,
trackId
,
language
,
out
);
language
,
out
);
}
else
if
(
childAtomType
==
Atom
.
TYPE_mett
)
{
parseMetaDataSampleEntry
(
stsd
,
childAtomType
,
childStartPosition
,
trackId
,
out
);
}
else
if
(
childAtomType
==
Atom
.
TYPE_camm
)
{
}
else
if
(
childAtomType
==
Atom
.
TYPE_camm
)
{
out
.
format
=
out
.
format
=
new
Format
.
Builder
()
new
Format
.
Builder
()
...
@@ -1097,6 +1099,18 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
...
@@ -1097,6 +1099,18 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
.
build
();
.
build
();
}
}
private
static
void
parseMetaDataSampleEntry
(
ParsableByteArray
parent
,
int
atomType
,
int
position
,
int
trackId
,
StsdData
out
)
{
parent
.
setPosition
(
position
+
Atom
.
HEADER_SIZE
+
StsdData
.
STSD_HEADER_SIZE
);
if
(
atomType
==
Atom
.
TYPE_mett
)
{
parent
.
readNullTerminatedString
();
// Skip optional content_encoding
@Nullable
String
mimeType
=
parent
.
readNullTerminatedString
();
if
(
mimeType
!=
null
)
{
out
.
format
=
new
Format
.
Builder
().
setId
(
trackId
).
setSampleMimeType
(
mimeType
).
build
();
}
}
}
/**
/**
* Parses the edts atom (defined in ISO/IEC 14496-12 subsection 8.6.5).
* Parses the edts atom (defined in ISO/IEC 14496-12 subsection 8.6.5).
*
*
...
...
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