DashMediaIo

class DashMediaIo(plan: DashSegmentPlan, fetch: suspend (String) -> ByteArray) : MediaIo

One representation's segments read as a single forward stream (the adaptive layer's first tier): the initialization segment when one exists, then every media segment in plan order, byte-concatenated. FFmpeg demuxes the join exactly as it demuxes a file, which is the media3 shape chosen here: Kotlin segment logic FEEDING the decoder, never FFmpeg's own dash demuxer.

Forward-only and unsized on purpose: a segment plan's total byte size is unknown until the last fetch, and lying about seekability would let the demuxer walk into a wall. Seeking a DASH presentation properly means segment arithmetic at the PLAYER level; this tier plays.

fetch is the caller's own, so DashUrlPolicy does not reach it: what it requests and which redirects it follows are the caller's to judge. Dash.mediaItemFor builds one that applies the policy.

Constructors

Link copied to clipboard
constructor(plan: DashSegmentPlan, fetch: suspend (String) -> ByteArray)

Properties

Link copied to clipboard
open val contentType: String?
Link copied to clipboard
open val location: String?
Link copied to clipboard
open override val seekable: Boolean = false
Link copied to clipboard
open override val size: Long? = null

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
Link copied to clipboard
open suspend fun openRelated(uri: String): MediaIo?
Link copied to clipboard
open suspend override fun read(into: ByteArray, offset: Int, length: Int): Int
Link copied to clipboard
open suspend override fun seek(position: Long)
Link copied to clipboard
open fun setWarningSink(sink: (PlaybackWarning) -> Unit)
Link copied to clipboard
Link copied to clipboard
open fun takeTags(): Map<String, String>?