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
71dd3fe5
authored
Nov 18, 2019
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Revert "Add a parameter object for LoadErrorHandlingPolicy methods"
This reverts commit
b84a9bed
.
parent
a91ffdd4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
60 deletions
library/core/src/main/java/com/google/android/exoplayer2/upstream/LoadErrorHandlingPolicy.java
library/core/src/main/java/com/google/android/exoplayer2/upstream/LoadErrorHandlingPolicy.java
View file @
71dd3fe5
...
@@ -38,30 +38,6 @@ import java.io.IOException;
...
@@ -38,30 +38,6 @@ import java.io.IOException;
*/
*/
public
interface
LoadErrorHandlingPolicy
{
public
interface
LoadErrorHandlingPolicy
{
/** Holds information about a load task error. */
final
class
LoadErrorInfo
{
/** One of the {@link C C.DATA_TYPE_*} constants indicating the type of data to load. */
public
final
int
dataType
;
/**
* The duration in milliseconds of the load from the start of the first load attempt up to the
* point at which the error occurred.
*/
public
final
long
loadDurationMs
;
/** The exception associated to the load error. */
public
final
IOException
exception
;
/** The number of errors this load task has encountered, including this one. */
public
final
int
errorCount
;
/** Creates an instance with the given values. */
public
LoadErrorInfo
(
int
dataType
,
long
loadDurationMs
,
IOException
exception
,
int
errorCount
)
{
this
.
dataType
=
dataType
;
this
.
loadDurationMs
=
loadDurationMs
;
this
.
exception
=
exception
;
this
.
errorCount
=
errorCount
;
}
}
/**
/**
* Returns the number of milliseconds for which a resource associated to a provided load error
* Returns the number of milliseconds for which a resource associated to a provided load error
* should be blacklisted, or {@link C#TIME_UNSET} if the resource should not be blacklisted.
* should be blacklisted, or {@link C#TIME_UNSET} if the resource should not be blacklisted.
...
@@ -79,22 +55,6 @@ public interface LoadErrorHandlingPolicy {
...
@@ -79,22 +55,6 @@ public interface LoadErrorHandlingPolicy {
int
dataType
,
long
loadDurationMs
,
IOException
exception
,
int
errorCount
);
int
dataType
,
long
loadDurationMs
,
IOException
exception
,
int
errorCount
);
/**
/**
* Returns the number of milliseconds for which a resource associated to a provided load error
* should be blacklisted, or {@link C#TIME_UNSET} if the resource should not be blacklisted.
*
* @param loadErrorInfo A {@link LoadErrorInfo} holding information about the load error.
* @return The blacklist duration in milliseconds, or {@link C#TIME_UNSET} if the resource should
* not be blacklisted.
*/
default
long
getBlacklistDurationMsFor
(
LoadErrorInfo
loadErrorInfo
)
{
return
getBlacklistDurationMsFor
(
loadErrorInfo
.
dataType
,
loadErrorInfo
.
loadDurationMs
,
loadErrorInfo
.
exception
,
loadErrorInfo
.
errorCount
);
}
/**
* Returns the number of milliseconds to wait before attempting the load again, or {@link
* Returns the number of milliseconds to wait before attempting the load again, or {@link
* C#TIME_UNSET} if the error is fatal and should not be retried.
* C#TIME_UNSET} if the error is fatal and should not be retried.
*
*
...
@@ -114,26 +74,6 @@ public interface LoadErrorHandlingPolicy {
...
@@ -114,26 +74,6 @@ public interface LoadErrorHandlingPolicy {
long
getRetryDelayMsFor
(
int
dataType
,
long
loadDurationMs
,
IOException
exception
,
int
errorCount
);
long
getRetryDelayMsFor
(
int
dataType
,
long
loadDurationMs
,
IOException
exception
,
int
errorCount
);
/**
/**
* Returns the number of milliseconds to wait before attempting the load again, or {@link
* C#TIME_UNSET} if the error is fatal and should not be retried.
*
* <p>{@link Loader} clients may ignore the retry delay returned by this method in order to wait
* for a specific event before retrying. However, the load is retried if and only if this method
* does not return {@link C#TIME_UNSET}.
*
* @param loadErrorInfo A {@link LoadErrorInfo} holding information about the load error.
* @return The number of milliseconds to wait before attempting the load again, or {@link
* C#TIME_UNSET} if the error is fatal and should not be retried.
*/
default
long
getRetryDelayMsFor
(
LoadErrorInfo
loadErrorInfo
)
{
return
getRetryDelayMsFor
(
loadErrorInfo
.
dataType
,
loadErrorInfo
.
loadDurationMs
,
loadErrorInfo
.
exception
,
loadErrorInfo
.
errorCount
);
}
/**
* Returns the minimum number of times to retry a load in the case of a load error, before
* Returns the minimum number of times to retry a load in the case of a load error, before
* propagating the error.
* propagating the error.
*
*
...
...
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