open

expect fun open(path: String): MediaSource

Open a local file or URL.

This is a blocking call. Network URLs perform I/O inside the native open, so call it from a background dispatcher (Dispatchers.IO or your media dispatcher). Never call it on the UI thread.


expect fun open(path: String, options: Map<String, String>): MediaSource

Open with pre-open options (KD-4): 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()): MediaSource

Open over caller-supplied bytes (M1, the custom AVIO bridge): FFmpeg demuxes whatever io reads, with no path and no FFmpeg protocol involved. The returned source OWNS io and closes it when it closes. Pre-open options 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.

This is a blocking call. Network URLs perform I/O inside the native open, so call it from a background dispatcher (Dispatchers.IO or your media dispatcher). Never call it on the UI thread.


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

Open with pre-open options (KD-4): 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>): MediaSource

Open over caller-supplied bytes (M1, the custom AVIO bridge): FFmpeg demuxes whatever io reads, with no path and no FFmpeg protocol involved. The returned source OWNS io and closes it when it closes. Pre-open options 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.

This is a blocking call. Network URLs perform I/O inside the native open, so call it from a background dispatcher (Dispatchers.IO or your media dispatcher). Never call it on the UI thread.


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

Open with pre-open options (KD-4): 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>): MediaSource

Open over caller-supplied bytes (M1, the custom AVIO bridge): FFmpeg demuxes whatever io reads, with no path and no FFmpeg protocol involved. The returned source OWNS io and closes it when it closes. Pre-open options 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.

This is a blocking call. Network URLs perform I/O inside the native open, so call it from a background dispatcher (Dispatchers.IO or your media dispatcher). Never call it on the UI thread.


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

Open with pre-open options (KD-4): 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>): MediaSource

Open over caller-supplied bytes (M1, the custom AVIO bridge): FFmpeg demuxes whatever io reads, with no path and no FFmpeg protocol involved. The returned source OWNS io and closes it when it closes. Pre-open options 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.

This is a blocking call. Network URLs perform I/O inside the native open, so call it from a background dispatcher (Dispatchers.IO or your media dispatcher). Never call it on the UI thread.


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

Open with pre-open options (KD-4): 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>): MediaSource

Open over caller-supplied bytes (M1, the custom AVIO bridge): FFmpeg demuxes whatever io reads, with no path and no FFmpeg protocol involved. The returned source OWNS io and closes it when it closes. Pre-open options 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.