SingleSampleMediaSource


@UnstableApi
class SingleSampleMediaSource : BaseMediaSource


Summary

Nested types

This class is deprecated. Deprecated in Java

Public functions

MediaPeriod!
createPeriod(
    id: MediaSource.MediaPeriodId!,
    allocator: Allocator!,
    startPositionUs: Long
)

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit
releasePeriod(mediaPeriod: MediaPeriod!)

This function is deprecated. Deprecated in Java

Protected functions

Unit
prepareSourceInternal(mediaTransferListener: TransferListener?)

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Public properties

MediaItem!

This property is deprecated. Deprecated in Java

Inherited functions

From androidx.media3.exoplayer.source.BaseMediaSource
Unit
@UnstableApi
addDrmEventListener(
    handler: Handler!,
    eventListener: DrmSessionEventListener!
)

This function is deprecated. Deprecated in Java

Unit
@UnstableApi
addEventListener(
    handler: Handler!,
    eventListener: MediaSourceEventListener!
)

This function is deprecated. Deprecated in Java

DrmSessionEventListener.EventDispatcher!

This function is deprecated. Deprecated in Java

DrmSessionEventListener.EventDispatcher!
createDrmEventDispatcher(
    windowIndex: Int,
    mediaPeriodId: MediaSource.MediaPeriodId?
)

This function is deprecated. Deprecated in Java

MediaSourceEventListener.EventDispatcher!

This function is deprecated. Deprecated in Java

MediaSourceEventListener.EventDispatcher!
createEventDispatcher(
    mediaPeriodId: MediaSource.MediaPeriodId!,
    mediaTimeOffsetMs: Long
)

This function is deprecated.

Use createEventDispatcher instead.

MediaSourceEventListener.EventDispatcher!
createEventDispatcher(
    windowIndex: Int,
    mediaPeriodId: MediaSource.MediaPeriodId?
)

This function is deprecated. Deprecated in Java

MediaSourceEventListener.EventDispatcher!
createEventDispatcher(
    windowIndex: Int,
    mediaPeriodId: MediaSource.MediaPeriodId?,
    mediaTimeOffsetMs: Long
)

This function is deprecated.

Use createEventDispatcher instead.

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Boolean

This function is deprecated. Deprecated in Java

Unit
@UnstableApi
prepareSource(
    caller: MediaSource.MediaSourceCaller!,
    playerId: PlayerId!,
    bandwidthMeter: BandwidthMeter!
)

This function is deprecated. Deprecated in Java

Boolean

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

Unit

This function is deprecated. Deprecated in Java

From androidx.media3.exoplayer.source.MediaSource
Boolean

This function is deprecated. Deprecated in Java

Timeline?

This function is deprecated. Deprecated in Java

Boolean

This function is deprecated. Deprecated in Java

Unit
@UnstableApi
prepareSource(
    caller: MediaSource.MediaSourceCaller!,
    mediaTransferListener: TransferListener?,
    playerId: PlayerId!
)

This function is deprecated.

Use prepareSource instead.

Unit

This function is deprecated. Deprecated in Java

Inherited properties

From androidx.media3.exoplayer.source.BaseMediaSource
BandwidthMeter?

This property is deprecated. Deprecated in Java

PlayerId?

This property is deprecated. Deprecated in Java

Public functions

createPeriod

fun createPeriod(
    id: MediaSource.MediaPeriodId!,
    allocator: Allocator!,
    startPositionUs: Long
): MediaPeriod!

Returns a new MediaPeriod identified by periodId.

Should not be called directly from application code.

This method must be called on the playback thread and only if the source is enabled.

Parameters
id: MediaSource.MediaPeriodId!

The identifier of the period.

allocator: Allocator!

An Allocator from which to obtain media buffer allocations.

startPositionUs: Long

The expected start position, in microseconds.

Returns
MediaPeriod!

A new MediaPeriod.

maybeThrowSourceInfoRefreshError

fun maybeThrowSourceInfoRefreshError(): Unit

Throws any pending error encountered while loading or refreshing source information.

Should not be called directly from application code.

This method must be called on the playback thread and only after prepareSource.

releasePeriod

fun releasePeriod(mediaPeriod: MediaPeriod!): Unit

Releases the period.

Should not be called directly from application code.

This method must be called on the playback thread.

Parameters
mediaPeriod: MediaPeriod!

The period to release.

Protected functions

prepareSourceInternal

protected fun prepareSourceInternal(mediaTransferListener: TransferListener?): Unit

Starts source preparation and enables the source, see prepareSource. This method is called at most once until the next call to releaseSourceInternal.

This method is called on the playback thread.

Parameters
mediaTransferListener: TransferListener?

The transfer listener which should be informed of any media data transfers. May be null if no listener is available. Note that this listener should usually be only informed of transfers related to the media loads and not of auxiliary loads for manifests and other data.

releaseSourceInternal

protected fun releaseSourceInternal(): Unit

Releases the source, see releaseSource. This method is called exactly once after each call to prepareSourceInternal.

This method is called on the playback thread.

Public properties

mediaItem

val mediaItem: MediaItem!