Get the connection error code from live stream

Hi,

I’m new to Wowza and I’ve set up a live streaming (Wirecast). During the live streaming, I would like to know if the user stop the stream normally or there’s any connection error between the streaming machine and the wowza server so that I can update a status that stored in DB. Is there any server API that I can get the connection fail error code?

I know that if it’s the connection error, wowza server will try to ping the streaming machine and if timeout, it’ll disconnect the streaming.

Thanks!

With a stream that is being "pushed from Wirecast, Wowza will just wait indefinitely for the stream to continue.

The StreamTimeout/reconnect behavior you are referring to is with streams that are “pulled”, i.e., MediaCaster streams, e.g., an rtsp stream from an IP camera or a shoutcast stream.

You can use this StreamWatchdog example to see if the stream is active, by checking packets:

http://community.wowza.com/t/-/243

Richard

But I can see the ping time out message from wowza server console when I manually disconnect the network of the machine where wirecast is live broadcasting.

Here’s the wowza console message:

INFO server comment - client connectionClosed [1148934568] pingtimeout

WARN server comment - LiveReceiver.resetSortBuffer[myStream]: diff:33629:2000 sortRTStart:1276550436432 sortTCStart:26850

INFO stream unpublish myStream -

INFO server comment - onStreamDestroy: 1

INFO stream destroy myStream -

INFO session disconnect 1148934568 -

INFO server comment - onDisconnect: 1148934568

INFO application app-stop definst live/definst

INFO server comment - onAppStop: live/definst

I need to know if there’s any API like “isPingTimeout()”. If the stream is stopped by the user normally, the first line in the message won’t appear.

You can use the IMediaStreamActionNotify2 interface to see normal events, onPublish and onUnPublish are event handlers for publishing client.

http://community.wowza.com/t/-/242

When I disable my internet connection from a computer on my lan that is publishing to a Wowza app on another computer, the onUnPublish event does not fire.

Richard