Bit of naming/documentation cleanup.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=122423250
This commit is contained in:
parent
2f4bfc3f5f
commit
6977c8f455
@ -376,7 +376,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
// preventing the renderer from making progress, if such an error exists.
|
||||
boolean rendererReadyOrEnded = isReadyOrEnded(renderer);
|
||||
if (!rendererReadyOrEnded) {
|
||||
renderer.maybeThrowError();
|
||||
renderer.maybeThrowStreamError();
|
||||
}
|
||||
allRenderersReadyOrEnded = allRenderersReadyOrEnded && rendererReadyOrEnded;
|
||||
}
|
||||
|
@ -165,16 +165,16 @@ public abstract class TrackRenderer implements ExoPlayerComponent {
|
||||
* Enable the renderer to consume from the specified {@link TrackStream}.
|
||||
*
|
||||
* @param formats The enabled formats.
|
||||
* @param trackStream The track stream from which the renderer should consume.
|
||||
* @param stream The track stream from which the renderer should consume.
|
||||
* @param positionUs The player's current position.
|
||||
* @param joining Whether this renderer is being enabled to join an ongoing playback.
|
||||
* @throws ExoPlaybackException If an error occurs.
|
||||
*/
|
||||
/* package */ final void enable(Format[] formats, TrackStream trackStream, long positionUs,
|
||||
/* package */ final void enable(Format[] formats, TrackStream stream, long positionUs,
|
||||
boolean joining) throws ExoPlaybackException {
|
||||
Assertions.checkState(state == STATE_DISABLED);
|
||||
state = STATE_ENABLED;
|
||||
stream = trackStream;
|
||||
this.stream = stream;
|
||||
onEnabled(formats, joining);
|
||||
reset(positionUs);
|
||||
}
|
||||
@ -261,8 +261,8 @@ public abstract class TrackRenderer implements ExoPlayerComponent {
|
||||
// Methods to be called by subclasses.
|
||||
|
||||
/**
|
||||
* Throws an error that's preventing the renderer from making progress or buffering more data at
|
||||
* this point in time.
|
||||
* Throws an error that's preventing the renderer from reading from its {@link TrackStream}. Does
|
||||
* nothing if no such error exists.
|
||||
* <p>
|
||||
* This method may be called when the renderer is in the following states:
|
||||
* {@link #STATE_ENABLED}.
|
||||
@ -270,7 +270,7 @@ public abstract class TrackRenderer implements ExoPlayerComponent {
|
||||
* @throws IOException An error that's preventing the renderer from making progress or buffering
|
||||
* more data.
|
||||
*/
|
||||
protected final void maybeThrowError() throws IOException {
|
||||
protected final void maybeThrowStreamError() throws IOException {
|
||||
stream.maybeThrowError();
|
||||
}
|
||||
|
||||
|
@ -46,8 +46,7 @@ public interface TrackStream {
|
||||
boolean isReady();
|
||||
|
||||
/**
|
||||
* If there's an underlying error preventing data from being read, it's thrown by this method.
|
||||
* If not, this method does nothing.
|
||||
* Throws an error that's preventing data from being read. Does nothing if no such error exists.
|
||||
*
|
||||
* @throws IOException The underlying error.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user