Java Code Examples for com.google.android.exoplayer.TrackRenderer#END_OF_TRACK_US
The following examples show how to use
com.google.android.exoplayer.TrackRenderer#END_OF_TRACK_US .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ChunkSampleSource.java From Exoplayer_VLC with Apache License 2.0 | 6 votes |
@Override public long getBufferedPositionUs() { Assertions.checkState(state == STATE_ENABLED); if (isPendingReset()) { return pendingResetPositionUs; } MediaChunk mediaChunk = mediaChunks.getLast(); Chunk currentLoadable = currentLoadableHolder.chunk; if (currentLoadable != null && mediaChunk == currentLoadable) { // Linearly interpolate partially-fetched chunk times. long chunkLength = mediaChunk.getLength(); if (chunkLength != C.LENGTH_UNBOUNDED && chunkLength != 0) { return mediaChunk.startTimeUs + ((mediaChunk.endTimeUs - mediaChunk.startTimeUs) * mediaChunk.bytesLoaded()) / chunkLength; } else { return mediaChunk.startTimeUs; } } else if (mediaChunk.isLastChunk()) { return TrackRenderer.END_OF_TRACK_US; } else { return mediaChunk.endTimeUs; } }
Example 2
Source File: HlsSampleSource.java From Exoplayer_VLC with Apache License 2.0 | 5 votes |
@Override public long getBufferedPositionUs() { Assertions.checkState(prepared); Assertions.checkState(enabledTrackCount > 0); if (isPendingReset()) { return pendingResetPositionUs; } else if (loadingFinished) { return TrackRenderer.END_OF_TRACK_US; } else { long largestSampleTimestamp = extractors.getLast().getLargestSampleTimestamp(); return largestSampleTimestamp == Long.MIN_VALUE ? downstreamPositionUs : largestSampleTimestamp; } }
Example 3
Source File: FrameworkSampleExtractor.java From Exoplayer_VLC with Apache License 2.0 | 5 votes |
@Override public long getBufferedPositionUs() { long bufferedDurationUs = mediaExtractor.getCachedDuration(); System.out.println(">>>>>>>>>> getBufferedPositionUs " + mediaExtractor.getSampleTime()); if (bufferedDurationUs == -1) { return TrackRenderer.UNKNOWN_TIME_US; } else { long sampleTime = mediaExtractor.getSampleTime(); return sampleTime == -1 ? TrackRenderer.END_OF_TRACK_US : sampleTime + bufferedDurationUs; } }
Example 4
Source File: DebugTrackRenderer.java From Exoplayer_VLC with Apache License 2.0 | 4 votes |
@Override protected long getBufferedPositionUs() { return TrackRenderer.END_OF_TRACK_US; }
Example 5
Source File: Eia608TrackRenderer.java From Exoplayer_VLC with Apache License 2.0 | 4 votes |
@Override protected long getBufferedPositionUs() { return TrackRenderer.END_OF_TRACK_US; }
Example 6
Source File: MetadataTrackRenderer.java From Exoplayer_VLC with Apache License 2.0 | 4 votes |
@Override protected long getBufferedPositionUs() { return TrackRenderer.END_OF_TRACK_US; }
Example 7
Source File: DebugTrackRenderer.java From Mobilyzer with Apache License 2.0 | 4 votes |
@Override protected long getBufferedPositionUs() { return TrackRenderer.END_OF_TRACK_US; }
Example 8
Source File: DebugTrackRenderer.java From google-media-framework-android with Apache License 2.0 | 4 votes |
@Override protected long getBufferedPositionUs() { return TrackRenderer.END_OF_TRACK_US; }