Wowza Community

Shutdown idle (re-connecting) MediaCasterStream

Hi,

I`m struckeling…

Can someone explain what classes and methods are called when I click on “Disconnect Stream” in the EngineManager!

“For managed streams that this application connects to through the MediaCaster system, click the Disconnect icon to disconnect the application from stream.”

I want to do that in an HTTPProvider or programmatically. (Not using REST Interface)

I tryied several things e.g.

  • appInstance.stopMediaCasterStream(streamName) => Works only if Stream is not in Status “Waiting for Stream”;

  • MediaCasterStreamItem.release();

  • MediaCasterStreamItem.shutdown();

It allways keeps existing unter:

Engine Manger > Incoming Streams > ActiveStreams

Status: “Waiting for Stream”

=>Only when using the Enginemanager “Disconnect Stream” Button, the stream disappears and logs show (my Streamfile is called: “invalid-ip.stream”):

RTPMediaCaster.shutdown[1966205695:switchtest/707001:invalid-ip.stream]: invalid-ip.stream
INFO server comment - RTPMediaCaster.disconnect[1966205695:switchtest/707001:invalid-ip.stream]
INFO server comment - RTPMediaCaster.closeRTPSession[1966205695:switchtest/707001:invalid-ip.stream]
INFO server comment - REST API: REST API: Disconnect Stream: Publish stream successfully stopped [switchtest/707001]: invalid-ip.stream
INFO server comment - REST API: IncomingStreamConfig.disconnectStreamAction: Publish stream successfully stopped [switchtest/707001]: invalid-ip.stream

How can I stop a incoming RTSP stream (from *.stream file) which is not healthy or in status “Waiting for Stream” ?

Please describe what Java Classes Objects are called with this HTTP Post:

POST:

/enginemanager/streams/incomingstreams/disconnectStream.htm

vhost:defaultVHost

appName:switchtest

appType:live

appSection:incomingstreams

instanceName:MyInstanceName

streamName:switchstream2.stream

returnPage:incomingstreams

parentPage:incomingstreams

Hello

You can leverage the mediacaster http provider by issuing the following request:

Ex:

[stream-file] : teststream.stream

[app-name] : testapp/definst

  
curl –digest -u myuser:mypassword "http://localhost:8086/streammanager/streamAction?action=deleteStream" –data “vhostName=_defaultVHost_&appName=[app-name]&streamName=[stream-file]”

From the Java API perspective,

IApplicationInstance.stopMediaCasterStream(streamName)

This works if the stream is started as you’ve seen it will shut it down. If the status is “Waiting for Stream” then there isn’t really anything to shut down.

Thanks,

Matt