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
55862a77
authored
Jun 18, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Remove dead code
parent
51a8635b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
29 deletions
library/src/main/java/com/google/android/exoplayer/chunk/ChunkSampleSource.java
library/src/main/java/com/google/android/exoplayer/extractor/ExtractorSampleSource.java
library/src/main/java/com/google/android/exoplayer/hls/HlsSampleSource.java
library/src/main/java/com/google/android/exoplayer/chunk/ChunkSampleSource.java
View file @
55862a77
...
...
@@ -83,7 +83,6 @@ public class ChunkSampleSource implements SampleSource, SampleSourceReader, Load
private
Loader
loader
;
private
boolean
loadingFinished
;
private
IOException
currentLoadableException
;
private
boolean
currentLoadableExceptionFatal
;
private
int
currentLoadableExceptionCount
;
private
long
currentLoadableExceptionTimestamp
;
private
long
currentLoadStartTimeMs
;
...
...
@@ -294,8 +293,7 @@ public class ChunkSampleSource implements SampleSource, SampleSourceReader, Load
}
private
void
maybeThrowLoadableException
()
throws
IOException
{
if
(
currentLoadableException
!=
null
&&
(
currentLoadableExceptionFatal
||
currentLoadableExceptionCount
>
minLoadableRetryCount
))
{
if
(
currentLoadableException
!=
null
&&
currentLoadableExceptionCount
>
minLoadableRetryCount
)
{
throw
currentLoadableException
;
}
if
(
sampleQueue
.
isEmpty
()
&&
currentLoadableHolder
.
chunk
==
null
)
{
...
...
@@ -406,16 +404,9 @@ public class ChunkSampleSource implements SampleSource, SampleSourceReader, Load
private
void
clearCurrentLoadableException
()
{
currentLoadableException
=
null
;
currentLoadableExceptionCount
=
0
;
currentLoadableExceptionFatal
=
false
;
}
private
void
updateLoadControl
()
{
if
(
currentLoadableExceptionFatal
)
{
// We've failed, but we still need to update the control with our current state.
loadControl
.
update
(
this
,
downstreamPositionUs
,
-
1
,
false
,
true
);
return
;
}
long
now
=
SystemClock
.
elapsedRealtime
();
long
nextLoadPositionUs
=
getNextLoadPositionUs
();
boolean
isBackedOff
=
currentLoadableException
!=
null
;
...
...
library/src/main/java/com/google/android/exoplayer/extractor/ExtractorSampleSource.java
View file @
55862a77
...
...
@@ -91,7 +91,6 @@ public class ExtractorSampleSource implements SampleSource, SampleSourceReader,
private
Loader
loader
;
private
ExtractingLoadable
loadable
;
private
IOException
currentLoadableException
;
private
boolean
currentLoadableExceptionFatal
;
// TODO: Set this back to 0 in the correct place (some place indicative of making progress).
private
int
currentLoadableExceptionCount
;
private
long
currentLoadableExceptionTimestamp
;
...
...
@@ -404,7 +403,7 @@ public class ExtractorSampleSource implements SampleSource, SampleSourceReader,
}
private
void
maybeStartLoading
()
{
if
(
currentLoadableExceptionFatal
||
loadingFinished
||
loader
.
isLoading
())
{
if
(
loadingFinished
||
loader
.
isLoading
())
{
return
;
}
...
...
@@ -470,9 +469,6 @@ public class ExtractorSampleSource implements SampleSource, SampleSourceReader,
if
(
currentLoadableException
==
null
)
{
return
;
}
if
(
currentLoadableExceptionFatal
)
{
throw
currentLoadableException
;
}
int
minLoadableRetryCountForMedia
;
if
(
minLoadableRetryCount
!=
MIN_RETRY_COUNT_DEFAULT_FOR_MEDIA
)
{
minLoadableRetryCountForMedia
=
minLoadableRetryCount
;
...
...
@@ -528,7 +524,6 @@ public class ExtractorSampleSource implements SampleSource, SampleSourceReader,
loadable
=
null
;
currentLoadableException
=
null
;
currentLoadableExceptionCount
=
0
;
currentLoadableExceptionFatal
=
false
;
}
private
boolean
isPendingReset
()
{
...
...
library/src/main/java/com/google/android/exoplayer/hls/HlsSampleSource.java
View file @
55862a77
...
...
@@ -86,7 +86,6 @@ public class HlsSampleSource implements SampleSource, SampleSourceReader, Loader
private
Loader
loader
;
private
IOException
currentLoadableException
;
private
boolean
currentLoadableExceptionFatal
;
private
int
currentLoadableExceptionCount
;
private
long
currentLoadableExceptionTimestamp
;
private
long
currentLoadStartTimeMs
;
...
...
@@ -362,9 +361,7 @@ public class HlsSampleSource implements SampleSource, SampleSourceReader, Loader
notifyLoadCompleted
(
currentLoadable
.
bytesLoaded
(),
currentLoadable
.
type
,
currentLoadable
.
trigger
,
currentLoadable
.
format
,
-
1
,
-
1
,
now
,
loadDurationMs
);
}
if
(!
currentLoadableExceptionFatal
)
{
clearCurrentLoadable
();
}
clearCurrentLoadable
();
if
(
enabledTrackCount
>
0
||
!
prepared
)
{
maybeStartLoading
();
}
...
...
@@ -439,8 +436,7 @@ public class HlsSampleSource implements SampleSource, SampleSourceReader, Loader
}
private
void
maybeThrowLoadableException
()
throws
IOException
{
if
(
currentLoadableException
!=
null
&&
(
currentLoadableExceptionFatal
||
currentLoadableExceptionCount
>
minLoadableRetryCount
))
{
if
(
currentLoadableException
!=
null
&&
currentLoadableExceptionCount
>
minLoadableRetryCount
)
{
throw
currentLoadableException
;
}
}
...
...
@@ -469,16 +465,9 @@ public class HlsSampleSource implements SampleSource, SampleSourceReader, Loader
currentLoadable
=
null
;
currentLoadableException
=
null
;
currentLoadableExceptionCount
=
0
;
currentLoadableExceptionFatal
=
false
;
}
private
void
maybeStartLoading
()
{
if
(
currentLoadableExceptionFatal
)
{
// We've failed, but we still need to update the control with our current state.
loadControl
.
update
(
this
,
downstreamPositionUs
,
-
1
,
false
,
true
);
return
;
}
long
now
=
SystemClock
.
elapsedRealtime
();
long
nextLoadPositionUs
=
getNextLoadPositionUs
();
boolean
isBackedOff
=
currentLoadableException
!=
null
;
...
...
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