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
cea37c60
authored
Jan 14, 2020
by
olly
Committed by
Oliver Woodman
Jan 16, 2020
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Use customCacheKey in DownloadHelper.createMediaSource
Issue: #6870 PiperOrigin-RevId: 289658261
parent
3feb263c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
RELEASENOTES.md
library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadHelper.java
library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaSource.java
RELEASENOTES.md
View file @
cea37c60
...
@@ -11,8 +11,15 @@
...
@@ -11,8 +11,15 @@
*
Rename
`MediaCodecRenderer.onOutputFormatChanged`
to
*
Rename
`MediaCodecRenderer.onOutputFormatChanged`
to
`MediaCodecRenderer.onOutputMediaFormatChanged`
, further
`MediaCodecRenderer.onOutputMediaFormatChanged`
, further
clarifying the distinction between
`Format`
and
`MediaFormat`
.
clarifying the distinction between
`Format`
and
`MediaFormat`
.
*
Downloads: Merge downloads in
`SegmentDownloader`
to improve overall download
*
Downloads:
speed (
[
#5978
](
https://github.com/google/ExoPlayer/issues/5978
)
).
*
Merge downloads in
`SegmentDownloader`
to improve overall download
speed (
[
#5978
](
https://github.com/google/ExoPlayer/issues/5978
)
).
*
Fix handling of network transitions in
`RequirementsWatcher`
(
[
#6733
](
https://github.com/google/ExoPlayer/issues/6733
)
). Incorrect
handling could previously cause downloads to be paused when they should have
been able to proceed.
*
Fix
`DownloadHelper.createMediaSource`
to use
`customCacheKey`
when creating
`ProgressiveMediaSource`
instances.
*
In MP4 streams, store the Android capture frame rate only in
*
In MP4 streams, store the Android capture frame rate only in
`Format.metadata`
.
`Format.frameRate`
now stores the calculated frame rate.
`Format.metadata`
.
`Format.frameRate`
now stores the calculated frame rate.
*
Add
`play`
and
`pause`
methods to
`Player`
.
*
Add
`play`
and
`pause`
methods to
`Player`
.
...
@@ -28,10 +35,6 @@
...
@@ -28,10 +35,6 @@
developers to handle data that's neither UTF-8 nor ISO-8859-1
developers to handle data that's neither UTF-8 nor ISO-8859-1
(
[
#6753
](
https://github.com/google/ExoPlayer/issues/6753
)
).
(
[
#6753
](
https://github.com/google/ExoPlayer/issues/6753
)
).
*
Add playlist API (
[
#6161
](
https://github.com/google/ExoPlayer/issues/6161
)
).
*
Add playlist API (
[
#6161
](
https://github.com/google/ExoPlayer/issues/6161
)
).
*
Fix handling of network transitions in
`RequirementsWatcher`
(
[
#6733
](
https://github.com/google/ExoPlayer/issues/6733
)
). Incorrect handling
could previously cause downloads to be paused when they should have been able
to proceed.
*
Fix handling of E-AC-3 streams that contain AC-3 syncframes
*
Fix handling of E-AC-3 streams that contain AC-3 syncframes
(
[
#6602
](
https://github.com/google/ExoPlayer/issues/6602
)
).
(
[
#6602
](
https://github.com/google/ExoPlayer/issues/6602
)
).
*
Fix playback of TrueHD streams in Matroska
*
Fix playback of TrueHD streams in Matroska
...
...
library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadHelper.java
View file @
cea37c60
...
@@ -448,6 +448,7 @@ public final class DownloadHelper {
...
@@ -448,6 +448,7 @@ public final class DownloadHelper {
break
;
break
;
case
DownloadRequest
.
TYPE_PROGRESSIVE
:
case
DownloadRequest
.
TYPE_PROGRESSIVE
:
return
new
ProgressiveMediaSource
.
Factory
(
dataSourceFactory
)
return
new
ProgressiveMediaSource
.
Factory
(
dataSourceFactory
)
.
setCustomCacheKey
(
downloadRequest
.
customCacheKey
)
.
createMediaSource
(
downloadRequest
.
uri
);
.
createMediaSource
(
downloadRequest
.
uri
);
default
:
default
:
throw
new
IllegalStateException
(
"Unsupported type: "
+
downloadRequest
.
type
);
throw
new
IllegalStateException
(
"Unsupported type: "
+
downloadRequest
.
type
);
...
...
library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaSource.java
View file @
cea37c60
...
@@ -111,7 +111,7 @@ public final class ProgressiveMediaSource extends BaseMediaSource
...
@@ -111,7 +111,7 @@ public final class ProgressiveMediaSource extends BaseMediaSource
* @return This factory, for convenience.
* @return This factory, for convenience.
* @throws IllegalStateException If {@link #createMediaSource(Uri)} has already been called.
* @throws IllegalStateException If {@link #createMediaSource(Uri)} has already been called.
*/
*/
public
Factory
setCustomCacheKey
(
String
customCacheKey
)
{
public
Factory
setCustomCacheKey
(
@Nullable
String
customCacheKey
)
{
Assertions
.
checkState
(!
isCreateCalled
);
Assertions
.
checkState
(!
isCreateCalled
);
this
.
customCacheKey
=
customCacheKey
;
this
.
customCacheKey
=
customCacheKey
;
return
this
;
return
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