DashDownloader.Factory


class DashDownloader.Factory : SegmentDownloader.BaseFactory


A factory for DASH downloaders.

Summary

Public constructors

Factory(cacheDataSourceFactory: CacheDataSource.Factory!)

Creates a factory for DashDownloader.

Public functions

DashDownloader!
create(mediaItem: MediaItem!)

Creates DASH downloaders.

DashDownloader.Factory!

Sets the duration in microseconds from the startPositionUs to be downloaded, or TIME_UNSET if the media should be downloaded to the end.

abstract SegmentDownloaderFactory!
setDurationUs(durationUs: Long)

Sets the duration in microseconds from the startPositionUs to be downloaded, or TIME_UNSET if the media should be downloaded to the end.

DashDownloader.Factory!

Sets the Executor used to make requests for the media being downloaded.

abstract SegmentDownloaderFactory!
setExecutor(executor: Executor!)

Sets the Executor used to make requests for the media being downloaded.

DashDownloader.Factory!

Sets a parser for DASH manifests.

DashDownloader.Factory!
@CanIgnoreReturnValue
setMaxMergedSegmentStartTimeDiffMs(
    maxMergedSegmentStartTimeDiffMs: Long
)

Sets the maximum difference of the start time of two segments, up to which the segments (of the same URI) should be merged into a single download segment, in milliseconds.

abstract SegmentDownloaderFactory!
setMaxMergedSegmentStartTimeDiffMs(
    maxMergedSegmentStartTimeDiffMs: Long
)

Sets the maximum difference of the start time of two segments, up to which the segments (of the same URI) should be merged into a single download segment, in milliseconds.

DashDownloader.Factory!

Sets the start position in microseconds that the download should start from.

abstract SegmentDownloaderFactory!
setStartPositionUs(startPositionUs: Long)

Sets the start position in microseconds that the download should start from.

Public constructors

Factory

Factory(cacheDataSourceFactory: CacheDataSource.Factory!)

Creates a factory for DashDownloader.

Parameters
cacheDataSourceFactory: CacheDataSource.Factory!

A CacheDataSource.Factory for the cache into which the download will be written.

Public functions

create

fun create(mediaItem: MediaItem!): DashDownloader!

Creates DASH downloaders.

setDurationUs

@CanIgnoreReturnValue
fun setDurationUs(durationUs: Long): DashDownloader.Factory!

Sets the duration in microseconds from the startPositionUs to be downloaded, or TIME_UNSET if the media should be downloaded to the end.

Returns
DashDownloader.Factory!

This factory, for convenience.

setDurationUs

abstract fun setDurationUs(durationUs: Long): SegmentDownloaderFactory!

Sets the duration in microseconds from the startPositionUs to be downloaded, or TIME_UNSET if the media should be downloaded to the end.

setExecutor

@CanIgnoreReturnValue
fun setExecutor(executor: Executor!): DashDownloader.Factory!

Sets the Executor used to make requests for the media being downloaded. Providing an Executor that uses multiple threads will speed up the download by allowing parts of it to be executed in parallel.

Returns
DashDownloader.Factory!

This factory, for convenience.

setExecutor

abstract fun setExecutor(executor: Executor!): SegmentDownloaderFactory!

Sets the Executor used to make requests for the media being downloaded. Providing an Executor that uses multiple threads will speed up the download by allowing parts of it to be executed in parallel.

setManifestParser

@CanIgnoreReturnValue
fun setManifestParser(manifestParser: DashManifestParser!): DashDownloader.Factory!

Sets a parser for DASH manifests.

Returns
DashDownloader.Factory!

This factory, for convenience.

setMaxMergedSegmentStartTimeDiffMs

@CanIgnoreReturnValue
fun setMaxMergedSegmentStartTimeDiffMs(
    maxMergedSegmentStartTimeDiffMs: Long
): DashDownloader.Factory!

Sets the maximum difference of the start time of two segments, up to which the segments (of the same URI) should be merged into a single download segment, in milliseconds.

Returns
DashDownloader.Factory!

This factory, for convenience.

setMaxMergedSegmentStartTimeDiffMs

abstract fun setMaxMergedSegmentStartTimeDiffMs(
    maxMergedSegmentStartTimeDiffMs: Long
): SegmentDownloaderFactory!

Sets the maximum difference of the start time of two segments, up to which the segments (of the same URI) should be merged into a single download segment, in milliseconds.

setStartPositionUs

@CanIgnoreReturnValue
fun setStartPositionUs(startPositionUs: Long): DashDownloader.Factory!

Sets the start position in microseconds that the download should start from.

Returns
DashDownloader.Factory!

This factory, for convenience.

setStartPositionUs

abstract fun setStartPositionUs(startPositionUs: Long): SegmentDownloaderFactory!

Sets the start position in microseconds that the download should start from.