Skip to content

Commit

Permalink
Minimal change to expose segment indices in DefaultDashChunkSource
Browse files Browse the repository at this point in the history
Issue: #3037

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164614478
  • Loading branch information
ojw28 committed Aug 10, 2017
1 parent ceb1e87 commit 91adba5
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ public DashChunkSource createDashChunkSource(LoaderErrorThrower manifestLoaderEr
private final int[] adaptationSetIndices;
private final TrackSelection trackSelection;
private final int trackType;
private final RepresentationHolder[] representationHolders;
private final DataSource dataSource;
private final long elapsedRealtimeOffsetMs;
private final int maxSegmentsPerLoad;

protected final RepresentationHolder[] representationHolders;

private DashManifest manifest;
private int periodIndex;

private IOException fatalError;
private boolean missingLastSegment;

Expand Down Expand Up @@ -377,17 +377,20 @@ private static Chunk newMediaChunk(RepresentationHolder representationHolder,

// Protected classes.

/**
* Holds information about a single {@link Representation}.
*/
protected static final class RepresentationHolder {

public final ChunkExtractorWrapper extractorWrapper;
/* package */ final ChunkExtractorWrapper extractorWrapper;

public Representation representation;
public DashSegmentIndex segmentIndex;

private long periodDurationUs;
private int segmentNumShift;

public RepresentationHolder(long periodDurationUs, Representation representation,
/* package */ RepresentationHolder(long periodDurationUs, Representation representation,
boolean enableEventMessageTrack, boolean enableCea608Track) {
this.periodDurationUs = periodDurationUs;
this.representation = representation;
Expand Down Expand Up @@ -417,8 +420,8 @@ public RepresentationHolder(long periodDurationUs, Representation representation
segmentIndex = representation.getIndex();
}

public void updateRepresentation(long newPeriodDurationUs, Representation newRepresentation)
throws BehindLiveWindowException{
/* package */ void updateRepresentation(long newPeriodDurationUs,
Representation newRepresentation) throws BehindLiveWindowException {
DashSegmentIndex oldIndex = representation.getIndex();
DashSegmentIndex newIndex = newRepresentation.getIndex();

Expand Down

0 comments on commit 91adba5

Please sign in to comment.