public interface BaseChunkSampleSourceEventListener
SampleSource
events.Modifier and Type | Method and Description |
---|---|
void |
onDownstreamFormatChanged(int sourceId,
Format format,
int trigger,
long mediaTimeMs)
Invoked when the downstream format changes (i.e.
|
void |
onLoadCanceled(int sourceId,
long bytesLoaded)
Invoked when the current upstream load operation is canceled.
|
void |
onLoadCompleted(int sourceId,
long bytesLoaded,
int type,
int trigger,
Format format,
long mediaStartTimeMs,
long mediaEndTimeMs,
long elapsedRealtimeMs,
long loadDurationMs)
Invoked when the current load operation completes.
|
void |
onLoadError(int sourceId,
IOException e)
Invoked when an error occurs loading media data.
|
void |
onLoadStarted(int sourceId,
long length,
int type,
int trigger,
Format format,
long mediaStartTimeMs,
long mediaEndTimeMs)
Invoked when an upstream load is started.
|
void |
onUpstreamDiscarded(int sourceId,
long mediaStartTimeMs,
long mediaEndTimeMs)
Invoked when data is removed from the back of the buffer, typically so that it can be
re-buffered using a different representation.
|
void onLoadStarted(int sourceId, long length, int type, int trigger, Format format, long mediaStartTimeMs, long mediaEndTimeMs)
sourceId
- The id of the reporting SampleSource
.length
- The length of the data being loaded in bytes, or C.LENGTH_UNBOUNDED
if
the length of the data is not known in advance.type
- The type of the data being loaded.trigger
- The reason for the data being loaded.format
- The particular format to which this data corresponds, or null if the data being
loaded does not correspond to a format.mediaStartTimeMs
- The media time of the start of the data being loaded, or -1 if this
load is for initialization data.mediaEndTimeMs
- The media time of the end of the data being loaded, or -1 if this
load is for initialization data.void onLoadCompleted(int sourceId, long bytesLoaded, int type, int trigger, Format format, long mediaStartTimeMs, long mediaEndTimeMs, long elapsedRealtimeMs, long loadDurationMs)
sourceId
- The id of the reporting SampleSource
.bytesLoaded
- The number of bytes that were loaded.type
- The type of the loaded data.trigger
- The reason for the data being loaded.format
- The particular format to which this data corresponds, or null if the loaded data
does not correspond to a format.mediaStartTimeMs
- The media time of the start of the loaded data, or -1 if this load was
for initialization data.mediaEndTimeMs
- The media time of the end of the loaded data, or -1 if this load was for
initialization data.elapsedRealtimeMs
- elapsedRealtime
timestamp of when the load finished.loadDurationMs
- Amount of time taken to load the data.void onLoadCanceled(int sourceId, long bytesLoaded)
sourceId
- The id of the reporting SampleSource
.bytesLoaded
- The number of bytes that were loaded prior to the cancellation.void onLoadError(int sourceId, IOException e)
sourceId
- The id of the reporting SampleSource
.e
- The cause of the failure.void onUpstreamDiscarded(int sourceId, long mediaStartTimeMs, long mediaEndTimeMs)
sourceId
- The id of the reporting SampleSource
.mediaStartTimeMs
- The media time of the start of the discarded data.mediaEndTimeMs
- The media time of the end of the discarded data.void onDownstreamFormatChanged(int sourceId, Format format, int trigger, long mediaTimeMs)
SampleSource.SampleSourceReader.readData(int, long, com.google.android.exoplayer.MediaFormatHolder, com.google.android.exoplayer.SampleHolder)
changes).sourceId
- The id of the reporting SampleSource
.format
- The format.trigger
- The trigger specified in the corresponding upstream load, as specified by the
ChunkSource
.mediaTimeMs
- The media time at which the change occurred.