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
9de6a758
authored
Feb 15, 2021
by
olly
Committed by
kim-vde
Feb 19, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Remove dynamic data from ExoTrackSelection.Definition
PiperOrigin-RevId: 357587767
parent
abaf1e10
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
24 deletions
library/core/src/main/java/com/google/android/exoplayer2/trackselection/AdaptiveTrackSelection.java
library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java
library/core/src/main/java/com/google/android/exoplayer2/trackselection/ExoTrackSelection.java
library/core/src/main/java/com/google/android/exoplayer2/trackselection/FixedTrackSelection.java
library/core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java
library/core/src/main/java/com/google/android/exoplayer2/trackselection/AdaptiveTrackSelection.java
View file @
9de6a758
...
...
@@ -150,9 +150,7 @@ public class AdaptiveTrackSelection extends BaseTrackSelection {
?
new
FixedTrackSelection
(
definition
.
group
,
/* track= */
definition
.
tracks
[
0
],
/* type= */
definition
.
type
,
/* reason= */
definition
.
reason
,
definition
.
data
)
/* type= */
definition
.
type
)
:
createAdaptiveTrackSelection
(
definition
.
group
,
definition
.
tracks
,
...
...
library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java
View file @
9de6a758
...
...
@@ -1722,11 +1722,7 @@ public class DefaultTrackSelector extends MappingTrackSelector {
override
==
null
?
null
:
new
ExoTrackSelection
.
Definition
(
rendererTrackGroups
.
get
(
override
.
groupIndex
),
override
.
tracks
,
override
.
type
,
C
.
SELECTION_REASON_MANUAL
,
/* data= */
null
);
rendererTrackGroups
.
get
(
override
.
groupIndex
),
override
.
tracks
,
override
.
type
);
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/trackselection/ExoTrackSelection.java
View file @
9de6a758
...
...
@@ -44,10 +44,6 @@ public interface ExoTrackSelection extends TrackSelection {
public
final
int
[]
tracks
;
/** The type that will be returned from {@link TrackSelection#getType()}. */
public
final
int
type
;
/** The track selection reason. One of the {@link C} SELECTION_REASON_ constants. */
public
final
int
reason
;
/** Optional data associated with this selection of tracks. */
@Nullable
public
final
Object
data
;
/**
* @param group The {@link TrackGroup}. Must not be null.
...
...
@@ -55,7 +51,7 @@ public interface ExoTrackSelection extends TrackSelection {
* null or empty. May be in any order.
*/
public
Definition
(
TrackGroup
group
,
int
...
tracks
)
{
this
(
group
,
tracks
,
TrackSelection
.
TYPE_UNSET
,
C
.
SELECTION_REASON_UNKNOWN
,
/* data= */
null
);
this
(
group
,
tracks
,
TrackSelection
.
TYPE_UNSET
);
}
/**
...
...
@@ -63,15 +59,11 @@ public interface ExoTrackSelection extends TrackSelection {
* @param tracks The indices of the selected tracks within the {@link TrackGroup}. Must not be
* null or empty. May be in any order.
* @param type The type that will be returned from {@link TrackSelection#getType()}.
* @param reason The track selection reason. One of the {@link C} SELECTION_REASON_ constants.
* @param data Optional data associated with this selection of tracks.
*/
public
Definition
(
TrackGroup
group
,
int
[]
tracks
,
int
type
,
int
reason
,
@Nullable
Object
data
)
{
public
Definition
(
TrackGroup
group
,
int
[]
tracks
,
int
type
)
{
this
.
group
=
group
;
this
.
tracks
=
tracks
;
this
.
type
=
type
;
this
.
reason
=
reason
;
this
.
data
=
data
;
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/trackselection/FixedTrackSelection.java
View file @
9de6a758
...
...
@@ -35,10 +35,19 @@ public final class FixedTrackSelection extends BaseTrackSelection {
* @param track The index of the selected track within the {@link TrackGroup}.
*/
public
FixedTrackSelection
(
TrackGroup
group
,
int
track
)
{
this
(
group
,
/* track= */
track
,
/* type= */
TrackSelection
.
TYPE_UNSET
);
}
/**
* @param group The {@link TrackGroup}. Must not be null.
* @param track The index of the selected track within the {@link TrackGroup}.
* @param type The type that will be returned from {@link TrackSelection#getType()}.
*/
public
FixedTrackSelection
(
TrackGroup
group
,
int
track
,
int
type
)
{
this
(
group
,
/* track= */
track
,
/* type= */
TrackSelection
.
TYPE_UNSET
,
/* type= */
type
,
/* reason= */
C
.
SELECTION_REASON_UNKNOWN
,
null
);
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java
View file @
9de6a758
...
...
@@ -64,11 +64,7 @@ public final class TrackSelectionUtil {
}
else
{
selections
[
i
]
=
new
FixedTrackSelection
(
definition
.
group
,
definition
.
tracks
[
0
],
/* type= */
definition
.
type
,
/* reason= */
definition
.
reason
,
definition
.
data
);
definition
.
group
,
definition
.
tracks
[
0
],
/* type= */
definition
.
type
);
}
}
return
selections
;
...
...
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