IMediaStream is the interface that is used to interact with all streams on the server. Each of the different stream types on the server implement the IMediaStream interface.
Stream (com.wowza.wms.stream.publish.Stream) is a server side created live stream that you can then insert other live or vod sources into. Internally, it has it’s own IMediaStream object available in stream.getPublisher().getStream();
If you create a Stream but never add any valid sources to it then using stream.close(); may not close it down properly because the underlying publisher thread would not have started running.
If you try to create another stream using the same name, it will fail because the stream name is still in use.
You can use the following method to shut down the stream completely.
// close the stream and wait for the publisher thread to end and destroy the publisher.
// get a reference to the publisher. If the thread never started, the publisher will still exist so close the publisher.
Publisher publisher = stream.getPublisher();
if(publisher != null)