Update period index in DashMediaPeriod event dispatcher after manifest update.
Issue:#4492 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=205636634
This commit is contained in:
parent
e03623f701
commit
7d4ac516e7
@ -61,7 +61,6 @@ import java.util.List;
|
||||
/* package */ final int id;
|
||||
private final DashChunkSource.Factory chunkSourceFactory;
|
||||
private final int minLoadableRetryCount;
|
||||
private final EventDispatcher eventDispatcher;
|
||||
private final long elapsedRealtimeOffset;
|
||||
private final LoaderErrorThrower manifestLoaderErrorThrower;
|
||||
private final Allocator allocator;
|
||||
@ -72,6 +71,7 @@ import java.util.List;
|
||||
private final IdentityHashMap<ChunkSampleStream<DashChunkSource>, PlayerTrackEmsgHandler>
|
||||
trackEmsgHandlerBySampleStream;
|
||||
|
||||
private EventDispatcher eventDispatcher;
|
||||
private @Nullable Callback callback;
|
||||
private ChunkSampleStream<DashChunkSource>[] sampleStreams;
|
||||
private EventSampleStream[] eventSampleStreams;
|
||||
@ -126,6 +126,13 @@ import java.util.List;
|
||||
*/
|
||||
public void updateManifest(DashManifest manifest, int periodIndex) {
|
||||
this.manifest = manifest;
|
||||
if (this.periodIndex != periodIndex) {
|
||||
eventDispatcher =
|
||||
eventDispatcher.withParameters(
|
||||
/* windowIndex= */ 0,
|
||||
eventDispatcher.mediaPeriodId.copyWithPeriodIndex(periodIndex),
|
||||
manifest.getPeriod(periodIndex).startMs);
|
||||
}
|
||||
this.periodIndex = periodIndex;
|
||||
playerEmsgHandler.updateManifest(manifest);
|
||||
if (sampleStreams != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user