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
40926618
authored
Jul 30, 2019
by
aquilescanta
Committed by
Oliver Woodman
Aug 01, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Return the removed media source from ConcatenatingMediaSource.removeMediaSource
PiperOrigin-RevId: 260681773
parent
58006ac3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
library/core/src/main/java/com/google/android/exoplayer2/source/ConcatenatingMediaSource.java
library/core/src/main/java/com/google/android/exoplayer2/source/ConcatenatingMediaSource.java
View file @
40926618
...
...
@@ -263,9 +263,12 @@ public final class ConcatenatingMediaSource extends CompositeMediaSource<MediaSo
*
* @param index The index at which the media source will be removed. This index must be in the
* range of 0 <= index < {@link #getSize()}.
* @return The removed {@link MediaSource}.
*/
public
synchronized
void
removeMediaSource
(
int
index
)
{
public
synchronized
MediaSource
removeMediaSource
(
int
index
)
{
MediaSource
removedMediaSource
=
getMediaSource
(
index
);
removePublicMediaSources
(
index
,
index
+
1
,
/* handler= */
null
,
/* onCompletionAction= */
null
);
return
removedMediaSource
;
}
/**
...
...
@@ -282,10 +285,13 @@ public final class ConcatenatingMediaSource extends CompositeMediaSource<MediaSo
* @param handler The {@link Handler} to run {@code onCompletionAction}.
* @param onCompletionAction A {@link Runnable} which is executed immediately after the media
* source has been removed from the playlist.
* @return The removed {@link MediaSource}.
*/
public
synchronized
void
removeMediaSource
(
public
synchronized
MediaSource
removeMediaSource
(
int
index
,
Handler
handler
,
Runnable
onCompletionAction
)
{
MediaSource
removedMediaSource
=
getMediaSource
(
index
);
removePublicMediaSources
(
index
,
index
+
1
,
handler
,
onCompletionAction
);
return
removedMediaSource
;
}
/**
...
...
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