reselect

expect fun reselect(streams: List<StreamInfo>)

Changes which streams read delivers without reopening this reader or moving its demuxer cursor.

Every entry must name a stream of the source that opened this reader, by its entry in MediaSource.streams or by an entry that one replaced. The list must be non-empty and contain no duplicate indices. Invalid requests leave the previous selection unchanged. A stream FFmpeg added while reading can be selected as soon as it is listed; Packet.newStreams says which of its packets wait for that.

This operation changes delivery from the demuxer's current cursor onward. It does not seek backwards to recover packets from a newly selected stream, clear caller-owned queues or flush decoders. A player that has read ahead and needs the new stream at its presentation position must perform its own seek/cache refresh.

Between a seek and the first read after it, a newly selected stream starts where that seek would have landed it had the stream been selected for it. After a read, the cursor a newly selected stream joins at can be ahead of the last packet read by what the seek read to check its keyframe.

Reading, seeking, reselecting and closing must be serialized by the caller. On JVM/Android they are additionally mutually excluded inside the reader; callers must not rely on that implementation detail for portable code.

actual fun reselect(streams: List<StreamInfo>)

Changes which streams read delivers without reopening this reader or moving its demuxer cursor.

Every entry must name a stream of the source that opened this reader, by its entry in MediaSource.streams or by an entry that one replaced. The list must be non-empty and contain no duplicate indices. Invalid requests leave the previous selection unchanged. A stream FFmpeg added while reading can be selected as soon as it is listed; Packet.newStreams says which of its packets wait for that.

This operation changes delivery from the demuxer's current cursor onward. It does not seek backwards to recover packets from a newly selected stream, clear caller-owned queues or flush decoders. A player that has read ahead and needs the new stream at its presentation position must perform its own seek/cache refresh.

Between a seek and the first read after it, a newly selected stream starts where that seek would have landed it had the stream been selected for it. After a read, the cursor a newly selected stream joins at can be ahead of the last packet read by what the seek read to check its keyframe.

Reading, seeking, reselecting and closing must be serialized by the caller. On JVM/Android they are additionally mutually excluded inside the reader; callers must not rely on that implementation detail for portable code.

actual fun reselect(streams: List<StreamInfo>)

Changes which streams read delivers without reopening this reader or moving its demuxer cursor.

Every entry must name a stream of the source that opened this reader, by its entry in MediaSource.streams or by an entry that one replaced. The list must be non-empty and contain no duplicate indices. Invalid requests leave the previous selection unchanged. A stream FFmpeg added while reading can be selected as soon as it is listed; Packet.newStreams says which of its packets wait for that.

This operation changes delivery from the demuxer's current cursor onward. It does not seek backwards to recover packets from a newly selected stream, clear caller-owned queues or flush decoders. A player that has read ahead and needs the new stream at its presentation position must perform its own seek/cache refresh.

Between a seek and the first read after it, a newly selected stream starts where that seek would have landed it had the stream been selected for it. After a read, the cursor a newly selected stream joins at can be ahead of the last packet read by what the seek read to check its keyframe.

Reading, seeking, reselecting and closing must be serialized by the caller. On JVM/Android they are additionally mutually excluded inside the reader; callers must not rely on that implementation detail for portable code.

actual fun reselect(streams: List<StreamInfo>)

Changes which streams read delivers without reopening this reader or moving its demuxer cursor.

Every entry must name a stream of the source that opened this reader, by its entry in MediaSource.streams or by an entry that one replaced. The list must be non-empty and contain no duplicate indices. Invalid requests leave the previous selection unchanged. A stream FFmpeg added while reading can be selected as soon as it is listed; Packet.newStreams says which of its packets wait for that.

This operation changes delivery from the demuxer's current cursor onward. It does not seek backwards to recover packets from a newly selected stream, clear caller-owned queues or flush decoders. A player that has read ahead and needs the new stream at its presentation position must perform its own seek/cache refresh.

Between a seek and the first read after it, a newly selected stream starts where that seek would have landed it had the stream been selected for it. After a read, the cursor a newly selected stream joins at can be ahead of the last packet read by what the seek read to check its keyframe.

Reading, seeking, reselecting and closing must be serialized by the caller. On JVM/Android they are additionally mutually excluded inside the reader; callers must not rely on that implementation detail for portable code.

actual fun reselect(streams: List<StreamInfo>)

Changes which streams read delivers without reopening this reader or moving its demuxer cursor.

Every entry must name a stream of the source that opened this reader, by its entry in MediaSource.streams or by an entry that one replaced. The list must be non-empty and contain no duplicate indices. Invalid requests leave the previous selection unchanged. A stream FFmpeg added while reading can be selected as soon as it is listed; Packet.newStreams says which of its packets wait for that.

This operation changes delivery from the demuxer's current cursor onward. It does not seek backwards to recover packets from a newly selected stream, clear caller-owned queues or flush decoders. A player that has read ahead and needs the new stream at its presentation position must perform its own seek/cache refresh.

Between a seek and the first read after it, a newly selected stream starts where that seek would have landed it had the stream been selected for it. After a read, the cursor a newly selected stream joins at can be ahead of the last packet read by what the seek read to check its keyframe.

Reading, seeking, reselecting and closing must be serialized by the caller. On JVM/Android they are additionally mutually excluded inside the reader; callers must not rely on that implementation detail for portable code.