我希望我的读者能够处理不是以视频开头的音频;因此设置了“AddDynamicStreams”。如何让容器识别其来源的阅读器的设置?我需要设置标志或其他属性吗?
String inputUrl = "rtmp://127.0.0.1:1935/myapp/mystream live=1 buffer=1";
IMediaReader reader = ToolFactory.makeReader(inputUrl);
reader.setCloseOnEofOnly(false);
reader.setQueryMetaData(false);
// we want dynamic addition of streams
reader.setAddDynamicStreams(true);
// this shows "true"
log.debug("Reader can dynamically add streams: {}", reader.canAddDynamicStreams());
// get the container
IContainer container = reader.getContainer();
// this shows "false"
log.debug("Container can dynamically add streams: {}", container.canStreamsBeAddedDynamically());