class Track.Builder


Builder for Track.

Summary

Public constructors

Public functions

Track!

Builds a new Track instance.

Track.Builder!

Sets chapterTrackId.

Track.Builder!

Sets durationUs.

Track.Builder!

Sets editListDurations.

Track.Builder!

Sets editListMediaTimes.

Track.Builder!

Sets format.

Track.Builder!

Sets id.

Track.Builder!

Sets mediaDurationUs.

Track.Builder!

Sets movieTimescale.

Track.Builder!

Sets nalUnitLengthFieldLength.

Track.Builder!

Sets sampleDescriptionEncryptionBoxes.

Track.Builder!

Sets sampleTransformation.

Track.Builder!

Sets whether the track should be exposed to the player.

Track.Builder!

Sets timescale.

Track.Builder!

Sets type.

Public constructors

Builder

Builder()

Public functions

build

fun build(): Track!

Builds a new Track instance.

Throws
java.lang.NullPointerException

if setFormat has not been called.

setChapterTrackId

@CanIgnoreReturnValue
fun setChapterTrackId(chapterTrackId: Int): Track.Builder!

Sets chapterTrackId. The default value is INDEX_UNSET.

Parameters
chapterTrackId: Int

The chapterTrackId.

Returns
Track.Builder!

This builder.

setDurationUs

@CanIgnoreReturnValue
fun setDurationUs(durationUs: Long): Track.Builder!

Sets durationUs. The default value is TIME_UNSET.

Parameters
durationUs: Long

The durationUs.

Returns
Track.Builder!

This builder.

setEditListDurations

@CanIgnoreReturnValue
fun setEditListDurations(editListDurations: ImmutableLongArray?): Track.Builder!

Sets editListDurations. The default value is null.

Parameters
editListDurations: ImmutableLongArray?

The editListDurations.

Returns
Track.Builder!

This builder.

setEditListMediaTimes

@CanIgnoreReturnValue
fun setEditListMediaTimes(editListMediaTimes: ImmutableLongArray?): Track.Builder!

Sets editListMediaTimes. The default value is null.

Parameters
editListMediaTimes: ImmutableLongArray?

The editListMediaTimes.

Returns
Track.Builder!

This builder.

setFormat

@CanIgnoreReturnValue
fun setFormat(format: Format!): Track.Builder!

Sets format. This is a required value.

Parameters
format: Format!

The format.

Returns
Track.Builder!

This builder.

setId

@CanIgnoreReturnValue
fun setId(id: Int): Track.Builder!

Sets id. The default value is 0.

Parameters
id: Int

The id.

Returns
Track.Builder!

This builder.

setMediaDurationUs

@CanIgnoreReturnValue
fun setMediaDurationUs(mediaDurationUs: Long): Track.Builder!

Sets mediaDurationUs. The default value is TIME_UNSET.

Parameters
mediaDurationUs: Long

The mediaDurationUs.

Returns
Track.Builder!

This builder.

setMovieTimescale

@CanIgnoreReturnValue
fun setMovieTimescale(movieTimescale: Long): Track.Builder!

Sets movieTimescale. The default value is TIMESCALE_UNSET.

Parameters
movieTimescale: Long

The movieTimescale.

Returns
Track.Builder!

This builder.

setNalUnitLengthFieldLength

@CanIgnoreReturnValue
fun setNalUnitLengthFieldLength(nalUnitLengthFieldLength: Int): Track.Builder!

Sets nalUnitLengthFieldLength. The default value is 0.

Parameters
nalUnitLengthFieldLength: Int

The nalUnitLengthFieldLength.

Returns
Track.Builder!

This builder.

setSampleDescriptionEncryptionBoxes

@CanIgnoreReturnValue
fun setSampleDescriptionEncryptionBoxes(
    sampleDescriptionEncryptionBoxes: Array<TrackEncryptionBox!>?
): Track.Builder!

Sets sampleDescriptionEncryptionBoxes. The default value is null.

Parameters
sampleDescriptionEncryptionBoxes: Array<TrackEncryptionBox!>?

The sampleDescriptionEncryptionBoxes.

Returns
Track.Builder!

This builder.

setSampleTransformation

@CanIgnoreReturnValue
fun setSampleTransformation(@Track.Transformation sampleTransformation: Int): Track.Builder!

Sets sampleTransformation. The default value is TRANSFORMATION_NONE.

Parameters
@Track.Transformation sampleTransformation: Int

The sampleTransformation.

Returns
Track.Builder!

This builder.

setShouldBeExposed

@CanIgnoreReturnValue
fun setShouldBeExposed(shouldBeExposed: Boolean): Track.Builder!

Sets whether the track should be exposed to the player. The default value is true.

Parameters
shouldBeExposed: Boolean

The shouldBeExposed.

Returns
Track.Builder!

This builder.

setTimescale

@CanIgnoreReturnValue
fun setTimescale(timescale: Long): Track.Builder!

Sets timescale. The default value is TIMESCALE_UNSET.

Parameters
timescale: Long

The timescale.

Returns
Track.Builder!

This builder.

setType

@CanIgnoreReturnValue
fun setType(@C.TrackType type: Int): Track.Builder!

Sets type. The default value is TRACK_TYPE_UNKNOWN.

Parameters
@C.TrackType type: Int

The type.

Returns
Track.Builder!

This builder.