selectStreams

abstract fun selectStreams(indices: Set<Int>)

Packets for streams outside this set are read and discarded by the source.

Every index must be one this source offers. A set naming one it does not is a caller mistake and an implementation must refuse the whole call, never quietly select the subset it recognised: a caller that asked for two streams and silently got one has no way to find out.

The engine calls this once before the first read, and again on the demux lane, between two reads, to add a stream that PlayerPacket.newStreams announced (#509). Called again before the read after the announcing packet, it should deliver the new stream from its first packet, as KiteFFmpeg does by holding that stream's packets until then. The cursor does not move.

Throws

when indices is empty or names a stream this source does not have.