Companion

expect object Companion

Opens sources.

actual object Companion

Opens sources.

actual object Companion

Opens sources.

actual object Companion

Opens sources.

actual object Companion

Opens sources.

Functions

Link copied to clipboard
expect fun open(path: String): MediaSource

Open a local file or URL.

expect fun open(path: String, options: Map<String, String>, interrupt: OpenInterrupt? = null): MediaSource

Open with pre-open options: pairs applied between allocation and open, the only moment probesize, fflags and format forcing can act. Keys FFmpeg does not consume are reported through unusedOpenOptions, never silently dropped.

expect fun open(io: MediaByteSource, options: Map<String, String> = emptyMap(), interrupt: OpenInterrupt? = null, url: String? = null, mimeType: String? = null, nestedOpener: MediaByteOpener? = null): MediaSource

Open over caller-supplied bytes: FFmpeg demuxes whatever io reads, with no path involved. The returned source OWNS io and closes it when it closes. Pre-open options and interrupt behave exactly like the path overload's. Blocking, like every open here: call it off the UI thread, and expect io's own read latency to shape the open time.

actual fun open(path: String): MediaSource

Open a local file or URL.

actual fun open(path: String, options: Map<String, String>, interrupt: OpenInterrupt?): MediaSource

Open with pre-open options: pairs applied between allocation and open, the only moment probesize, fflags and format forcing can act. Keys FFmpeg does not consume are reported through unusedOpenOptions, never silently dropped.

actual fun open(io: MediaByteSource, options: Map<String, String>, interrupt: OpenInterrupt?, url: String?, mimeType: String?, nestedOpener: MediaByteOpener?): MediaSource

Open over caller-supplied bytes: FFmpeg demuxes whatever io reads, with no path involved. The returned source OWNS io and closes it when it closes. Pre-open options and interrupt behave exactly like the path overload's. Blocking, like every open here: call it off the UI thread, and expect io's own read latency to shape the open time.

actual fun open(path: String): MediaSource

Open a local file or URL.

actual fun open(path: String, options: Map<String, String>, interrupt: OpenInterrupt?): MediaSource

Open with pre-open options: pairs applied between allocation and open, the only moment probesize, fflags and format forcing can act. Keys FFmpeg does not consume are reported through unusedOpenOptions, never silently dropped.

actual fun open(io: MediaByteSource, options: Map<String, String>, interrupt: OpenInterrupt?, url: String?, mimeType: String?, nestedOpener: MediaByteOpener?): MediaSource

Open over caller-supplied bytes: FFmpeg demuxes whatever io reads, with no path involved. The returned source OWNS io and closes it when it closes. Pre-open options and interrupt behave exactly like the path overload's. Blocking, like every open here: call it off the UI thread, and expect io's own read latency to shape the open time.

actual fun open(path: String): MediaSource

Open a local file or URL.

actual fun open(path: String, options: Map<String, String>, interrupt: OpenInterrupt?): MediaSource

Open with pre-open options: pairs applied between allocation and open, the only moment probesize, fflags and format forcing can act. Keys FFmpeg does not consume are reported through unusedOpenOptions, never silently dropped.

actual fun open(io: MediaByteSource, options: Map<String, String>, interrupt: OpenInterrupt?, url: String?, mimeType: String?, nestedOpener: MediaByteOpener?): MediaSource

Open over caller-supplied bytes: FFmpeg demuxes whatever io reads, with no path involved. The returned source OWNS io and closes it when it closes. Pre-open options and interrupt behave exactly like the path overload's. Blocking, like every open here: call it off the UI thread, and expect io's own read latency to shape the open time.

actual fun open(path: String): MediaSource

Open a local file or URL.

actual fun open(path: String, options: Map<String, String>, interrupt: OpenInterrupt?): MediaSource

Open with pre-open options: pairs applied between allocation and open, the only moment probesize, fflags and format forcing can act. Keys FFmpeg does not consume are reported through unusedOpenOptions, never silently dropped.

actual fun open(io: MediaByteSource, options: Map<String, String>, interrupt: OpenInterrupt?, url: String?, mimeType: String?, nestedOpener: MediaByteOpener?): MediaSource

Open over caller-supplied bytes: FFmpeg demuxes whatever io reads, with no path involved. The returned source OWNS io and closes it when it closes. Pre-open options and interrupt behave exactly like the path overload's. Blocking, like every open here: call it off the UI thread, and expect io's own read latency to shape the open time.

Link copied to clipboard

MediaSource.open over caller-supplied bytes, with typed DemuxOptions.

fun MediaSource.Companion.open(path: String, options: DemuxOptions, interrupt: OpenInterrupt? = null): MediaSource

MediaSource.open with typed DemuxOptions instead of raw option pairs. interrupt behaves as it does on the raw overload; see OpenInterrupt.

Link copied to clipboard

The same over caller-supplied bytes. The source owns io and closes it, so io is spent when this returns, exactly as it would be after an MediaSource.Companion.open and a close.

fun MediaSource.Companion.probe(path: String, options: Map<String, String> = emptyMap()): MediaProbe

Opens path, reads what it says about itself, and closes it again.