Implement onInit() and onRelease() in FakeRenderer
PiperOrigin-RevId: 606301390
This commit is contained in:
parent
216f3fedb8
commit
2b473831c6
@ -39,6 +39,7 @@
|
||||
* Leanback extension:
|
||||
* Cast Extension:
|
||||
* Test Utilities:
|
||||
* Implement `onInit()` and `onRelease()` in `FakeRenderer`.
|
||||
* Remove deprecated symbols:
|
||||
* Demo app:
|
||||
|
||||
|
@ -61,7 +61,9 @@ public class FakeRenderer extends BaseRenderer {
|
||||
private boolean hasPendingBuffer;
|
||||
private List<Format> formatsRead;
|
||||
|
||||
public boolean isInitialized;
|
||||
public boolean isEnded;
|
||||
public boolean isReleased;
|
||||
public int positionResetCount;
|
||||
public int sampleBufferReadCount;
|
||||
public int enabledCount;
|
||||
@ -196,4 +198,14 @@ public class FakeRenderer extends BaseRenderer {
|
||||
protected boolean shouldProcessBuffer(long bufferTimeUs, long playbackPositionUs) {
|
||||
return bufferTimeUs < playbackPositionUs + SOURCE_READAHEAD_US;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onInit() {
|
||||
isInitialized = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onRelease() {
|
||||
isReleased = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user