mirror of
https://github.com/samsonjs/media.git
synced 2026-04-13 12:35:48 +00:00
Allow overriding of DefaultDashChunkSource.getNextChunk
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=171718775
This commit is contained in:
parent
fc985fe4da
commit
9a6d717a7a
1 changed files with 9 additions and 9 deletions
|
|
@ -175,7 +175,7 @@ public class DefaultDashChunkSource implements DashChunkSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public final void getNextChunk(MediaChunk previous, long playbackPositionUs, ChunkHolder out) {
|
||||
public void getNextChunk(MediaChunk previous, long playbackPositionUs, ChunkHolder out) {
|
||||
if (fatalError != null) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -304,7 +304,7 @@ public class DefaultDashChunkSource implements DashChunkSource {
|
|||
trackSelection.indexOf(chunk.trackFormat), e);
|
||||
}
|
||||
|
||||
// Private methods.
|
||||
// Internal methods.
|
||||
|
||||
private ArrayList<Representation> getRepresentations() {
|
||||
List<AdaptationSet> manifestAdapationSets = manifest.getPeriod(periodIndex).adaptationSets;
|
||||
|
|
@ -329,7 +329,12 @@ public class DefaultDashChunkSource implements DashChunkSource {
|
|||
}
|
||||
}
|
||||
|
||||
private static Chunk newInitializationChunk(RepresentationHolder representationHolder,
|
||||
private long resolveTimeToLiveEdgeUs(long playbackPositionUs) {
|
||||
boolean resolveTimeToLiveEdgePossible = manifest.dynamic && liveEdgeTimeUs != C.TIME_UNSET;
|
||||
return resolveTimeToLiveEdgePossible ? liveEdgeTimeUs - playbackPositionUs : C.TIME_UNSET;
|
||||
}
|
||||
|
||||
protected static Chunk newInitializationChunk(RepresentationHolder representationHolder,
|
||||
DataSource dataSource, Format trackFormat, int trackSelectionReason,
|
||||
Object trackSelectionData, RangedUri initializationUri, RangedUri indexUri) {
|
||||
RangedUri requestUri;
|
||||
|
|
@ -350,7 +355,7 @@ public class DefaultDashChunkSource implements DashChunkSource {
|
|||
trackSelectionReason, trackSelectionData, representationHolder.extractorWrapper);
|
||||
}
|
||||
|
||||
private static Chunk newMediaChunk(RepresentationHolder representationHolder,
|
||||
protected static Chunk newMediaChunk(RepresentationHolder representationHolder,
|
||||
DataSource dataSource, int trackType, Format trackFormat, int trackSelectionReason,
|
||||
Object trackSelectionData, int firstSegmentNum, int maxSegmentCount) {
|
||||
Representation representation = representationHolder.representation;
|
||||
|
|
@ -385,11 +390,6 @@ public class DefaultDashChunkSource implements DashChunkSource {
|
|||
}
|
||||
}
|
||||
|
||||
private long resolveTimeToLiveEdgeUs(long playbackPositionUs) {
|
||||
boolean resolveTimeToLiveEdgePossible = manifest.dynamic && liveEdgeTimeUs != C.TIME_UNSET;
|
||||
return resolveTimeToLiveEdgePossible ? liveEdgeTimeUs - playbackPositionUs : C.TIME_UNSET;
|
||||
}
|
||||
|
||||
// Protected classes.
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue