mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +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
04d10ea67d
commit
e6bf373612
1 changed files with 9 additions and 4 deletions
|
|
@ -173,7 +173,7 @@ public class DefaultDashChunkSource implements DashChunkSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final void getNextChunk(MediaChunk previous, long playbackPositionUs, ChunkHolder out) {
|
public void getNextChunk(MediaChunk previous, long playbackPositionUs, ChunkHolder out) {
|
||||||
if (fatalError != null) {
|
if (fatalError != null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -300,7 +300,7 @@ public class DefaultDashChunkSource implements DashChunkSource {
|
||||||
trackSelection.indexOf(chunk.trackFormat), e);
|
trackSelection.indexOf(chunk.trackFormat), e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Private methods.
|
// Internal methods.
|
||||||
|
|
||||||
private ArrayList<Representation> getRepresentations() {
|
private ArrayList<Representation> getRepresentations() {
|
||||||
List<AdaptationSet> manifestAdapationSets = manifest.getPeriod(periodIndex).adaptationSets;
|
List<AdaptationSet> manifestAdapationSets = manifest.getPeriod(periodIndex).adaptationSets;
|
||||||
|
|
@ -319,7 +319,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,
|
DataSource dataSource, Format trackFormat, int trackSelectionReason,
|
||||||
Object trackSelectionData, RangedUri initializationUri, RangedUri indexUri) {
|
Object trackSelectionData, RangedUri initializationUri, RangedUri indexUri) {
|
||||||
RangedUri requestUri;
|
RangedUri requestUri;
|
||||||
|
|
@ -340,7 +345,7 @@ public class DefaultDashChunkSource implements DashChunkSource {
|
||||||
trackSelectionReason, trackSelectionData, representationHolder.extractorWrapper);
|
trackSelectionReason, trackSelectionData, representationHolder.extractorWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Chunk newMediaChunk(RepresentationHolder representationHolder,
|
protected static Chunk newMediaChunk(RepresentationHolder representationHolder,
|
||||||
DataSource dataSource, int trackType, Format trackFormat, int trackSelectionReason,
|
DataSource dataSource, int trackType, Format trackFormat, int trackSelectionReason,
|
||||||
Object trackSelectionData, int firstSegmentNum, int maxSegmentCount) {
|
Object trackSelectionData, int firstSegmentNum, int maxSegmentCount) {
|
||||||
Representation representation = representationHolder.representation;
|
Representation representation = representationHolder.representation;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue