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
3c65df92
authored
Sep 01, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Allow multiple sources for text.
Issue #753
parent
ecd48da1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletions
library/src/main/java/com/google/android/exoplayer/text/TextTrackRenderer.java
library/src/main/java/com/google/android/exoplayer/text/TextTrackRenderer.java
View file @
3c65df92
...
...
@@ -129,7 +129,23 @@ public final class TextTrackRenderer extends SampleSourceTrackRenderer implement
*/
public
TextTrackRenderer
(
SampleSource
source
,
TextRenderer
textRenderer
,
Looper
textRendererLooper
,
SubtitleParser
...
subtitleParsers
)
{
super
(
source
);
this
(
new
SampleSource
[]
{
source
},
textRenderer
,
textRendererLooper
,
subtitleParsers
);
}
/**
* @param sources Sources from which samples containing subtitle data can be read.
* @param textRenderer The text renderer.
* @param textRendererLooper The looper associated with the thread on which textRenderer should be
* invoked. If the renderer makes use of standard Android UI components, then this should
* normally be the looper associated with the applications' main thread, which can be
* obtained using {@link android.app.Activity#getMainLooper()}. Null may be passed if the
* renderer should be invoked directly on the player's internal rendering thread.
* @param subtitleParsers {@link SubtitleParser}s to parse text samples, in order of decreasing
* priority. If omitted, the default parsers will be used.
*/
public
TextTrackRenderer
(
SampleSource
[]
sources
,
TextRenderer
textRenderer
,
Looper
textRendererLooper
,
SubtitleParser
...
subtitleParsers
)
{
super
(
sources
);
this
.
textRenderer
=
Assertions
.
checkNotNull
(
textRenderer
);
this
.
textRendererHandler
=
textRendererLooper
==
null
?
null
:
new
Handler
(
textRendererLooper
,
this
);
...
...
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