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