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
6c5af232
authored
Apr 11, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Minor tweaks to HlsSampleSource.
parent
da656e6f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
library/src/main/java/com/google/android/exoplayer/hls/HlsSampleSource.java
library/src/main/java/com/google/android/exoplayer/hls/HlsSampleSource.java
View file @
6c5af232
...
@@ -83,6 +83,7 @@ public class HlsSampleSource implements SampleSource, Loader.Callback {
...
@@ -83,6 +83,7 @@ public class HlsSampleSource implements SampleSource, Loader.Callback {
this
.
frameAccurateSeeking
=
frameAccurateSeeking
;
this
.
frameAccurateSeeking
=
frameAccurateSeeking
;
this
.
remainingReleaseCount
=
downstreamRendererCount
;
this
.
remainingReleaseCount
=
downstreamRendererCount
;
this
.
minLoadableRetryCount
=
minLoadableRetryCount
;
this
.
minLoadableRetryCount
=
minLoadableRetryCount
;
this
.
pendingResetPositionUs
=
NO_RESET_PENDING
;
extractors
=
new
LinkedList
<
HlsExtractorWrapper
>();
extractors
=
new
LinkedList
<
HlsExtractorWrapper
>();
}
}
...
@@ -190,7 +191,11 @@ public class HlsSampleSource implements SampleSource, Loader.Callback {
...
@@ -190,7 +191,11 @@ public class HlsSampleSource implements SampleSource, Loader.Callback {
return
DISCONTINUITY_READ
;
return
DISCONTINUITY_READ
;
}
}
if
(
onlyReadDiscontinuity
||
isPendingReset
()
||
extractors
.
isEmpty
())
{
if
(
onlyReadDiscontinuity
)
{
return
NOTHING_READ
;
}
if
(
isPendingReset
())
{
maybeThrowLoadableException
();
maybeThrowLoadableException
();
return
NOTHING_READ
;
return
NOTHING_READ
;
}
}
...
@@ -241,10 +246,11 @@ public class HlsSampleSource implements SampleSource, Loader.Callback {
...
@@ -241,10 +246,11 @@ public class HlsSampleSource implements SampleSource, Loader.Callback {
Assertions
.
checkState
(
prepared
);
Assertions
.
checkState
(
prepared
);
Assertions
.
checkState
(
enabledTrackCount
>
0
);
Assertions
.
checkState
(
enabledTrackCount
>
0
);
lastSeekPositionUs
=
positionUs
;
lastSeekPositionUs
=
positionUs
;
if
(
pendingResetPositionUs
==
positionUs
||
downstreamPositionUs
==
positionUs
)
{
if
((
isPendingReset
()
?
pendingResetPositionUs
:
downstreamPositionUs
)
==
positionUs
)
{
downstreamPositionUs
=
positionUs
;
return
;
return
;
}
}
// TODO: Optimize the seek for the case where the position is already buffered.
downstreamPositionUs
=
positionUs
;
downstreamPositionUs
=
positionUs
;
for
(
int
i
=
0
;
i
<
pendingDiscontinuities
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
pendingDiscontinuities
.
length
;
i
++)
{
pendingDiscontinuities
[
i
]
=
true
;
pendingDiscontinuities
[
i
]
=
true
;
...
@@ -261,9 +267,9 @@ public class HlsSampleSource implements SampleSource, Loader.Callback {
...
@@ -261,9 +267,9 @@ public class HlsSampleSource implements SampleSource, Loader.Callback {
}
else
if
(
loadingFinished
)
{
}
else
if
(
loadingFinished
)
{
return
TrackRenderer
.
END_OF_TRACK_US
;
return
TrackRenderer
.
END_OF_TRACK_US
;
}
else
{
}
else
{
long
largest
SampleTimestamp
=
extractors
.
getLast
().
getLargestParsedTimestampUs
();
long
largest
ParsedTimestampUs
=
extractors
.
getLast
().
getLargestParsedTimestampUs
();
return
largest
SampleTimestamp
==
Long
.
MIN_VALUE
?
downstreamPositionUs
return
largest
ParsedTimestampUs
==
Long
.
MIN_VALUE
?
downstreamPositionUs
:
largest
SampleTimestamp
;
:
largest
ParsedTimestampUs
;
}
}
}
}
...
...
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