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
f5d8c211
authored
Aug 10, 2021
by
olly
Committed by
Christos Tsilopoulos
Aug 11, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Remove some deprecated source/sink classes
PiperOrigin-RevId: 389879570
parent
31a839c8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
194 deletions
RELEASENOTES.md
library/core/src/main/java/com/google/android/exoplayer2/upstream/FileDataSourceFactory.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSinkFactory.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSourceFactory.java
RELEASENOTES.md
View file @
f5d8c211
...
...
@@ -19,6 +19,9 @@
`Renderer`
instead, except for
`C.MSG_SET_SURFACE`
, which is replaced
with
`Renderer.MSG_SET_VIDEO_OUTPUT`
.
*
Remove
`DeviceListener`
. Use
`Player.Listener`
instead.
*
Remove
`CacheDataSourceFactory`
. Use
`CacheDataSource.Factory`
instead.
*
Remove
`CacheDataSinkFactory`
. Use
`CacheDataSink.Factory`
instead.
*
Remove
`FileDataSourceFactory`
. Use
`FileDataSource.Factory`
instead.
### 2.15.0 (2021-08-10)
...
...
library/core/src/main/java/com/google/android/exoplayer2/upstream/FileDataSourceFactory.java
deleted
100644 → 0
View file @
31a839c8
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
com
.
google
.
android
.
exoplayer2
.
upstream
;
import
androidx.annotation.Nullable
;
/** @deprecated Use {@link FileDataSource.Factory}. */
@Deprecated
public
final
class
FileDataSourceFactory
implements
DataSource
.
Factory
{
private
final
FileDataSource
.
Factory
wrappedFactory
;
public
FileDataSourceFactory
()
{
this
(
/* listener= */
null
);
}
public
FileDataSourceFactory
(
@Nullable
TransferListener
listener
)
{
wrappedFactory
=
new
FileDataSource
.
Factory
().
setListener
(
listener
);
}
@Override
public
FileDataSource
createDataSource
()
{
return
wrappedFactory
.
createDataSource
();
}
}
library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSinkFactory.java
deleted
100644 → 0
View file @
31a839c8
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
com
.
google
.
android
.
exoplayer2
.
upstream
.
cache
;
import
com.google.android.exoplayer2.upstream.DataSink
;
/** @deprecated Use {@link CacheDataSink.Factory}. */
@Deprecated
public
final
class
CacheDataSinkFactory
implements
DataSink
.
Factory
{
private
final
Cache
cache
;
private
final
long
fragmentSize
;
private
final
int
bufferSize
;
/** @see CacheDataSink#CacheDataSink(Cache, long) */
public
CacheDataSinkFactory
(
Cache
cache
,
long
fragmentSize
)
{
this
(
cache
,
fragmentSize
,
CacheDataSink
.
DEFAULT_BUFFER_SIZE
);
}
/** @see CacheDataSink#CacheDataSink(Cache, long, int) */
public
CacheDataSinkFactory
(
Cache
cache
,
long
fragmentSize
,
int
bufferSize
)
{
this
.
cache
=
cache
;
this
.
fragmentSize
=
fragmentSize
;
this
.
bufferSize
=
bufferSize
;
}
@Override
public
DataSink
createDataSink
()
{
return
new
CacheDataSink
(
cache
,
fragmentSize
,
bufferSize
);
}
}
library/core/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSourceFactory.java
deleted
100644 → 0
View file @
31a839c8
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
com
.
google
.
android
.
exoplayer2
.
upstream
.
cache
;
import
androidx.annotation.Nullable
;
import
com.google.android.exoplayer2.upstream.DataSink
;
import
com.google.android.exoplayer2.upstream.DataSource
;
import
com.google.android.exoplayer2.upstream.FileDataSource
;
/** @deprecated Use {@link CacheDataSource.Factory}. */
@Deprecated
public
final
class
CacheDataSourceFactory
implements
DataSource
.
Factory
{
private
final
Cache
cache
;
private
final
DataSource
.
Factory
upstreamFactory
;
private
final
DataSource
.
Factory
cacheReadDataSourceFactory
;
@CacheDataSource
.
Flags
private
final
int
flags
;
@Nullable
private
final
DataSink
.
Factory
cacheWriteDataSinkFactory
;
@Nullable
private
final
CacheDataSource
.
EventListener
eventListener
;
@Nullable
private
final
CacheKeyFactory
cacheKeyFactory
;
/**
* Constructs a factory which creates {@link CacheDataSource} instances with default {@link
* DataSource} and {@link DataSink} instances for reading and writing the cache.
*
* @param cache The cache.
* @param upstreamFactory A {@link DataSource.Factory} for creating upstream {@link DataSource}s
* for reading data not in the cache.
*/
public
CacheDataSourceFactory
(
Cache
cache
,
DataSource
.
Factory
upstreamFactory
)
{
this
(
cache
,
upstreamFactory
,
/* flags= */
0
);
}
/** @see CacheDataSource#CacheDataSource(Cache, DataSource, int) */
public
CacheDataSourceFactory
(
Cache
cache
,
DataSource
.
Factory
upstreamFactory
,
@CacheDataSource
.
Flags
int
flags
)
{
this
(
cache
,
upstreamFactory
,
new
FileDataSource
.
Factory
(),
new
CacheDataSink
.
Factory
().
setCache
(
cache
),
flags
,
/* eventListener= */
null
);
}
/**
* @see CacheDataSource#CacheDataSource(Cache, DataSource, DataSource, DataSink, int,
* CacheDataSource.EventListener)
*/
public
CacheDataSourceFactory
(
Cache
cache
,
DataSource
.
Factory
upstreamFactory
,
DataSource
.
Factory
cacheReadDataSourceFactory
,
@Nullable
DataSink
.
Factory
cacheWriteDataSinkFactory
,
@CacheDataSource
.
Flags
int
flags
,
@Nullable
CacheDataSource
.
EventListener
eventListener
)
{
this
(
cache
,
upstreamFactory
,
cacheReadDataSourceFactory
,
cacheWriteDataSinkFactory
,
flags
,
eventListener
,
/* cacheKeyFactory= */
null
);
}
/**
* @see CacheDataSource#CacheDataSource(Cache, DataSource, DataSource, DataSink, int,
* CacheDataSource.EventListener, CacheKeyFactory)
*/
public
CacheDataSourceFactory
(
Cache
cache
,
DataSource
.
Factory
upstreamFactory
,
DataSource
.
Factory
cacheReadDataSourceFactory
,
@Nullable
DataSink
.
Factory
cacheWriteDataSinkFactory
,
@CacheDataSource
.
Flags
int
flags
,
@Nullable
CacheDataSource
.
EventListener
eventListener
,
@Nullable
CacheKeyFactory
cacheKeyFactory
)
{
this
.
cache
=
cache
;
this
.
upstreamFactory
=
upstreamFactory
;
this
.
cacheReadDataSourceFactory
=
cacheReadDataSourceFactory
;
this
.
cacheWriteDataSinkFactory
=
cacheWriteDataSinkFactory
;
this
.
flags
=
flags
;
this
.
eventListener
=
eventListener
;
this
.
cacheKeyFactory
=
cacheKeyFactory
;
}
@Override
public
CacheDataSource
createDataSource
()
{
return
new
CacheDataSource
(
cache
,
upstreamFactory
.
createDataSource
(),
cacheReadDataSourceFactory
.
createDataSource
(),
cacheWriteDataSinkFactory
==
null
?
null
:
cacheWriteDataSinkFactory
.
createDataSink
(),
flags
,
eventListener
,
cacheKeyFactory
);
}
}
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