Java 类com.google.android.exoplayer.util.Clock 实例源码

项目:ExoPlayer-Demo    文件:DashChunkSource.java   
DashChunkSource(ManifestFetcher<MediaPresentationDescription> manifestFetcher,
    MediaPresentationDescription initialManifest, DashTrackSelector trackSelector,
    DataSource dataSource, FormatEvaluator adaptiveFormatEvaluator,
    Clock systemClock, long liveEdgeLatencyUs, long elapsedRealtimeOffsetUs,
    boolean startAtLiveEdge, Handler eventHandler, EventListener eventListener,
    int eventSourceId) {
  this.manifestFetcher = manifestFetcher;
  this.currentManifest = initialManifest;
  this.trackSelector = trackSelector;
  this.dataSource = dataSource;
  this.adaptiveFormatEvaluator = adaptiveFormatEvaluator;
  this.systemClock = systemClock;
  this.liveEdgeLatencyUs = liveEdgeLatencyUs;
  this.elapsedRealtimeOffsetUs = elapsedRealtimeOffsetUs;
  this.startAtLiveEdge = startAtLiveEdge;
  this.eventHandler = eventHandler;
  this.eventListener = eventListener;
  this.eventSourceId = eventSourceId;
  this.evaluation = new Evaluation();
  this.availableRangeValues = new long[2];
  periodHolders = new SparseArray<>();
  tracks = new ArrayList<>();
  live = initialManifest.dynamic;
}
项目:miku    文件:DefaultBandwidthMeter.java   
public DefaultBandwidthMeter(Handler eventHandler, EventListener eventListener, Clock clock,
    int maxWeight) {
  this.eventHandler = eventHandler;
  this.eventListener = eventListener;
  this.clock = clock;
  this.slidingPercentile = new SlidingPercentile(maxWeight);
  bitrateEstimate = NO_ESTIMATE;
}
项目:ExoPlayer-Demo    文件:DefaultBandwidthMeter.java   
public DefaultBandwidthMeter(Handler eventHandler, EventListener eventListener, Clock clock,
    int maxWeight) {
  this.eventHandler = eventHandler;
  this.eventListener = eventListener;
  this.clock = clock;
  this.slidingPercentile = new SlidingPercentile(maxWeight);
  bitrateEstimate = NO_ESTIMATE;
}
项目:ExoPlayer-Demo    文件:TimeRange.java   
/**
 * @param minStartTimeUs A lower bound on the beginning of the range.
 * @param maxEndTimeUs An upper bound on the end of the range.
 * @param elapsedRealtimeAtStartUs The value of {@link SystemClock#elapsedRealtime()},
 *     multiplied by 1000, corresponding to a media time of zero.
 * @param bufferDepthUs The buffer depth of the media, or -1.
 * @param systemClock A system clock.
 */
