DashUtil
@UnstableApi
class DashUtil
Utility methods for DASH streams.
Summary
Public functions |
|
|---|---|
java-static DataSpec! |
This function is deprecated. Use |
java-static DataSpec! |
This function is deprecated. Use |
java-static DataSpec! |
buildDataSpec(Builds a |
java-static ChunkIndex? |
loadChunkIndex(Loads initialization and index data for the |
java-static ChunkIndex? |
loadChunkIndex(Loads initialization and index data for the |
java-static Format? |
loadFormatWithDrmInitData(dataSource: DataSource!, period: Period!)Loads a |
java-static Unit |
loadInitializationData(Loads initialization data for the |
java-static DashManifest! |
loadManifest(dataSource: DataSource!, uri: Uri!)Loads a DASH manifest. |
java-static Format? |
loadSampleFormat(Loads initialization data for the |
java-static Format? |
loadSampleFormat(Loads initialization data for the |
java-static String! |
resolveCacheKey(representation: Representation!, rangedUri: RangedUri!)Resolves the cache key to be used when requesting the given ranged URI for the given |
Public functions
buildDataSpec
java-static funbuildDataSpec(
representation: Representation!,
requestUri: RangedUri!,
flags: Int
): DataSpec!
buildDataSpec
java-static funbuildDataSpec(
representation: Representation!,
baseUrl: String!,
requestUri: RangedUri!,
flags: Int
): DataSpec!
buildDataSpec
java-static fun buildDataSpec(
representation: Representation!,
baseUrl: String!,
requestUri: RangedUri!,
flags: Int,
httpRequestHeaders: (Mutable)Map<String!, String!>!
): DataSpec!
Builds a DataSpec for a given RangedUri belonging to Representation.
| Parameters | |
|---|---|
representation: Representation! |
The |
baseUrl: String! |
The base url with which to resolve the request URI. |
requestUri: RangedUri! |
The |
flags: Int |
|
httpRequestHeaders: (Mutable)Map<String!, String!>! |
The |
loadChunkIndex
java-static fun loadChunkIndex(
dataSource: DataSource!,
trackType: Int,
representation: Representation!
): ChunkIndex?
Loads initialization and index data for the representation and returns the ChunkIndex.
Uses the first base URL for loading the index.
| Parameters | |
|---|---|
dataSource: DataSource! |
The source from which the data should be loaded. |
trackType: Int |
The type of the representation. Typically one of the |
representation: Representation! |
The representation which initialization chunk belongs to. |
| Returns | |
|---|---|
ChunkIndex? |
The |
| Throws | |
|---|---|
java.io.IOException |
Thrown when there is an error while loading. |
loadChunkIndex
java-static fun loadChunkIndex(
dataSource: DataSource!,
trackType: Int,
representation: Representation!,
baseUrlIndex: Int
): ChunkIndex?
Loads initialization and index data for the representation and returns the ChunkIndex.
| Parameters | |
|---|---|
dataSource: DataSource! |
The source from which the data should be loaded. |
trackType: Int |
The type of the representation. Typically one of the |
representation: Representation! |
The representation which initialization chunk belongs to. |
baseUrlIndex: Int |
The index of the base URL with which to resolve the request URI. |
| Returns | |
|---|---|
ChunkIndex? |
The |
| Throws | |
|---|---|
java.io.IOException |
Thrown when there is an error while loading. |
loadFormatWithDrmInitData
java-static fun loadFormatWithDrmInitData(dataSource: DataSource!, period: Period!): Format?
Loads a Format for acquiring keys for a given period in a DASH manifest.
| Parameters | |
|---|---|
dataSource: DataSource! |
The |
period: Period! |
The |
| Throws | |
|---|---|
java.io.IOException |
Thrown when there is an error while loading. |
loadInitializationData
java-static fun loadInitializationData(
chunkExtractor: ChunkExtractor!,
dataSource: DataSource!,
representation: Representation!,
loadIndex: Boolean
): Unit
Loads initialization data for the representation and optionally index data then returns a BundledChunkExtractor which contains the output.
Uses the first base URL for loading the initialization data.
| Parameters | |
|---|---|
chunkExtractor: ChunkExtractor! |
The |
dataSource: DataSource! |
The source from which the data should be loaded. |
representation: Representation! |
The representation which initialization chunk belongs to. |
loadIndex: Boolean |
Whether to load index data too. |
| Throws | |
|---|---|
java.io.IOException |
Thrown when there is an error while loading. |
loadManifest
java-static fun loadManifest(dataSource: DataSource!, uri: Uri!): DashManifest!
Loads a DASH manifest.
| Parameters | |
|---|---|
dataSource: DataSource! |
The |
uri: Uri! |
The |
| Returns | |
|---|---|
DashManifest! |
An instance of |
| Throws | |
|---|---|
java.io.IOException |
Thrown when there is an error while loading. |
loadSampleFormat
java-static fun loadSampleFormat(
dataSource: DataSource!,
trackType: Int,
representation: Representation!
): Format?
Loads initialization data for the representation and returns the sample Format.
Uses the first base URL for loading the format.
| Parameters | |
|---|---|
dataSource: DataSource! |
The source from which the data should be loaded. |
trackType: Int |
The type of the representation. Typically one of the |
representation: Representation! |
The representation which initialization chunk belongs to. |
| Throws | |
|---|---|
java.io.IOException |
Thrown when there is an error while loading. |
loadSampleFormat
java-static fun loadSampleFormat(
dataSource: DataSource!,
trackType: Int,
representation: Representation!,
baseUrlIndex: Int
): Format?
Loads initialization data for the representation and returns the sample Format.
| Parameters | |
|---|---|
dataSource: DataSource! |
The source from which the data should be loaded. |
trackType: Int |
The type of the representation. Typically one of the |
representation: Representation! |
The representation which initialization chunk belongs to. |
baseUrlIndex: Int |
The index of the base URL to be picked from the |
| Throws | |
|---|---|
java.io.IOException |
Thrown when there is an error while loading. |
resolveCacheKey
java-static fun resolveCacheKey(representation: Representation!, rangedUri: RangedUri!): String!
Resolves the cache key to be used when requesting the given ranged URI for the given Representation.
| Parameters | |
|---|---|
representation: Representation! |
The |
rangedUri: RangedUri! |
The URI for which to resolve the cache key. |
| Returns | |
|---|---|
String! |
The cache key. |