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
6f2891e5
authored
Apr 21, 2020
by
olly
Committed by
Ian Baker
Apr 27, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Remove usages of deprecated CacheDataSourceFactory
PiperOrigin-RevId: 307684243
parent
4abaaf13
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSourceFactory.java
playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashDownloadTest.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSourceFactory.java
View file @
6f2891e5
...
...
@@ -52,7 +52,7 @@ public final class CacheDataSourceFactory implements DataSource.Factory {
cache
,
upstreamFactory
,
new
FileDataSource
.
Factory
(),
new
CacheDataSink
Factory
(
cache
,
CacheDataSink
.
DEFAULT_FRAGMENT_SIZE
),
new
CacheDataSink
.
Factory
().
setCache
(
cache
),
flags
,
/* eventListener= */
null
);
}
...
...
playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/DashDownloadTest.java
View file @
6f2891e5
...
...
@@ -27,10 +27,9 @@ import com.google.android.exoplayer2.source.dash.manifest.DashManifest;
import
com.google.android.exoplayer2.source.dash.manifest.Representation
;
import
com.google.android.exoplayer2.source.dash.offline.DashDownloader
;
import
com.google.android.exoplayer2.testutil.HostActivity
;
import
com.google.android.exoplayer2.upstream.DataSource
;
import
com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory
;
import
com.google.android.exoplayer2.upstream.DummyDataSource
;
import
com.google.android.exoplayer2.upstream.cache.CacheDataSource
;
import
com.google.android.exoplayer2.upstream.cache.CacheDataSourceFactory
;
import
com.google.android.exoplayer2.upstream.cache.NoOpCacheEvictor
;
import
com.google.android.exoplayer2.upstream.cache.SimpleCache
;
import
com.google.android.exoplayer2.util.Util
;
...
...
@@ -56,8 +55,8 @@ public final class DashDownloadTest {
private
DashTestRunner
testRunner
;
private
File
tempFolder
;
private
SimpleCache
cache
;
private
D
efaultHttpDataSource
Factory
httpDataSourceFactory
;
private
CacheDataSource
Factory
offlineDataSourceFactory
;
private
D
ataSource
.
Factory
httpDataSourceFactory
;
private
DataSource
.
Factory
offlineDataSourceFactory
;
@Before
public
void
setUp
()
throws
Exception
{
...
...
@@ -71,9 +70,7 @@ public final class DashDownloadTest {
tempFolder
=
Util
.
createTempDirectory
(
testRule
.
getActivity
(),
"ExoPlayerTest"
);
cache
=
new
SimpleCache
(
tempFolder
,
new
NoOpCacheEvictor
());
httpDataSourceFactory
=
new
DefaultHttpDataSourceFactory
(
"ExoPlayer"
,
null
);
offlineDataSourceFactory
=
new
CacheDataSourceFactory
(
cache
,
DummyDataSource
.
FACTORY
,
CacheDataSource
.
FLAG_BLOCK_ON_CACHE
);
offlineDataSourceFactory
=
new
CacheDataSource
.
Factory
().
setCache
(
cache
);
}
@After
...
...
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