public DynamicTimeRange(long minStartTimeUs, long maxEndTimeUs, long elapsedRealtimeAtStartUs,
    long bufferDepthUs, Clock systemClock) {
  this.minStartTimeUs = minStartTimeUs;
  this.maxEndTimeUs = maxEndTimeUs;
  this.elapsedRealtimeAtStartUs = elapsedRealtimeAtStartUs;
  this.bufferDepthUs = bufferDepthUs;
  this.systemClock = systemClock;
}
项目:exoplayer-textureview    文件:LimitedBandwidthMeter.java   
public LimitedBandwidthMeter(Handler eventHandler, EventListener eventListener, Clock clock,
        int maxWeight) {
    this.eventHandler = eventHandler;
    this.eventListener = eventListener;
    this.clock = clock;
    this.slidingPercentile = new SlidingPercentile(maxWeight);
    bitrateEstimate = NO_ESTIMATE;
}
项目:android-exoplayer    文件:DefaultBandwidthMeter.java   
public DefaultBandwidthMeter(Handler eventHandler, EventListener eventListener, Clock clock,
    int maxWeight) {
  this.eventHandler = eventHandler;
  this.eventListener = eventListener;
  this.clock = clock;
  this.slidingPercentile = new SlidingPercentile(maxWeight);
  bitrateEstimate = NO_ESTIMATE;
}
项目:Exoplayer_VLC    文件:DefaultBandwidthMeter.java   
public DefaultBandwidthMeter(Handler eventHandler, EventListener eventListener, Clock clock,
    int maxWeight) {
  this.eventHandler = eventHandler;
  this.eventListener = eventListener;
  this.clock = clock;
  this.slidingPercentile = new SlidingPercentile(maxWeight);
  bitrateEstimate = NO_ESTIMATE;
}
项目:edx-app-android    文件:DefaultBandwidthMeter.java   
public DefaultBandwidthMeter(Handler eventHandler, EventListener eventListener, Clock clock,
    int maxWeight) {
  this.eventHandler = eventHandler;
  this.eventListener = eventListener;
  this.clock = clock;
  this.slidingPercentile = new SlidingPercentile(maxWeight);
  bitrateEstimate = NO_ESTIMATE;
}
项目:ExoPlayer    文件:DefaultBandwidthMeter.java   
public DefaultBandwidthMeter(Handler eventHandler, EventListener eventListener, Clock clock,
    int maxWeight) {
  this.eventHandler = eventHandler;
  this.eventListener = eventListener;
  this.clock = clock;
  this.slidingPercentile = new SlidingPercentile(maxWeight);
  bitrateEstimate = NO_ESTIMATE;
}
项目:miku    文件:DashChunkSource.java   
DashChunkSource(ManifestFetcher<MediaPresentationDescription> manifestFetcher,
    MediaPresentationDescription initialManifest, int adaptationSetIndex,
    int[] representationIndices, DataSource dataSource, FormatEvaluator formatEvaluator,
    Clock systemClock, long liveEdgeLatencyUs, long elapsedRealtimeOffsetUs,
    boolean startAtLiveEdge, Handler eventHandler, EventListener eventListener) {
  this.manifestFetcher = manifestFetcher;
  this.currentManifest = initialManifest;
  this.adaptationSetIndex = adaptationSetIndex;
  this.representationIndices = representationIndices;
  this.dataSource = dataSource;
  this.formatEvaluator = formatEvaluator;
  this.systemClock = systemClock;
  this.liveEdgeLatencyUs = liveEdgeLatencyUs;
  this.elapsedRealtimeOffsetUs = elapsedRealtimeOffsetUs;
  this.startAtLiveEdge = startAtLiveEdge;
  this.eventHandler = eventHandler;
  this.eventListener = eventListener;
  this.evaluation = new Evaluation();
  this.headerBuilder = new StringBuilder();
  this.seekRangeValues = new long[2];

  drmInitData = getDrmInitData(currentManifest, adaptationSetIndex);
  Representation[] representations = getFilteredRepresentations(currentManifest,
      adaptationSetIndex, representationIndices);
  long periodDurationUs = (representations[0].periodDurationMs == TrackRenderer.UNKNOWN_TIME_US)
      ? TrackRenderer.UNKNOWN_TIME_US : representations[0].periodDurationMs * 1000;
  this.trackInfo = new TrackInfo(representations[0].format.mimeType, periodDurationUs);

  this.formats = new Format[representations.length];
  this.representationHolders = new HashMap<>();
  int maxWidth = 0;
  int maxHeight = 0;
  for (int i = 0; i < representations.length; i++) {
    formats[i] = representations[i].format;
    maxWidth = Math.max(formats[i].width, maxWidth);
    maxHeight = Math.max(formats[i].height, maxHeight);
    Extractor extractor = mimeTypeIsWebm(formats[i].mimeType) ? new WebmExtractor()
        : new FragmentedMp4Extractor();
    representationHolders.put(formats[i].id,
        new RepresentationHolder(representations[i], new ChunkExtractorWrapper(extractor)));
  }
  this.maxWidth = maxWidth;
  this.maxHeight = maxHeight;
  Arrays.sort(formats, new DecreasingBandwidthComparator());
}
项目:miku    文件:DefaultBandwidthMeter.java   
public DefaultBandwidthMeter(Handler eventHandler, EventListener eventListener, Clock clock) {
  this(eventHandler, eventListener, clock, DEFAULT_MAX_WEIGHT);
}
项目:ExoPlayer-Demo    文件:DefaultBandwidthMeter.java   
public DefaultBandwidthMeter(Handler eventHandler, EventListener eventListener, Clock clock) {
  this(eventHandler, eventListener, clock, DEFAULT_MAX_WEIGHT);
}
项目:android-exoplayer    文件:DefaultBandwidthMeter.java   
public DefaultBandwidthMeter(Handler eventHandler, EventListener eventListener, Clock clock) {
  this(eventHandler, eventListener, clock, DEFAULT_MAX_WEIGHT);
}
项目:Exoplayer_VLC    文件:DefaultBandwidthMeter.java   
public DefaultBandwidthMeter(Handler eventHandler, EventListener eventListener, Clock clock) {
  this(eventHandler, eventListener, clock, DEFAULT_MAX_WEIGHT);
}
项目:edx-app-android    文件:DefaultBandwidthMeter.java   
public DefaultBandwidthMeter(Handler eventHandler, EventListener eventListener, Clock clock) {
  this(eventHandler, eventListener, clock, DEFAULT_MAX_WEIGHT);
}
项目:ExoPlayer    文件:DashChunkSource.java   
DashChunkSource(ManifestFetcher<MediaPresentationDescription> manifestFetcher,
    MediaPresentationDescription initialManifest, int adaptationSetIndex,
    int[] representationIndices, DataSource dataSource, FormatEvaluator formatEvaluator,
    Clock systemClock, long liveEdgeLatencyUs, long elapsedRealtimeOffsetUs,
    boolean startAtLiveEdge, Handler eventHandler, EventListener eventListener) {
  this.manifestFetcher = manifestFetcher;
  this.currentManifest = initialManifest;
  this.adaptationSetIndex = adaptationSetIndex;
  this.representationIndices = representationIndices;
  this.dataSource = dataSource;
  this.formatEvaluator = formatEvaluator;
  this.systemClock = systemClock;
  this.liveEdgeLatencyUs = liveEdgeLatencyUs;
  this.elapsedRealtimeOffsetUs = elapsedRealtimeOffsetUs;
  this.startAtLiveEdge = startAtLiveEdge;
  this.eventHandler = eventHandler;
  this.eventListener = eventListener;
  this.evaluation = new Evaluation();
  this.headerBuilder = new StringBuilder();
  this.seekRangeValues = new long[2];

  drmInitData = getDrmInitData(currentManifest, adaptationSetIndex);
  Representation[] representations = getFilteredRepresentations(currentManifest,
      adaptationSetIndex, representationIndices);
  long periodDurationUs = (representations[0].periodDurationMs == TrackRenderer.UNKNOWN_TIME_US)
      ? TrackRenderer.UNKNOWN_TIME_US : representations[0].periodDurationMs * 1000;
  this.trackInfo = new TrackInfo(representations[0].format.mimeType, periodDurationUs);

  this.formats = new Format[representations.length];
  this.representationHolders = new HashMap<>();
  int maxWidth = 0;
  int maxHeight = 0;
  for (int i = 0; i < representations.length; i++) {
    formats[i] = representations[i].format;
    maxWidth = Math.max(formats[i].width, maxWidth);
    maxHeight = Math.max(formats[i].height, maxHeight);
    Extractor extractor = mimeTypeIsWebm(formats[i].mimeType) ? new WebmExtractor()
        : new FragmentedMp4Extractor();
    representationHolders.put(formats[i].id,
        new RepresentationHolder(representations[i], new ChunkExtractorWrapper(extractor)));
  }
  this.maxWidth = maxWidth;
  this.maxHeight = maxHeight;
  Arrays.sort(formats, new DecreasingBandwidthComparator());
}
项目:ExoPlayer    文件:DefaultBandwidthMeter.java   
public DefaultBandwidthMeter(Handler eventHandler, EventListener eventListener, Clock clock) {
  this(eventHandler, eventListener, clock, DEFAULT_MAX_WEIGHT);
}