|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Objectcom.wowza.wms.module.ModuleBase
com.wowza.wms.module.ModuleMediaCasterStreamMonitorAdvanced
public class ModuleMediaCasterStreamMonitorAdvanced
ModuleMediaCasterStreamMonitorAdvanced: Advanced stream monitoring module.
Add this <Module> definition to the end of the <Modules> list in [install-dir]/conf/[application]/Application.xml:
<Module>
<Name>ModuleMediaCasterStreamMonitorAdvanced</Name>
<Description>ModuleMediaCasterStreamMonitorAdvanced</Description>
<Class>com.wowza.wms.module.ModuleMediaCasterStreamMonitorAdvanced</Class>
</Module>
Add these properties to the application level <Properties> container at the bottom of [install-dir]/conf/[application]/Application.xml (be sure to get the correct <Properties> container - there are several in the Application.xml file). Carefully read the instructions above each set of properties and set accordingly:
<!--
Monitor incoming packets (stream, audio, video) to be sure packets continue to flow from encoder to stream. The
streamMonitor[type]StartTimeout controls the timeout (milliseconds) for the first packet. The streamMonitor[type]Timeout
controls the timeout (milliseconds) for packets after the first packet. The stream type refers to a catch all of any packet of
any type (audio, video, data). If any of these values are set to zero, the test is turned off.
-->
<Property>
<Name>streamMonitorStreamStartTimeout</Name>
<Value>20000</Value>
<Type>Integer</Type>
</Property>
<Property>
<Name>streamMonitorStreamTimeout</Name>
<Value>12000</Value>
<Type>Integer</Type>
</Property>
<Property>
<Name>streamMonitorVideoStartTimeout</Name>
<Value>0</Value>
<Type>Integer</Type>
</Property>
<Property>
<Name>streamMonitorVideoTimeout</Name>
<Value>0</Value>
<Type>Integer</Type>
</Property>
<Property>
<Name>streamMonitorAudioStartTimeout</Name>
<Value>0</Value>
<Type>Integer</Type>
</Property>
<Property>
<Name>streamMonitorAudioTimeout</Name>
<Value>0</Value>
<Type>Integer</Type>
</Property>
<!--
Monitor the incoming packet timecodes (audio, video or data) to be sure packets do not arrive out of order or late. The
streamMonitor[type]TCPosTolerance and streamMonitor[type]TCNegTolerance (milliseconds) values define a sliding window
based on the timecode of the previous packet. For example if these values are set to -500 and 3000 respectively then the
timecode difference between the current arriving packet and the previous packet of that type must fall within
-500 and 3000 milliseconds. If not and streamMonitor[type]TCToleranceEnable is set to true then stream will be considered
unhealthy and will be reset.
-->
<Property>
<Name>streamMonitorVideoTCToleranceEnable</Name>
<Value>false</Value>
<Type>Boolean</Type>
</Property>
<Property>
<Name>streamMonitorVideoTCPosTolerance</Name>
<Value>3000</Value>
<Type>Integer</Type>
</Property>
<Property>
<Name>streamMonitorVideoTCNegTolerance</Name>
<Value>-500</Value>
<Type>Integer</Type>
</Property>
<Property>
<Name>streamMonitorAudioTCToleranceEnable</Name>
<Value>false</Value>
<Type>Boolean</Type>
</Property>
<Property>
<Name>streamMonitorAudioTCPosTolerance</Name>
<Value>3000</Value>
<Type>Integer</Type>
</Property>
<Property>
<Name>streamMonitorAudioTCNegTolerance</Name>
<Value>-500</Value>
<Type>Integer</Type>
</Property>
<Property>
<Name>streamMonitorDataTCToleranceEnable</Name>
<Value>false</Value>
<Type>Boolean</Type>
</Property>
<Property>
<Name>streamMonitorDataTCPosTolerance</Name>
<Value>3000</Value>
<Type>Integer</Type>
</Property>
<Property>
<Name>streamMonitorDataTCNegTolerance</Name>
<Value>-500</Value>
<Type>Integer</Type>
</Property>
<!--
Monitors the time difference between the audio and video channel of a stream. If the difference between the currently arriving
video packet and the previous audio packet (or vice-versa) is greater than streamMonitorAVSyncTolerance and streamMonitorAVSyncToleranceEnable
is set to true, then the stream will be considered unhealthy and will be reset.
-->
<Property>
<Name>streamMonitorAVSyncToleranceEnable</Name>
<Value>false</Value>
<Type>Boolean</Type>
</Property>
<Property>
<Name>streamMonitorAVSyncTolerance</Name>
<Value>1500</Value>
<Type>Integer</Type>
</Property>
<!--
If set to true, then when a stream is reset and it belong to a MediaStreamNameGroup all streams in the group will be reset. If
false only the unhealthy stream will be reset.
-->
<Property>
<Name>streamMonitorResetNameGroups</Name>
<Value>true</Value>
<Type>Boolean</Type>
</Property>
<!--
Turns on debug logging of the monitoring.
-->
<Property>
<Name>streamMonitorDebug</Name>
<Value>false</Value>
<Type>Boolean</Type>
</Property>
| Constructor Summary | |
|---|---|
ModuleMediaCasterStreamMonitorAdvanced()
|
|
| Method Summary | |
|---|---|
void |
onAppStart(IApplicationInstance appInstance)
|
void |
onAppStop(IApplicationInstance appInstance)
|
boolean |
onResetMediaCaster(IApplicationInstance appInstance,
IMediaCaster mediaCaster)
Called when media caster is reset |
void |
onStreamCreate(IMediaStream stream)
|
void |
onStreamDestroy(IMediaStream stream)
|
boolean |
onValidateMediaCaster(IApplicationInstance appInstance,
IMediaCaster mediaCaster)
Called for each media caster to validate the media caster. |
void |
onValidateMediaCastersStart(IApplicationInstance appInstance)
Called when validation for all streams of an application instance is starting |
void |
onValidateMediaCastersStop(IApplicationInstance appInstance)
Called when validation for all streams of an application instance is done |
| Methods inherited from class com.wowza.wms.module.ModuleBase |
|---|
getAppInstance, getApplication, getCallbackParamCount, getLogger, getParam, getParamBoolean, getParamBoolean, getParamCount, getParamDate, getParamDouble, getParamDouble, getParamInt, getParamInt, getParamLong, getParamLong, getParamMixedArray, getParamObj, getParamString, getParamString, getParamType, getStream, getVHost, invokePrevious, invokePrevious, isSendResult, sendClientOnStatusError, sendResult, sendResult, sendResult, sendResult, sendResult, sendStreamOnStatusError |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected IApplicationInstance appInstance
protected java.util.Set<IMediaCaster> badStreams
protected java.util.Map<IMediaStream,com.wowza.wms.stream.monitor.MediaStreamMonitor> monitors
protected int streamMonitorAudioStartTimeout
protected int streamMonitorAudioTCNegTolerance
protected int streamMonitorAudioTCPosTolerance
protected boolean streamMonitorAudioTCToleranceEnable
protected int streamMonitorAudioTimeout
protected int streamMonitorAVSyncTolerance
protected boolean streamMonitorAVSyncToleranceEnable
protected int streamMonitorDataTCNegTolerance
protected int streamMonitorDataTCPosTolerance
protected boolean streamMonitorDataTCToleranceEnable
protected boolean streamMonitorDebug
protected boolean streamMonitorResetNameGroups
protected int streamMonitorStreamStartTimeout
protected int streamMonitorStreamTimeout
protected int streamMonitorVideoStartTimeout
protected int streamMonitorVideoTCNegTolerance
protected int streamMonitorVideoTCPosTolerance
protected boolean streamMonitorVideoTCToleranceEnable
protected int streamMonitorVideoTimeout
| Constructor Detail |
|---|
public ModuleMediaCasterStreamMonitorAdvanced()
| Method Detail |
|---|
public void onAppStart(IApplicationInstance appInstance)
public void onAppStop(IApplicationInstance appInstance)
public boolean onResetMediaCaster(IApplicationInstance appInstance,
IMediaCaster mediaCaster)
IMediaCasterValidateMediaCaster
onResetMediaCaster in interface IMediaCasterValidateMediaCasterappInstance - application instancemediaCaster - media caster
public void onStreamCreate(IMediaStream stream)
public void onStreamDestroy(IMediaStream stream)
public boolean onValidateMediaCaster(IApplicationInstance appInstance,
IMediaCaster mediaCaster)
IMediaCasterValidateMediaCaster
onValidateMediaCaster in interface IMediaCasterValidateMediaCasterappInstance - application instancemediaCaster - media caster
public void onValidateMediaCastersStart(IApplicationInstance appInstance)
IMediaCasterValidateMediaCaster
onValidateMediaCastersStart in interface IMediaCasterValidateMediaCasterappInstance - application instancepublic void onValidateMediaCastersStop(IApplicationInstance appInstance)
IMediaCasterValidateMediaCaster
onValidateMediaCastersStop in interface IMediaCasterValidateMediaCaster
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||