mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Add FakeSampleStreamItem to an existing FakeSampleStream.
Allows items to be added to the queue once the sample stream has already been created. Means tests can simulate data not all being available at the start. PiperOrigin-RevId: 290613392
This commit is contained in:
parent
04d325331b
commit
df41ae3f42
1 changed files with 9 additions and 0 deletions
|
|
@ -133,6 +133,15 @@ public final class FakeSampleStream implements SampleStream {
|
|||
this.timeUs = timeUs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an item to the end of the queue of {@link FakeSampleStreamItem items}.
|
||||
*
|
||||
* @param item The item to add.
|
||||
*/
|
||||
public void addFakeSampleStreamItem(FakeSampleStreamItem item) {
|
||||
this.fakeSampleStreamItems.add(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReady() {
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue