示例#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);
   }
 }
示例#2
0
 @Override
 public void onDecoderInitialized(
     String decoderName, long elapsedRealtimeMs, long initializationDurationMs) {
   if (infoListener != null) {
     infoListener.onDecoderInitialized(decoderName, elapsedRealtimeMs, initializationDurationMs);
   }
 }
示例#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);
   }
 }
示例#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);
   }
 }
示例#5
0
 @Override
 public void onAvailableRangeChanged(int sourceId, TimeRange availableRange) {
   if (infoListener != null) {
     infoListener.onAvailableRangeChanged(sourceId, availableRange);
   }
 }
示例#6
0
 @Override
 public void onBandwidthSample(int elapsedMs, long bytes, long bitrateEstimate) {
   if (infoListener != null) {
     infoListener.onBandwidthSample(elapsedMs, bytes, bitrateEstimate);
   }
 }
示例#7
0
 @Override
 public void onDroppedFrames(int count, long elapsed) {
   if (infoListener != null) {
     infoListener.onDroppedFrames(count, elapsed);
   }
 }