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
c7f2df0f
authored
May 06, 2020
by
insun
Committed by
Oliver Woodman
May 14, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add Player#getTrackSelector()
PiperOrigin-RevId: 310242733
parent
535e14cb
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
3 deletions
RELEASENOTES.md
extensions/cast/src/main/java/com/google/android/exoplayer2/ext/cast/CastPlayer.java
library/common/src/main/proguard-rules.txt
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java
library/core/src/main/java/com/google/android/exoplayer2/Player.java
library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java
testutils/src/main/java/com/google/android/exoplayer2/testutil/StubExoPlayer.java
RELEASENOTES.md
View file @
c7f2df0f
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
### dev-v2 (not yet released)
### dev-v2 (not yet released)
*
Core library:
*
Core library:
*
Add
`Player.getTrackSelector`
to access track selector from UI module.
*
Added
`TextComponent.getCurrentCues`
because the current cues are no
*
Added
`TextComponent.getCurrentCues`
because the current cues are no
longer forwarded to a new
`TextOutput`
in
`SimpleExoPlayer`
longer forwarded to a new
`TextOutput`
in
`SimpleExoPlayer`
automatically.
automatically.
...
...
extensions/cast/src/main/java/com/google/android/exoplayer2/ext/cast/CastPlayer.java
View file @
c7f2df0f
...
@@ -30,6 +30,7 @@ import com.google.android.exoplayer2.source.TrackGroupArray;
...
@@ -30,6 +30,7 @@ import com.google.android.exoplayer2.source.TrackGroupArray;
import
com.google.android.exoplayer2.trackselection.FixedTrackSelection
;
import
com.google.android.exoplayer2.trackselection.FixedTrackSelection
;
import
com.google.android.exoplayer2.trackselection.TrackSelection
;
import
com.google.android.exoplayer2.trackselection.TrackSelection
;
import
com.google.android.exoplayer2.trackselection.TrackSelectionArray
;
import
com.google.android.exoplayer2.trackselection.TrackSelectionArray
;
import
com.google.android.exoplayer2.trackselection.TrackSelector
;
import
com.google.android.exoplayer2.util.Assertions
;
import
com.google.android.exoplayer2.util.Assertions
;
import
com.google.android.exoplayer2.util.Log
;
import
com.google.android.exoplayer2.util.Log
;
import
com.google.android.exoplayer2.util.MimeTypes
;
import
com.google.android.exoplayer2.util.MimeTypes
;
...
@@ -514,6 +515,12 @@ public final class CastPlayer extends BasePlayer {
...
@@ -514,6 +515,12 @@ public final class CastPlayer extends BasePlayer {
}
}
@Override
@Override
@Nullable
public
TrackSelector
getTrackSelector
()
{
throw
new
UnsupportedOperationException
();
}
@Override
public
void
setRepeatMode
(
@RepeatMode
int
repeatMode
)
{
public
void
setRepeatMode
(
@RepeatMode
int
repeatMode
)
{
if
(
remoteMediaClient
==
null
)
{
if
(
remoteMediaClient
==
null
)
{
return
;
return
;
...
...
library/common/src/main/proguard-rules.txt
deleted
120000 → 0
View file @
535e14cb
../../proguard-rules.txt
\ No newline at end of file
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java
View file @
c7f2df0f
...
@@ -821,6 +821,12 @@ import java.util.concurrent.TimeoutException;
...
@@ -821,6 +821,12 @@ import java.util.concurrent.TimeoutException;
}
}
@Override
@Override
@Nullable
public
TrackSelector
getTrackSelector
()
{
return
trackSelector
;
}
@Override
public
TrackGroupArray
getCurrentTrackGroups
()
{
public
TrackGroupArray
getCurrentTrackGroups
()
{
return
playbackInfo
.
trackGroups
;
return
playbackInfo
.
trackGroups
;
}
}
...
...
library/core/src/main/java/com/google/android/exoplayer2/Player.java
View file @
c7f2df0f
...
@@ -33,6 +33,7 @@ import com.google.android.exoplayer2.source.TrackGroupArray;
...
@@ -33,6 +33,7 @@ import com.google.android.exoplayer2.source.TrackGroupArray;
import
com.google.android.exoplayer2.text.Cue
;
import
com.google.android.exoplayer2.text.Cue
;
import
com.google.android.exoplayer2.text.TextOutput
;
import
com.google.android.exoplayer2.text.TextOutput
;
import
com.google.android.exoplayer2.trackselection.TrackSelectionArray
;
import
com.google.android.exoplayer2.trackselection.TrackSelectionArray
;
import
com.google.android.exoplayer2.trackselection.TrackSelector
;
import
com.google.android.exoplayer2.util.Util
;
import
com.google.android.exoplayer2.util.Util
;
import
com.google.android.exoplayer2.video.VideoDecoderOutputBufferRenderer
;
import
com.google.android.exoplayer2.video.VideoDecoderOutputBufferRenderer
;
import
com.google.android.exoplayer2.video.VideoFrameMetadataListener
;
import
com.google.android.exoplayer2.video.VideoFrameMetadataListener
;
...
@@ -1189,6 +1190,10 @@ public interface Player {
...
@@ -1189,6 +1190,10 @@ public interface Player {
*/
*/
int
getRendererType
(
int
index
);
int
getRendererType
(
int
index
);
/** Returns the track selector that this player uses. */
@Nullable
TrackSelector
getTrackSelector
();
/**
/**
* Returns the available track groups.
* Returns the available track groups.
*/
*/
...
@@ -1202,7 +1207,8 @@ public interface Player {
...
@@ -1202,7 +1207,8 @@ public interface Player {
/**
/**
* Returns the current manifest. The type depends on the type of media being played. May be null.
* Returns the current manifest. The type depends on the type of media being played. May be null.
*/
*/
@Nullable
Object
getCurrentManifest
();
@Nullable
Object
getCurrentManifest
();
/**
/**
* Returns the current {@link Timeline}. Never null, but may be empty.
* Returns the current {@link Timeline}. Never null, but may be empty.
...
...
library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java
View file @
c7f2df0f
...
@@ -1558,6 +1558,13 @@ public class SimpleExoPlayer extends BasePlayer
...
@@ -1558,6 +1558,13 @@ public class SimpleExoPlayer extends BasePlayer
}
}
@Override
@Override
@Nullable
public
TrackSelector
getTrackSelector
()
{
verifyApplicationThread
();
return
player
.
getTrackSelector
();
}
@Override
public
TrackGroupArray
getCurrentTrackGroups
()
{
public
TrackGroupArray
getCurrentTrackGroups
()
{
verifyApplicationThread
();
verifyApplicationThread
();
return
player
.
getCurrentTrackGroups
();
return
player
.
getCurrentTrackGroups
();
...
...
testutils/src/main/java/com/google/android/exoplayer2/testutil/StubExoPlayer.java
View file @
c7f2df0f
...
@@ -30,6 +30,7 @@ import com.google.android.exoplayer2.source.MediaSource;
...
@@ -30,6 +30,7 @@ import com.google.android.exoplayer2.source.MediaSource;
import
com.google.android.exoplayer2.source.ShuffleOrder
;
import
com.google.android.exoplayer2.source.ShuffleOrder
;
import
com.google.android.exoplayer2.source.TrackGroupArray
;
import
com.google.android.exoplayer2.source.TrackGroupArray
;
import
com.google.android.exoplayer2.trackselection.TrackSelectionArray
;
import
com.google.android.exoplayer2.trackselection.TrackSelectionArray
;
import
com.google.android.exoplayer2.trackselection.TrackSelector
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -375,6 +376,12 @@ public abstract class StubExoPlayer extends BasePlayer implements ExoPlayer {
...
@@ -375,6 +376,12 @@ public abstract class StubExoPlayer extends BasePlayer implements ExoPlayer {
}
}
@Override
@Override
@Nullable
public
TrackSelector
getTrackSelector
()
{
throw
new
UnsupportedOperationException
();
}
@Override
public
TrackGroupArray
getCurrentTrackGroups
()
{
public
TrackGroupArray
getCurrentTrackGroups
()
{
throw
new
UnsupportedOperationException
();
throw
new
UnsupportedOperationException
();
}
}
...
...
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