Class MediaChunk

  • All Implemented Interfaces:
    Loader.Loadable
    Direct Known Subclasses:
    BaseMediaChunk, FakeMediaChunk

    @Deprecated
    public abstract class MediaChunk
    extends Chunk
    Deprecated.
    com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
    An abstract base class for Chunks that contain media samples.
    • Field Detail

      • chunkIndex

        public final long chunkIndex
        Deprecated.
        The chunk index, or C.INDEX_UNSET if it is not known.
    • Constructor Detail

      • MediaChunk

        public MediaChunk​(DataSource dataSource,
                          DataSpec dataSpec,
                          Format trackFormat,
                          @com.google.android.exoplayer2.C.SelectionReason int trackSelectionReason,
                          @Nullable
                          Object trackSelectionData,
                          long startTimeUs,
                          long endTimeUs,
                          long chunkIndex)
        Deprecated.
        Parameters:
        dataSource - The source from which the data should be loaded.
        dataSpec - Defines the data to be loaded.
        trackFormat - See Chunk.trackFormat.
        trackSelectionReason - See Chunk.trackSelectionReason.
        trackSelectionData - See Chunk.trackSelectionData.
        startTimeUs - The start time of the media contained by the chunk, in microseconds.
        endTimeUs - The end time of the media contained by the chunk, in microseconds.
        chunkIndex - The index of the chunk, or C.INDEX_UNSET if it is not known.
    • Method Detail

      • getNextChunkIndex

        public long getNextChunkIndex()
        Deprecated.
        Returns the next chunk index or C.INDEX_UNSET if it is not known.
      • isLoadCompleted

        public abstract boolean isLoadCompleted()
        Deprecated.
        Returns whether the chunk has been fully loaded.