Java源码示例:com.google.android.exoplayer2.source.MediaSourceEventListener.MediaLoadData

示例1
@Override
public void onLoadStarted(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  sessionManager.updateSessions(eventTime);
  for (String session : playbackStatsTrackers.keySet()) {
    if (sessionManager.belongsToSession(eventTime, session)) {
      playbackStatsTrackers.get(session).onLoadStarted(eventTime);
    }
  }
}
 
示例2
@Override
public void onDownstreamFormatChanged(EventTime eventTime, MediaLoadData mediaLoadData) {
  sessionManager.updateSessions(eventTime);
  for (String session : playbackStatsTrackers.keySet()) {
    if (sessionManager.belongsToSession(eventTime, session)) {
      playbackStatsTrackers.get(session).onDownstreamFormatChanged(eventTime, mediaLoadData);
    }
  }
}
 
示例3
@Override
public void onLoadError(
    EventTime eventTime,
    LoadEventInfo loadEventInfo,
    MediaLoadData mediaLoadData,
    IOException error,
    boolean wasCanceled) {
  sessionManager.updateSessions(eventTime);
  for (String session : playbackStatsTrackers.keySet()) {
    if (sessionManager.belongsToSession(eventTime, session)) {
      playbackStatsTrackers.get(session).onNonFatalError(eventTime, error);
    }
  }
}
 
示例4
/**
 * Notifies the tracker that a format being read by the renderers for the current playback
 * changed.
 *
 * @param eventTime The {@link EventTime}.
 * @param mediaLoadData The {@link MediaLoadData} describing the format change.
 */
public void onDownstreamFormatChanged(EventTime eventTime, MediaLoadData mediaLoadData) {
  if (mediaLoadData.trackType == C.TRACK_TYPE_VIDEO
      || mediaLoadData.trackType == C.TRACK_TYPE_DEFAULT) {
    maybeUpdateVideoFormat(eventTime, mediaLoadData.trackFormat);
  } else if (mediaLoadData.trackType == C.TRACK_TYPE_AUDIO) {
    maybeUpdateAudioFormat(eventTime, mediaLoadData.trackFormat);
  }
}
 
示例5
@Override
public void onLoadError(
    EventTime eventTime,
    LoadEventInfo loadEventInfo,
    MediaLoadData mediaLoadData,
    IOException error,
    boolean wasCanceled) {
  printInternalError(eventTime, "loadError", error);
}
 
示例6
@Override
public void onLoadError(
    EventTime eventTime,
    LoadEventInfo loadEventInfo,
    MediaLoadData mediaLoadData,
    IOException error,
    boolean wasCanceled) {
  printInternalError(eventTime, "loadError", error);
}
 
示例7
@Override
public void onLoadError(
    EventTime eventTime,
    LoadEventInfo loadEventInfo,
    MediaLoadData mediaLoadData,
    IOException error,
    boolean wasCanceled) {
  printInternalError(eventTime, "loadError", error);
}
 
示例8
@Override
public void onLoadError(
    EventTime eventTime,
    LoadEventInfo loadEventInfo,
    MediaLoadData mediaLoadData,
    IOException error,
    boolean wasCanceled) {
  printInternalError(eventTime, "loadError", error);
}
 
示例9
@Override
public void onLoadError(
    EventTime eventTime,
    LoadEventInfo loadEventInfo,
    MediaLoadData mediaLoadData,
    IOException error,
    boolean wasCanceled) {
  printInternalError(eventTime, "loadError", error);
}
 
示例10
@Override
public void onLoadStarted(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
示例11
@Override
public void onLoadCanceled(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
示例12
@Override
public void onLoadCompleted(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
示例13
@Override
public void onUpstreamDiscarded(EventTime eventTime, MediaLoadData mediaLoadData) {
  logd(eventTime, "upstreamDiscarded", Format.toLogString(mediaLoadData.trackFormat));
}
 
示例14
@Override
public void onDownstreamFormatChanged(EventTime eventTime, MediaLoadData mediaLoadData) {
  logd(eventTime, "downstreamFormat", Format.toLogString(mediaLoadData.trackFormat));
}
 
示例15
@Override
public void onLoadStarted(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
示例16
@Override
public void onLoadCanceled(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
示例17
@Override
public void onLoadCompleted(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
示例18
@Override
public void onUpstreamDiscarded(EventTime eventTime, MediaLoadData mediaLoadData) {
  logd(eventTime, "upstreamDiscarded", Format.toLogString(mediaLoadData.trackFormat));
}
 
示例19
@Override
public void onDownstreamFormatChanged(EventTime eventTime, MediaLoadData mediaLoadData) {
  logd(eventTime, "downstreamFormatChanged", Format.toLogString(mediaLoadData.trackFormat));
}
 
示例20
@Override
public void onLoadStarted(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
示例21
@Override
public void onLoadCanceled(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
示例22
@Override
public void onLoadCompleted(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
示例23
@Override
public void onUpstreamDiscarded(EventTime eventTime, MediaLoadData mediaLoadData) {
  logd(eventTime, "upstreamDiscarded", Format.toLogString(mediaLoadData.trackFormat));
}
 
示例24
@Override
public void onDownstreamFormatChanged(EventTime eventTime, MediaLoadData mediaLoadData) {
  logd(eventTime, "downstreamFormatChanged", Format.toLogString(mediaLoadData.trackFormat));
}
 
示例25
@Override
public void onLoadStarted(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
示例26
@Override
public void onLoadCanceled(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
示例27
@Override
public void onLoadCompleted(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
示例28
@Override
public void onUpstreamDiscarded(EventTime eventTime, MediaLoadData mediaLoadData) {
  logd(eventTime, "upstreamDiscarded", Format.toLogString(mediaLoadData.trackFormat));
}
 
示例29
@Override
public void onDownstreamFormatChanged(EventTime eventTime, MediaLoadData mediaLoadData) {
  logd(eventTime, "downstreamFormatChanged", Format.toLogString(mediaLoadData.trackFormat));
}
 
示例30
@Override
public void onLoadStarted(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}