コード例 #1
0
 private void restartFrom(long positionUs) {
   pendingResetPositionUs = positionUs;
   loadingFinished = false;
   if (loader.isLoading()) {
     loader.cancelLoading();
   } else {
     sampleQueue.clear();
     mediaChunks.clear();
     clearCurrentLoadable();
     updateLoadControl();
   }
 }
コード例 #2
0
 @Override
 public void disable(int track) {
   Assertions.checkState(state == STATE_ENABLED);
   Assertions.checkState(--enabledTrackCount == 0);
   state = STATE_PREPARED;
   try {
     chunkSource.disable(mediaChunks);
   } finally {
     loadControl.unregister(this);
     if (loader.isLoading()) {
       loader.cancelLoading();
     } else {
       sampleQueue.clear();
       mediaChunks.clear();
       clearCurrentLoadable();
       loadControl.trimAllocator();
     }
   }
 }