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
8138424d
authored
Oct 29, 2019
by
aquilescanta
Committed by
Oliver Woodman
Oct 30, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Replace usages of SampleQueue.hasNextSample with isReady
PiperOrigin-RevId: 277259448
parent
0f312561
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
8 deletions
library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaPeriod.java
library/core/src/main/java/com/google/android/exoplayer2/source/SampleQueue.java
library/core/src/main/java/com/google/android/exoplayer2/source/chunk/ChunkSampleStream.java
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/PlayerEmsgHandler.java
library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaPeriod.java
View file @
8138424d
...
...
@@ -523,7 +523,7 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
boolean
[]
trackIsAudioVideoFlags
=
getPreparedState
().
trackIsAudioVideoFlags
;
if
(!
pendingDeferredRetry
||
!
trackIsAudioVideoFlags
[
track
]
||
sampleQueues
[
track
].
hasNextSample
(
))
{
||
sampleQueues
[
track
].
isReady
(
/* loadingFinished= */
false
))
{
return
;
}
pendingResetPositionUs
=
0
;
...
...
library/core/src/main/java/com/google/android/exoplayer2/source/SampleQueue.java
View file @
8138424d
...
...
@@ -203,11 +203,6 @@ public class SampleQueue implements TrackOutput {
}
}
/** Returns whether a sample is available to be read. */
public
boolean
hasNextSample
()
{
return
metadataQueue
.
hasNextSample
();
}
/**
* Returns the absolute index of the first sample.
*/
...
...
library/core/src/main/java/com/google/android/exoplayer2/source/chunk/ChunkSampleStream.java
View file @
8138424d
...
...
@@ -740,7 +740,7 @@ public class ChunkSampleStream<T extends ChunkSource> implements SampleStream, S
@Override
public
boolean
isReady
()
{
return
loadingFinished
||
(!
isPendingReset
()
&&
sampleQueue
.
hasNextSample
()
);
return
!
isPendingReset
()
&&
sampleQueue
.
isReady
(
loadingFinished
);
}
@Override
...
...
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/PlayerEmsgHandler.java
View file @
8138424d
...
...
@@ -355,7 +355,7 @@ public final class PlayerEmsgHandler implements Handler.Callback {
// Internal methods.
private
void
parseAndDiscardSamples
()
{
while
(
sampleQueue
.
hasNextSample
(
))
{
while
(
sampleQueue
.
isReady
(
/* loadingFinished= */
false
))
{
MetadataInputBuffer
inputBuffer
=
dequeueSample
();
if
(
inputBuffer
==
null
)
{
continue
;
...
...
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