com.google.android.exoplayer2.extractor.SeekMap.SeekPoints Java Examples

The following examples show how to use com.google.android.exoplayer2.extractor.SeekMap.SeekPoints. 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: ProgressiveMediaPeriod.java    From MediaSDK with Apache License 2.0 5 votes vote down vote up
@Override
public long getAdjustedSeekPositionUs(long positionUs, SeekParameters seekParameters) {
  SeekMap seekMap = getPreparedState().seekMap;
  if (!seekMap.isSeekable()) {
    // Treat all seeks into non-seekable media as being to t=0.
    return 0;
  }
  SeekPoints seekPoints = seekMap.getSeekPoints(positionUs);
  return Util.resolveSeekPositionUs(
      positionUs, seekParameters, seekPoints.first.timeUs, seekPoints.second.timeUs);
}
 
Example #2
Source File: ExtractorMediaPeriod.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
@Override
public long getAdjustedSeekPositionUs(long positionUs, SeekParameters seekParameters) {
  if (!seekMap.isSeekable()) {
    // Treat all seeks into non-seekable media as being to t=0.
    return 0;
  }
  SeekPoints seekPoints = seekMap.getSeekPoints(positionUs);
  return Util.resolveSeekPositionUs(
      positionUs, seekParameters, seekPoints.first.timeUs, seekPoints.second.timeUs);
}
 
Example #3
Source File: ExtractorMediaPeriod.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
@Override
public long getAdjustedSeekPositionUs(long positionUs, SeekParameters seekParameters) {
  if (!seekMap.isSeekable()) {
    // Treat all seeks into non-seekable media as being to t=0.
    return 0;
  }
  SeekPoints seekPoints = seekMap.getSeekPoints(positionUs);
  return Util.resolveSeekPositionUs(
      positionUs, seekParameters, seekPoints.first.timeUs, seekPoints.second.timeUs);
}
 
Example #4
Source File: ProgressiveMediaPeriod.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
@Override
public long getAdjustedSeekPositionUs(long positionUs, SeekParameters seekParameters) {
  SeekMap seekMap = getPreparedState().seekMap;
  if (!seekMap.isSeekable()) {
    // Treat all seeks into non-seekable media as being to t=0.
    return 0;
  }
  SeekPoints seekPoints = seekMap.getSeekPoints(positionUs);
  return Util.resolveSeekPositionUs(
      positionUs, seekParameters, seekPoints.first.timeUs, seekPoints.second.timeUs);
}
 
Example #5
Source File: ProgressiveMediaPeriod.java    From Telegram with GNU General Public License v2.0 5 votes vote down vote up
@Override
public long getAdjustedSeekPositionUs(long positionUs, SeekParameters seekParameters) {
  SeekMap seekMap = getPreparedState().seekMap;
  if (!seekMap.isSeekable()) {
    // Treat all seeks into non-seekable media as being to t=0.
    return 0;
  }
  SeekPoints seekPoints = seekMap.getSeekPoints(positionUs);
  return Util.resolveSeekPositionUs(
      positionUs, seekParameters, seekPoints.first.timeUs, seekPoints.second.timeUs);
}