/** {@inheritDoc} */
public IPlaylistSubscriberStream newPlaylistSubscriberStream(int streamId) {
if (isValidStreamId(streamId)) {
// get PlaylistSubscriberStream defined as a prototype in red5-common.xml
PlaylistSubscriberStream pss = (PlaylistSubscriberStream) scope.getContext().getBean("playlistSubscriberStream");
Integer buffer = streamBuffers.get(streamId - 1);
if (buffer != null) {
pss.setClientBufferDuration(buffer);
}
pss.setName(createStreamName());
pss.setConnection(this);
pss.setScope(this.getScope());
pss.setStreamId(streamId);
registerStream(pss);
usedStreams.incrementAndGet();
return pss;
}
return null;