Exemplo n.º 1
0
 @Override
 public void onDownstreamFormatChanged(
     int sourceId, Format format, int trigger, long mediaTimeMs) {
   if (infoListener == null) {
     return;
   }
   if (sourceId == TYPE_VIDEO) {
     videoFormat = format;
     infoListener.onVideoFormatEnabled(format, trigger, mediaTimeMs);
   } else if (sourceId == TYPE_AUDIO) {
     infoListener.onAudioFormatEnabled(format, trigger, mediaTimeMs);
   }
 }
Exemplo n.º 2
0
 @Override
 public void onDecoderInitialized(
     String decoderName, long elapsedRealtimeMs, long initializationDurationMs) {
   if (infoListener != null) {
     infoListener.onDecoderInitialized(decoderName, elapsedRealtimeMs, initializationDurationMs);
   }
 }
Exemplo n.º 3
0
 @Override
 public void onLoadStarted(
     int sourceId,
     long length,
     int type,
     int trigger,
     Format format,
     long mediaStartTimeMs,
     long mediaEndTimeMs) {
   if (infoListener != null) {
     infoListener.onLoadStarted(
         sourceId, length, type, trigger, format, mediaStartTimeMs, mediaEndTimeMs);
   }
 }
Exemplo n.º 4
0
 @Override
 public void onLoadCompleted(
     int sourceId,
     long bytesLoaded,
     int type,
     int trigger,
     Format format,
     long mediaStartTimeMs,
     long mediaEndTimeMs,
     long elapsedRealtimeMs,
     long loadDurationMs) {
   if (infoListener != null) {
     infoListener.onLoadCompleted(
         sourceId,
         bytesLoaded,
         type,
         trigger,
         format,
         mediaStartTimeMs,
         mediaEndTimeMs,
         elapsedRealtimeMs,
         loadDurationMs);
   }
 }
Exemplo n.º 5
0
 @Override
 public void onAvailableRangeChanged(int sourceId, TimeRange availableRange) {
   if (infoListener != null) {
     infoListener.onAvailableRangeChanged(sourceId, availableRange);
   }
 }
Exemplo n.º 6
0
 @Override
 public void onBandwidthSample(int elapsedMs, long bytes, long bitrateEstimate) {
   if (infoListener != null) {
     infoListener.onBandwidthSample(elapsedMs, bytes, bitrateEstimate);
   }
 }
Exemplo n.º 7
0
 @Override
 public void onDroppedFrames(int count, long elapsed) {
   if (infoListener != null) {
     infoListener.onDroppedFrames(count, elapsed);
   }
 }