@Override
  protected void doSomeWork(long positionUs, long elapsedRealtimeUs) throws ExoPlaybackException {
    if (outputStreamEnded) {
      return;
    }
    sourceIsReady = source.continueBuffering(trackIndex, positionUs);
    checkForDiscontinuity(positionUs);
    // Try and read a format if we don't have one already.
    if (format == null && !readFormat(positionUs)) {
      // We can't make progress without one.
      return;
    }
    // If we don't have a decoder yet, we need to instantiate one.
    // TODO: Add support for dynamic switching between one type of surface to another.
    if (decoder == null) {
      decoder = new VpxDecoderWrapper(outputRgb);
      decoder.start();
    }
    // Rendering loop.
    try {
      processOutputBuffer(positionUs, elapsedRealtimeUs);
      while (feedInputBuffer(positionUs)) {}
    } catch (VpxDecoderException e) {
      notifyDecoderError(e);
      throw new ExoPlaybackException(e);
    }
  }
@Override
  protected void doSomeWork(long positionUs, long elapsedRealtimeUs) throws ExoPlaybackException {
    if (outputStreamEnded) {
      return;
    }
    sourceIsReady = source.continueBuffering(trackIndex, positionUs);
    checkForDiscontinuity(positionUs);
   
    if (format == null && !readFormat(positionUs)) {
     
      return;
    }
   
   
    if (decoder == null) {
      decoder = new VpxDecoderWrapper(outputRgb);
      decoder.start();
    }
   
    try {
      processOutputBuffer(positionUs, elapsedRealtimeUs);
      while (feedInputBuffer(positionUs)) {}
    } catch (VpxDecoderException e) {
      notifyDecoderError(e);
      throw new ExoPlaybackException(e);
    }
  }
@override protected void dosomework(long positionus, long elapsedrealtimeus) throws exoplaybackexception { if (outputstreamended) { return; } sourceisready = source.continuebuffering(trackindex, positionus); checkfordiscontinuity(positionus); if (format == null && !readformat(positionus)) { return; } if (decoder == null) { decoder = new vpxdecoderwrapper(outputrgb); decoder.start(); } try { processoutputbuffer(positionus, elapsedrealtimeus); while (feedinputbuffer(positionus)) {} } catch (vpxdecoderexception e) { notifydecodererror(e); throw new exoplaybackexception(e); } }