Home
last modified time | relevance | path

Searched refs:positionUs (Results 1 – 25 of 59) sorted by relevance

123

/external/exoplayer/tree/library/core/src/main/java/com/google/android/exoplayer2/source/
DMergingMediaPeriod.java79 public void prepare(Callback callback, long positionUs) { in prepare() argument
83 period.prepare(this, positionUs); in prepare()
105 long positionUs) { in selectTracks() argument
135 childStreams, streamResetFlags, positionUs); in selectTracks()
137 positionUs = selectPositionUs; in selectTracks()
138 } else if (selectPositionUs != positionUs) { in selectTracks()
164 return positionUs; in selectTracks()
168 public void discardBuffer(long positionUs, boolean toKeyframe) { in discardBuffer() argument
170 period.discardBuffer(positionUs, toKeyframe); in discardBuffer()
175 public void reevaluateBuffer(long positionUs) { in reevaluateBuffer() argument
[all …]
DSilenceMediaSource.java142 public void prepare(Callback callback, long positionUs) { in prepare() argument
160 long positionUs) { in selectTracks() argument
161 positionUs = constrainSeekPosition(positionUs); in selectTracks()
169 stream.seekTo(positionUs); in selectTracks()
175 return positionUs; in selectTracks()
179 public void discardBuffer(long positionUs, boolean toKeyframe) {} in discardBuffer() argument
187 public long seekToUs(long positionUs) { in seekToUs() argument
188 positionUs = constrainSeekPosition(positionUs); in seekToUs()
190 ((SilenceSampleStream) sampleStreams.get(i)).seekTo(positionUs); in seekToUs()
192 return positionUs; in seekToUs()
[all …]
DClippingMediaPeriod.java84 public void prepare(MediaPeriod.Callback callback, long positionUs) { in prepare() argument
86 mediaPeriod.prepare(this, positionUs); in prepare()
105 long positionUs) { in selectTracks() argument
114 selections, mayRetainStreamFlags, childStreams, streamResetFlags, positionUs); in selectTracks()
117 && positionUs == startUs in selectTracks()
122 enablePositionUs == positionUs in selectTracks()
137 public void discardBuffer(long positionUs, boolean toKeyframe) { in discardBuffer() argument
138 mediaPeriod.discardBuffer(positionUs, toKeyframe); in discardBuffer()
142 public void reevaluateBuffer(long positionUs) { in reevaluateBuffer() argument
143 mediaPeriod.reevaluateBuffer(positionUs); in reevaluateBuffer()
[all …]
DMaskingMediaPeriod.java170 long positionUs) { in selectTracks() argument
171 if (preparePositionOverrideUs != C.TIME_UNSET && positionUs == preparePositionUs) { in selectTracks()
172 positionUs = preparePositionOverrideUs; in selectTracks()
176 .selectTracks(selections, mayRetainStreamFlags, streams, streamResetFlags, positionUs); in selectTracks()
180 public void discardBuffer(long positionUs, boolean toKeyframe) { in discardBuffer() argument
181 castNonNull(mediaPeriod).discardBuffer(positionUs, toKeyframe); in discardBuffer()
195 public long seekToUs(long positionUs) { in seekToUs() argument
196 return castNonNull(mediaPeriod).seekToUs(positionUs); in seekToUs()
200 public long getAdjustedSeekPositionUs(long positionUs, SeekParameters seekParameters) { in getAdjustedSeekPositionUs() argument
201 return castNonNull(mediaPeriod).getAdjustedSeekPositionUs(positionUs, seekParameters); in getAdjustedSeekPositionUs()
[all …]
DMediaPeriod.java68 void prepare(Callback callback, long positionUs); in prepare() argument
140 long positionUs); in selectTracks() argument
151 void discardBuffer(long positionUs, boolean toKeyframe); in discardBuffer() argument
178 long seekToUs(long positionUs); in seekToUs() argument
191 long getAdjustedSeekPositionUs(long positionUs, SeekParameters seekParameters); in getAdjustedSeekPositionUs() argument
232 boolean continueLoading(long positionUs); in continueLoading() argument
250 void reevaluateBuffer(long positionUs); in reevaluateBuffer() argument
DProgressiveMediaPeriod.java225 public void prepare(Callback callback, long positionUs) { in prepare() argument
251 long positionUs) { in selectTracks() argument
268 boolean seekRequired = seenFirstTrackSelection ? oldEnabledTrackCount == 0 : positionUs != 0; in selectTracks()
289 !sampleQueue.seekTo(positionUs, /* allowTimeBeyondBuffer= */ true) in selectTracks()
309 positionUs = seekToUs(positionUs); in selectTracks()
318 return positionUs; in selectTracks()
322 public void discardBuffer(long positionUs, boolean toKeyframe) { in discardBuffer() argument
330 sampleQueues[i].discardTo(positionUs, toKeyframe, trackEnabledStates[i]); in discardBuffer()
335 public void reevaluateBuffer(long positionUs) { in reevaluateBuffer() argument
407 public long seekToUs(long positionUs) { in seekToUs() argument
[all …]
DCompositeSequenceableLoader.java56 public final void reevaluateBuffer(long positionUs) { in reevaluateBuffer() argument
58 loader.reevaluateBuffer(positionUs); in reevaluateBuffer()
63 public boolean continueLoading(long positionUs) { in continueLoading() argument
76 && loaderNextLoadPositionUs <= positionUs; in continueLoading()
78 madeProgressThisIteration |= loader.continueLoading(positionUs); in continueLoading()
DSingleSampleMediaPeriod.java102 public void prepare(Callback callback, long positionUs) { in prepare() argument
122 long positionUs) { in selectTracks() argument
135 return positionUs; in selectTracks()
139 public void discardBuffer(long positionUs, boolean toKeyframe) { in discardBuffer() argument
144 public void reevaluateBuffer(long positionUs) { in reevaluateBuffer() argument
149 public boolean continueLoading(long positionUs) { in continueLoading() argument
199 public long seekToUs(long positionUs) { in seekToUs() argument
203 return positionUs; in seekToUs()
207 public long getAdjustedSeekPositionUs(long positionUs, SeekParameters seekParameters) { in getAdjustedSeekPositionUs() argument
208 return positionUs; in getAdjustedSeekPositionUs()
[all …]
/external/exoplayer/tree/testutils/src/main/java/com/google/android/exoplayer2/testutil/
DFakeAdaptiveMediaPeriod.java79 public synchronized void prepare(Callback callback, long positionUs) { in prepare() argument
80 super.prepare(callback, positionUs); in prepare()
91 long positionUs) { in selectTracks() argument
93 streamResetFlags, positionUs); in selectTracks()
107 public void discardBuffer(long positionUs, boolean toKeyframe) { in discardBuffer() argument
108 super.discardBuffer(positionUs, toKeyframe); in discardBuffer()
110 sampleStream.discardBuffer(positionUs, toKeyframe); in discardBuffer()
115 public void reevaluateBuffer(long positionUs) { in reevaluateBuffer() argument
116 super.reevaluateBuffer(positionUs); in reevaluateBuffer()
117 sequenceableLoader.reevaluateBuffer(positionUs); in reevaluateBuffer()
[all …]
DFakeMediaPeriod.java123 public synchronized void prepare(Callback callback, long positionUs) { in prepare() argument
158 long positionUs) { in selectTracks() argument
174 streams[i] = createSampleStream(positionUs, selection, eventDispatcher); in selectTracks()
179 return positionUs; in selectTracks()
183 public void discardBuffer(long positionUs, boolean toKeyframe) { in discardBuffer() argument
188 public void reevaluateBuffer(long positionUs) { in reevaluateBuffer() argument
211 public long seekToUs(long positionUs) { in seekToUs() argument
213 long seekPositionUs = positionUs + seekOffsetUs; in seekToUs()
221 public long getAdjustedSeekPositionUs(long positionUs, SeekParameters seekParameters) { in getAdjustedSeekPositionUs() argument
222 return positionUs + seekOffsetUs; in getAdjustedSeekPositionUs()
[all …]
DFakeRenderer.java74 protected void onPositionReset(long positionUs, boolean joining) throws ExoPlaybackException { in onPositionReset() argument
75 playbackPositionUs = positionUs; in onPositionReset()
83 public void render(long positionUs, long elapsedRealtimeUs) throws ExoPlaybackException { in render() argument
87 playbackPositionUs = positionUs; in render()
121 if (!shouldProcessBuffer(buffer.timeUs, positionUs)) { in render()
/external/exoplayer/tree/library/core/src/main/java/com/google/android/exoplayer2/
DPlaybackInfo.java81 public volatile long positionUs; field in PlaybackInfo
138 long positionUs) { in PlaybackInfo() argument
152 this.positionUs = positionUs; in PlaybackInfo()
176 long positionUs, in copyWithNewPosition() argument
195 positionUs); in copyWithNewPosition()
220 positionUs); in copyWithTimeline()
245 positionUs); in copyWithPlaybackState()
270 positionUs); in copyWithPlaybackError()
295 positionUs); in copyWithIsLoading()
320 positionUs); in copyWithLoadingMediaPeriodId()
[all …]
DSeekParameters.java85 public long resolveSeekPositionUs(long positionUs, long firstSyncUs, long secondSyncUs) { in resolveSeekPositionUs() argument
87 return positionUs; in resolveSeekPositionUs()
90 Util.subtractWithOverflowDefault(positionUs, toleranceBeforeUs, Long.MIN_VALUE); in resolveSeekPositionUs()
91 long maxPositionUs = Util.addWithOverflowDefault(positionUs, toleranceAfterUs, Long.MAX_VALUE); in resolveSeekPositionUs()
96 if (Math.abs(firstSyncUs - positionUs) <= Math.abs(secondSyncUs - positionUs)) { in resolveSeekPositionUs()
DBaseRenderer.java84 long positionUs, in enable() argument
94 onPositionReset(positionUs, joining); in enable()
147 public final void resetPosition(long positionUs) throws ExoPlaybackException { in resetPosition() argument
149 readingPositionUs = positionUs; in resetPosition()
150 onPositionReset(positionUs, false); in resetPosition()
241 protected void onPositionReset(long positionUs, boolean joining) throws ExoPlaybackException { in onPositionReset() argument
383 protected int skipSource(long positionUs) { in skipSource() argument
384 return stream.skipData(positionUs - streamOffsetUs); in skipSource()
DNoSampleRenderer.java68 long positionUs, in enable() argument
78 onPositionReset(positionUs, joining); in enable()
127 public final void resetPosition(long positionUs) throws ExoPlaybackException { in resetPosition() argument
129 onPositionReset(positionUs, false); in resetPosition()
223 protected void onPositionReset(long positionUs, boolean joining) throws ExoPlaybackException { in onPositionReset() argument
/external/exoplayer/tree/library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/
DSsMediaPeriod.java108 public void prepare(Callback callback, long positionUs) { in prepare() argument
129 long positionUs) { in selectTracks() argument
144 ChunkSampleStream<SsChunkSource> stream = buildSampleStream(selections[i], positionUs); in selectTracks()
154 return positionUs; in selectTracks()
171 public void discardBuffer(long positionUs, boolean toKeyframe) { in discardBuffer() argument
173 sampleStream.discardBuffer(positionUs, toKeyframe); in discardBuffer()
178 public void reevaluateBuffer(long positionUs) { in reevaluateBuffer() argument
179 compositeSequenceableLoader.reevaluateBuffer(positionUs); in reevaluateBuffer()
183 public boolean continueLoading(long positionUs) { in continueLoading() argument
184 return compositeSequenceableLoader.continueLoading(positionUs); in continueLoading()
[all …]
/external/exoplayer/tree/library/core/src/main/java/com/google/android/exoplayer2/source/chunk/
DChunkSampleStream.java114 long positionUs, in ChunkSampleStream() argument
158 pendingResetPositionUs = positionUs; in ChunkSampleStream()
159 lastSeekPositionUs = positionUs; in ChunkSampleStream()
169 public void discardBuffer(long positionUs, boolean toKeyframe) { in discardBuffer() argument
174 primarySampleQueue.discardTo(positionUs, toKeyframe, true); in discardBuffer()
195 public EmbeddedSampleStream selectEmbeddedTrack(long positionUs, int trackType) { in selectEmbeddedTrack() argument
200 embeddedSampleQueues[i].seekTo(positionUs, /* allowTimeBeyondBuffer= */ true); in selectEmbeddedTrack()
247 public long getAdjustedSeekPositionUs(long positionUs, SeekParameters seekParameters) { in getAdjustedSeekPositionUs() argument
248 return chunkSource.getAdjustedSeekPositionUs(positionUs, seekParameters); in getAdjustedSeekPositionUs()
256 public void seekToUs(long positionUs) { in seekToUs() argument
[all …]
/external/exoplayer/tree/library/core/src/main/java/com/google/android/exoplayer2/util/
DStandaloneMediaClock.java71 public void resetPosition(long positionUs) { in resetPosition() argument
72 baseUs = positionUs; in resetPosition()
80 long positionUs = baseUs; in getPositionUs() local
84 positionUs += C.msToUs(elapsedSinceBaseMs); in getPositionUs()
88 positionUs += elapsedSinceBaseMs * scaledUsPerMs; in getPositionUs()
91 return positionUs; in getPositionUs()
/external/exoplayer/tree/library/hls/src/main/java/com/google/android/exoplayer2/source/hls/
DHlsMediaPeriod.java155 public void prepare(Callback callback, long positionUs) { in prepare() argument
158 buildAndPrepareSampleStreamWrappers(positionUs); in prepare()
263 long positionUs) {
298 childStreams, streamResetFlags, positionUs, forceReset);
339 return positionUs;
343 public void discardBuffer(long positionUs, boolean toKeyframe) {
345 sampleStreamWrapper.discardBuffer(positionUs, toKeyframe);
350 public void reevaluateBuffer(long positionUs) {
351 compositeSequenceableLoader.reevaluateBuffer(positionUs);
355 public boolean continueLoading(long positionUs) {
[all …]
DHlsSampleStreamWrapper.java193 long positionUs, in HlsSampleStreamWrapper() argument
228 lastSeekPositionUs = positionUs; in HlsSampleStreamWrapper()
229 pendingResetPositionUs = positionUs; in HlsSampleStreamWrapper()
323 long positionUs, in selectTracks() argument
343 : positionUs != lastSeekPositionUs); in selectTracks()
373 !sampleQueue.seekTo(positionUs, /* allowTimeBeyondBuffer= */ true) in selectTracks()
403 long bufferedDurationUs = positionUs < 0 ? -positionUs : 0; in selectTracks()
406 chunkSource.createMediaChunkIterators(lastMediaChunk, positionUs); in selectTracks()
408 positionUs, in selectTracks()
430 seekToUs(positionUs, forceReset); in selectTracks()
[all …]
/external/exoplayer/tree/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/
DEventSampleStream.java80 public void seekToUs(long positionUs) { in seekToUs() argument
83 eventTimesUs, positionUs, /* inclusive= */ true, /* stayInBounds= */ false); in seekToUs()
85 pendingSeekPositionUs = isPendingSeek ? positionUs : C.TIME_UNSET; in seekToUs()
128 public int skipData(long positionUs) { in skipData() argument
130 Math.max(currentIndex, Util.binarySearchCeil(eventTimesUs, positionUs, true, false)); in skipData()
DDashMediaPeriod.java192 public void prepare(Callback callback, long positionUs) { in prepare() argument
255 long positionUs) { in selectTracks() argument
260 selections, streams, streamResetFlags, positionUs, streamIndexToTrackGroupIndex); in selectTracks()
281 return positionUs; in selectTracks()
285 public void discardBuffer(long positionUs, boolean toKeyframe) { in discardBuffer() argument
287 sampleStream.discardBuffer(positionUs, toKeyframe); in discardBuffer()
292 public void reevaluateBuffer(long positionUs) { in reevaluateBuffer() argument
293 compositeSequenceableLoader.reevaluateBuffer(positionUs); in reevaluateBuffer()
297 public boolean continueLoading(long positionUs) { in continueLoading() argument
298 return compositeSequenceableLoader.continueLoading(positionUs); in continueLoading()
[all …]
/external/exoplayer/tree/library/core/src/main/java/com/google/android/exoplayer2/text/
DTextRenderer.java153 protected void onPositionReset(long positionUs, boolean joining) { in onPositionReset() argument
160 public void render(long positionUs, long elapsedRealtimeUs) { in render() argument
166 decoder.setPositionUs(positionUs); in render()
184 while (subtitleNextEventTimeUs <= positionUs) { in render()
201 } else if (nextSubtitle.timeUs <= positionUs) { in render()
208 nextSubtitleEventIndex = subtitle.getNextEventTimeIndex(positionUs); in render()
215 updateOutput(subtitle.getCues(positionUs)); in render()
/external/exoplayer/tree/library/core/src/test/java/com/google/android/exoplayer2/
DDefaultMediaClockTest.java230 mediaClockRenderer.positionUs = TEST_POSITION_US; in enableRendererMediaClock_usesRendererClockPosition()
243 mediaClockRenderer.positionUs = TEST_POSITION_US; in resetPositionWhileUsingRendererMediaClock_shouldHaveNoEffect()
256 mediaClockRenderer.positionUs = TEST_POSITION_US; in disableRendererMediaClock_standaloneShouldBeSynced()
322 mediaClockRenderer.positionUs = TEST_POSITION_US; in staleDisableRendererClock_shouldNotThrow()
334 mediaClockRenderer.positionUs = TEST_POSITION_US; in enableSameRendererClockTwice_shouldNotThrow()
344 mediaClockRenderer1.positionUs = TEST_POSITION_US; in enableOtherRendererClock_shouldThrow()
379 public long positionUs; field in DefaultMediaClockTest.MediaClockRenderer
407 this.positionUs = TEST_POSITION_US; in MediaClockRenderer()
415 return positionUs; in getPositionUs()
/external/exoplayer/tree/library/core/src/main/java/com/google/android/exoplayer2/source/ads/
DAdPlaybackState.java326 public int getAdGroupIndexForPositionUs(long positionUs, long periodDurationUs) { in getAdGroupIndexForPositionUs() argument
330 while (index >= 0 && isPositionBeforeAdGroup(positionUs, periodDurationUs, index)) { in getAdGroupIndexForPositionUs()
347 public int getAdGroupIndexAfterPositionUs(long positionUs, long periodDurationUs) { in getAdGroupIndexAfterPositionUs() argument
348 if (positionUs == C.TIME_END_OF_SOURCE in getAdGroupIndexAfterPositionUs()
349 || (periodDurationUs != C.TIME_UNSET && positionUs >= periodDurationUs)) { in getAdGroupIndexAfterPositionUs()
357 && (positionUs >= adGroupTimesUs[index] || !adGroups[index].hasUnplayedAds())) { in getAdGroupIndexAfterPositionUs()
481 long positionUs, long periodDurationUs, int adGroupIndex) { in isPositionBeforeAdGroup() argument
482 if (positionUs == C.TIME_END_OF_SOURCE) { in isPositionBeforeAdGroup()
488 return periodDurationUs == C.TIME_UNSET || positionUs < periodDurationUs; in isPositionBeforeAdGroup()
490 return positionUs < adGroupPositionUs; in isPositionBeforeAdGroup()

123