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
1be49604
authored
Jan 18, 2021
by
samrobinson
Committed by
Oliver Woodman
Jan 18, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Implement a segment based speed provider and interface.
PiperOrigin-RevId: 352401836
parent
dedf6071
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
library/common/src/main/java/com/google/android/exoplayer2/metadata/mp4/SlowMotionData.java
library/common/src/main/java/com/google/android/exoplayer2/metadata/mp4/SlowMotionData.java
View file @
1be49604
...
@@ -23,7 +23,9 @@ import androidx.annotation.Nullable;
...
@@ -23,7 +23,9 @@ import androidx.annotation.Nullable;
import
com.google.android.exoplayer2.metadata.Metadata
;
import
com.google.android.exoplayer2.metadata.Metadata
;
import
com.google.android.exoplayer2.util.Util
;
import
com.google.android.exoplayer2.util.Util
;
import
com.google.common.base.Objects
;
import
com.google.common.base.Objects
;
import
com.google.common.collect.ComparisonChain
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.List
;
/** Holds information about the segments of slow motion playback within a track. */
/** Holds information about the segments of slow motion playback within a track. */
...
@@ -32,6 +34,14 @@ public final class SlowMotionData implements Metadata.Entry {
...
@@ -32,6 +34,14 @@ public final class SlowMotionData implements Metadata.Entry {
/** Holds information about a single segment of slow motion playback within a track. */
/** Holds information about a single segment of slow motion playback within a track. */
public
static
final
class
Segment
implements
Parcelable
{
public
static
final
class
Segment
implements
Parcelable
{
public
static
final
Comparator
<
Segment
>
BY_START_THEN_END_THEN_DIVISOR
=
(
s1
,
s2
)
->
ComparisonChain
.
start
()
.
compare
(
s1
.
startTimeMs
,
s2
.
startTimeMs
)
.
compare
(
s1
.
endTimeMs
,
s2
.
endTimeMs
)
.
compare
(
s1
.
speedDivisor
,
s2
.
speedDivisor
)
.
result
();
/** The start time, in milliseconds, of the track segment that is intended to be slow motion. */
/** The start time, in milliseconds, of the track segment that is intended to be slow motion. */
public
final
long
startTimeMs
;
public
final
long
startTimeMs
;
/** The end time, in milliseconds, of the track segment that is intended to be slow motion. */
/** The end time, in milliseconds, of the track segment that is intended to be slow motion. */
...
...
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