Wowza Community

API Question: IApplicationInstance.getStreams

Does this method get just server-side streams, or any streams that has client connections, or something else? I am calling IApplicationInstance.getStreams(), then calling getStreams() on the result, and one of our source streams (inputs) appears to be returned twice. The API guide says “Get all the mediaStream objects attached to this applicationInstance”, so I need some clarification on this, if possible.

It returns all stream types. If there is a live stream named “myStream” and 1 client subscribed to that stream, this method would return both streams. If you just want published streams use IApplicationInstance.getPublishStreamNames()


Yes it will include stream produced by the Wowza Transcoder. To get IMediaStream with stream name use IApplicationInstance().getStreams().getStream(streamName)


Thanks again, that’s exactly what I needed! Do you know if this will include all transcoded, based on transrate.xml? Secondly, Can you tell me how to get a IMediaStream object from the stream name? If I use getStreams to get a MediaStreamMap then I don’t see a method to get a published stream by name, so how do I ensure it’s the correct published stream if I just use getStream(String name)?

Thanks for the info. I know of the existence of the getStream(String streamName) method, but am I guaranteed that the stream returned will be the published stream? The MediaStreamMap returned from getStreams returns all streams, including the non-published one, so:

IApplicationInstance.getStreams().getStream(publishedStreamName) does not seem like it always give me the published one, if there are client connections to that stream, although it seems to get the published stream in the testing I’ve done thus far.