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.
|
// preventing the renderer from making progress, if such an error exists.
|
||||||
boolean rendererReadyOrEnded = isReadyOrEnded(renderer);
|
boolean rendererReadyOrEnded = isReadyOrEnded(renderer);
|
||||||
if (!rendererReadyOrEnded) {
|
if (!rendererReadyOrEnded) {
|
||||||
renderer.maybeThrowError();
|
renderer.maybeThrowStreamError();
|
||||||
}
|
}
|
||||||
allRenderersReadyOrEnded = allRenderersReadyOrEnded && rendererReadyOrEnded;
|
allRenderersReadyOrEnded = allRenderersReadyOrEnded && rendererReadyOrEnded;
|
||||||
}
|
}
|
||||||
|
@ -165,16 +165,16 @@ public abstract class TrackRenderer implements ExoPlayerComponent {
|
|||||||
* Enable the renderer to consume from the specified {@link TrackStream}.
|
* Enable the renderer to consume from the specified {@link TrackStream}.
|
||||||
*
|
*
|
||||||
* @param formats The enabled formats.
|
* @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 positionUs The player's current position.
|
||||||
* @param joining Whether this renderer is being enabled to join an ongoing playback.
|
* @param joining Whether this renderer is being enabled to join an ongoing playback.
|
||||||
* @throws ExoPlaybackException If an error occurs.
|
* @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 {
|
boolean joining) throws ExoPlaybackException {
|
||||||
Assertions.checkState(state == STATE_DISABLED);
|
Assertions.checkState(state == STATE_DISABLED);
|
||||||
state = STATE_ENABLED;
|
state = STATE_ENABLED;
|
||||||
stream = trackStream;
|
this.stream = stream;
|
||||||
onEnabled(formats, joining);
|
onEnabled(formats, joining);
|
||||||
reset(positionUs);
|
reset(positionUs);
|
||||||
}
|
}
|
||||||
@ -261,8 +261,8 @@ public abstract class TrackRenderer implements ExoPlayerComponent {
|
|||||||
// Methods to be called by subclasses.
|
// Methods to be called by subclasses.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Throws an error that's preventing the renderer from making progress or buffering more data at
|
* Throws an error that's preventing the renderer from reading from its {@link TrackStream}. Does
|
||||||
* this point in time.
|
* nothing if no such error exists.
|
||||||
* <p>
|
* <p>
|
||||||
* This method may be called when the renderer is in the following states:
|
* This method may be called when the renderer is in the following states:
|
||||||
* {@link #STATE_ENABLED}.
|
* {@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
|
* @throws IOException An error that's preventing the renderer from making progress or buffering
|
||||||
* more data.
|
* more data.
|
||||||
*/
|
*/
|
||||||
protected final void maybeThrowError() throws IOException {
|
protected final void maybeThrowStreamError() throws IOException {
|
||||||
stream.maybeThrowError();
|
stream.maybeThrowError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,8 +46,7 @@ public interface TrackStream {
|
|||||||
boolean isReady();
|
boolean isReady();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If there's an underlying error preventing data from being read, it's thrown by this method.
|
* Throws an error that's preventing data from being read. Does nothing if no such error exists.
|
||||||
* If not, this method does nothing.
|
|
||||||
*
|
*
|
||||||
* @throws IOException The underlying error.
|
* @throws IOException The underlying error.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user