core: Support switching of input stream.