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
e832a4e0
authored
Nov 16, 2020
by
samrobinson
Committed by
Ian Baker
Nov 16, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Adjust SEF reader times to long.
PiperOrigin-RevId: 342642410
parent
4ff7eb49
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
library/common/src/main/java/com/google/android/exoplayer2/metadata/mp4/SlowMotionData.java
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/SefReader.java
library/common/src/main/java/com/google/android/exoplayer2/metadata/mp4/SlowMotionData.java
View file @
e832a4e0
...
...
@@ -31,9 +31,9 @@ public final class SlowMotionData implements Metadata.Entry {
public
static
final
class
Segment
implements
Parcelable
{
/** The start time, in milliseconds, of the track segment that is intended to be slow motion. */
public
final
int
startTimeMs
;
public
final
long
startTimeMs
;
/** The end time, in milliseconds, of the track segment that is intended to be slow motion. */
public
final
int
endTimeMs
;
public
final
long
endTimeMs
;
/**
* The speed reduction factor.
*
...
...
@@ -49,7 +49,7 @@ public final class SlowMotionData implements Metadata.Entry {
* @param endTimeMs See {@link #endTimeMs}.
* @param speedDivisor See {@link #speedDivisor}.
*/
public
Segment
(
int
startTimeMs
,
int
endTimeMs
,
int
speedDivisor
)
{
public
Segment
(
long
startTimeMs
,
long
endTimeMs
,
int
speedDivisor
)
{
this
.
startTimeMs
=
startTimeMs
;
this
.
endTimeMs
=
endTimeMs
;
this
.
speedDivisor
=
speedDivisor
;
...
...
@@ -88,8 +88,8 @@ public final class SlowMotionData implements Metadata.Entry {
@Override
public
void
writeToParcel
(
Parcel
dest
,
int
flags
)
{
dest
.
write
Int
(
startTimeMs
);
dest
.
write
Int
(
endTimeMs
);
dest
.
write
Long
(
startTimeMs
);
dest
.
write
Long
(
endTimeMs
);
dest
.
writeInt
(
speedDivisor
);
}
...
...
@@ -98,8 +98,8 @@ public final class SlowMotionData implements Metadata.Entry {
@Override
public
Segment
createFromParcel
(
Parcel
in
)
{
int
startTimeMs
=
in
.
readInt
();
int
endTimeMs
=
in
.
readInt
();
long
startTimeMs
=
in
.
readLong
();
long
endTimeMs
=
in
.
readLong
();
int
speedDivisor
=
in
.
readInt
();
return
new
Segment
(
startTimeMs
,
endTimeMs
,
speedDivisor
);
}
...
...
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/SefReader.java
View file @
e832a4e0
...
...
@@ -234,8 +234,8 @@ import java.util.List;
throw
new
ParserException
();
}
try
{
int
startTimeMs
=
Integer
.
parseInt
(
values
.
get
(
0
));
int
endTimeMs
=
Integer
.
parseInt
(
values
.
get
(
1
));
long
startTimeMs
=
Long
.
parseLong
(
values
.
get
(
0
));
long
endTimeMs
=
Long
.
parseLong
(
values
.
get
(
1
));
int
speedMode
=
Integer
.
parseInt
(
values
.
get
(
2
));
int
speedDivisor
=
1
<<
(
speedMode
-
1
);
segments
.
add
(
new
SlowMotionData
.
Segment
(
startTimeMs
,
endTimeMs
,
speedDivisor
));
...
...
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