com.google.android.exoplayer2.source.MediaSourceEventListener.MediaLoadData Java Examples

The following examples show how to use com.google.android.exoplayer2.source.MediaSourceEventListener.MediaLoadData. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EventLogger.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onLoadError(
    EventTime eventTime,
    LoadEventInfo loadEventInfo,
    MediaLoadData mediaLoadData,
    IOException error,
    boolean wasCanceled) {
  printInternalError(eventTime, "loadError", error);
}
 
Example #2
Source File: EventLogger.java    From Telegram with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onLoadError(
    EventTime eventTime,
    LoadEventInfo loadEventInfo,
    MediaLoadData mediaLoadData,
    IOException error,
    boolean wasCanceled) {
  printInternalError(eventTime, "loadError", error);
}
 
Example #3
Source File: PlaybackStatsListener.java    From MediaSDK with Apache License 2.0 5 votes vote down vote up
@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);
    }
  }
}
 
Example #4
Source File: PlaybackStatsListener.java    From MediaSDK with Apache License 2.0 5 votes vote down vote up
@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);
    }
  }
}
 
Example #5
Source File: PlaybackStatsListener.java    From MediaSDK with Apache License 2.0 5 votes vote down vote up
@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);
    }
  }
}
 
Example #6
Source File: PlaybackStatsListener.java    From MediaSDK with Apache License 2.0 5 votes vote down vote up
/**
 * 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);
  }
}
 
Example #7
Source File: EventLogger.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onLoadError(
    EventTime eventTime,
    LoadEventInfo loadEventInfo,
    MediaLoadData mediaLoadData,
    IOException error,
    boolean wasCanceled) {
  printInternalError(eventTime, "loadError", error);
}
 
Example #8
Source File: EventLogger.java    From MediaSDK with Apache License 2.0 5 votes vote down vote up
@Override
public void onLoadError(
    EventTime eventTime,
    LoadEventInfo loadEventInfo,
    MediaLoadData mediaLoadData,
    IOException error,
    boolean wasCanceled) {
  printInternalError(eventTime, "loadError", error);
}
 
Example #9
Source File: EventLogger.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onLoadError(
    EventTime eventTime,
    LoadEventInfo loadEventInfo,
    MediaLoadData mediaLoadData,
    IOException error,
    boolean wasCanceled) {
  printInternalError(eventTime, "loadError", error);
}
 
Example #10
Source File: EventLogger.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void onUpstreamDiscarded(EventTime eventTime, MediaLoadData mediaLoadData) {
  logd(eventTime, "upstreamDiscarded", Format.toLogString(mediaLoadData.trackFormat));
}
 
Example #11
Source File: EventLogger.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void onLoadStarted(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
Example #12
Source File: EventLogger.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void onLoadCompleted(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
Example #13
Source File: EventLogger.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void onLoadCanceled(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
Example #14
Source File: EventLogger.java    From Telegram with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void onLoadCanceled(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
Example #15
Source File: EventLogger.java    From MediaSDK with Apache License 2.0 4 votes vote down vote up
@Override
public void onUpstreamDiscarded(EventTime eventTime, MediaLoadData mediaLoadData) {
  logd(eventTime, "upstreamDiscarded", Format.toLogString(mediaLoadData.trackFormat));
}
 
Example #16
Source File: EventLogger.java    From MediaSDK with Apache License 2.0 4 votes vote down vote up
@Override
public void onLoadCompleted(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
Example #17
Source File: EventLogger.java    From MediaSDK with Apache License 2.0 4 votes vote down vote up
@Override
public void onLoadCanceled(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
Example #18
Source File: EventLogger.java    From MediaSDK with Apache License 2.0 4 votes vote down vote up
@Override
public void onLoadStarted(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
Example #19
Source File: EventLogger.java    From Telegram with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void onUpstreamDiscarded(EventTime eventTime, MediaLoadData mediaLoadData) {
  logd(eventTime, "upstreamDiscarded", Format.toLogString(mediaLoadData.trackFormat));
}
 
Example #20
Source File: EventLogger.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void onDownstreamFormatChanged(EventTime eventTime, MediaLoadData mediaLoadData) {
  logd(eventTime, "downstreamFormatChanged", Format.toLogString(mediaLoadData.trackFormat));
}
 
Example #21
Source File: EventLogger.java    From Telegram-FOSS with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void onDownstreamFormatChanged(EventTime eventTime, MediaLoadData mediaLoadData) {
  logd(eventTime, "downstreamFormatChanged", Format.toLogString(mediaLoadData.trackFormat));
}
 
Example #22
Source File: EventLogger.java    From Telegram-FOSS with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void onUpstreamDiscarded(EventTime eventTime, MediaLoadData mediaLoadData) {
  logd(eventTime, "upstreamDiscarded", Format.toLogString(mediaLoadData.trackFormat));
}
 
Example #23
Source File: EventLogger.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void onLoadStarted(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
Example #24
Source File: EventLogger.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void onLoadCanceled(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
Example #25
Source File: EventLogger.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void onLoadCompleted(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
Example #26
Source File: EventLogger.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void onUpstreamDiscarded(EventTime eventTime, MediaLoadData mediaLoadData) {
  logd(eventTime, "upstreamDiscarded", Format.toLogString(mediaLoadData.trackFormat));
}
 
Example #27
Source File: EventLogger.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void onDownstreamFormatChanged(EventTime eventTime, MediaLoadData mediaLoadData) {
  logd(eventTime, "downstreamFormatChanged", Format.toLogString(mediaLoadData.trackFormat));
}
 
Example #28
Source File: EventLogger.java    From Telegram-FOSS with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void onLoadCompleted(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
Example #29
Source File: EventLogger.java    From Telegram-FOSS with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void onLoadCanceled(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}
 
Example #30
Source File: EventLogger.java    From Telegram-FOSS with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void onLoadStarted(
    EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) {
  // Do nothing.
}