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
32afc333
authored
Oct 03, 2019
by
olly
Committed by
Oliver Woodman
Oct 13, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Make factories return specific types
PiperOrigin-RevId: 272614917
parent
2d0d4c78
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
7 deletions
extensions/rtmp/src/main/java/com/google/android/exoplayer2/ext/rtmp/RtmpDataSourceFactory.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/FileDataSourceFactory.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/ResolvingDataSource.java
testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeDataSource.java
extensions/rtmp/src/main/java/com/google/android/exoplayer2/ext/rtmp/RtmpDataSourceFactory.java
View file @
32afc333
...
@@ -37,7 +37,7 @@ public final class RtmpDataSourceFactory implements DataSource.Factory {
...
@@ -37,7 +37,7 @@ public final class RtmpDataSourceFactory implements DataSource.Factory {
}
}
@Override
@Override
public
DataSource
createDataSource
()
{
public
Rtmp
DataSource
createDataSource
()
{
RtmpDataSource
dataSource
=
new
RtmpDataSource
();
RtmpDataSource
dataSource
=
new
RtmpDataSource
();
if
(
listener
!=
null
)
{
if
(
listener
!=
null
)
{
dataSource
.
addTransferListener
(
listener
);
dataSource
.
addTransferListener
(
listener
);
...
...
library/core/src/main/java/com/google/android/exoplayer2/upstream/FileDataSourceFactory.java
View file @
32afc333
...
@@ -33,7 +33,7 @@ public final class FileDataSourceFactory implements DataSource.Factory {
...
@@ -33,7 +33,7 @@ public final class FileDataSourceFactory implements DataSource.Factory {
}
}
@Override
@Override
public
DataSource
createDataSource
()
{
public
File
DataSource
createDataSource
()
{
FileDataSource
dataSource
=
new
FileDataSource
();
FileDataSource
dataSource
=
new
FileDataSource
();
if
(
listener
!=
null
)
{
if
(
listener
!=
null
)
{
dataSource
.
addTransferListener
(
listener
);
dataSource
.
addTransferListener
(
listener
);
...
...
library/core/src/main/java/com/google/android/exoplayer2/upstream/ResolvingDataSource.java
View file @
32afc333
...
@@ -64,9 +64,7 @@ public final class ResolvingDataSource implements DataSource {
...
@@ -64,9 +64,7 @@ public final class ResolvingDataSource implements DataSource {
private
final
Resolver
resolver
;
private
final
Resolver
resolver
;
/**
/**
* Creates factory for {@link ResolvingDataSource} instances.
* @param upstreamFactory The wrapped {@link DataSource.Factory} for handling resolved {@link
*
* @param upstreamFactory The wrapped {@link DataSource.Factory} handling the resolved {@link
* DataSpec DataSpecs}.
* DataSpec DataSpecs}.
* @param resolver The {@link Resolver} to resolve the {@link DataSpec DataSpecs}.
* @param resolver The {@link Resolver} to resolve the {@link DataSpec DataSpecs}.
*/
*/
...
@@ -76,7 +74,7 @@ public final class ResolvingDataSource implements DataSource {
...
@@ -76,7 +74,7 @@ public final class ResolvingDataSource implements DataSource {
}
}
@Override
@Override
public
DataSource
createDataSource
()
{
public
Resolving
DataSource
createDataSource
()
{
return
new
ResolvingDataSource
(
upstreamFactory
.
createDataSource
(),
resolver
);
return
new
ResolvingDataSource
(
upstreamFactory
.
createDataSource
(),
resolver
);
}
}
}
}
...
...
testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeDataSource.java
View file @
32afc333
...
@@ -52,7 +52,7 @@ public class FakeDataSource extends BaseDataSource {
...
@@ -52,7 +52,7 @@ public class FakeDataSource extends BaseDataSource {
}
}
@Override
@Override
public
DataSource
createDataSource
()
{
public
Fake
DataSource
createDataSource
()
{
return
new
FakeDataSource
(
fakeDataSet
,
isNetwork
);
return
new
FakeDataSource
(
fakeDataSet
,
isNetwork
);
}
}
}
}
...
...
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