Package com.wowza.wms.mediacaster
Interface IMediaCaster
- 
 public interface IMediaCaster
- 
- 
Field SummaryFields Modifier and Type Field Description static intMEDIACASTERTYPE_CUPERTINOstatic intMEDIACASTERTYPE_LIVEREPEATERstatic intMEDIACASTERTYPE_MPEGTSTCPstatic intMEDIACASTERTYPE_RTPLIVEstatic intMEDIACASTERTYPE_SHOUTCASTstatic intMEDIACASTERTYPE_SRTRECEIVERstatic intMEDIACASTERTYPE_UNKNOWNstatic intSTREAMTIMEOUTREASON_GOODstatic intSTREAMTIMEOUTREASON_MISSINGstatic intSTREAMTIMEOUTREASON_NORTSPSESSIONstatic intSTREAMTIMEOUTREASON_NOSESSIONstatic intSTREAMTIMEOUTREASON_NOSTREAMstatic intSTREAMTIMEOUTREASON_NOTIMEOUTstatic intSTREAMTIMEOUTREASON_NOURLstatic intSTREAMTIMEOUTREASON_RECONNECTRUNNINGstatic intSTREAMTIMEOUTREASON_UNKNOWN
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description booleandoWatchdog()Idle processorvoidforceReset()Force a reset/reconnect of this media casterIApplicationInstancegetAppInstance()Get the application instance this media caster is associated withlonggetConnectLastAttempt()Get system time in milliseconds of last connection attemptlonggetConnectLastForceReset()Get system time in milliseconds of last time forceReset was calledlonggetConnectLastSuccess()Get system time in milliseconds of last connection successintgetIdleTimeout()Get the idle timeout for this media caster (milliseconds)MediaCasterItemgetMediaCasterDef()Get the media caster definitionStringgetMediaCasterId()Get the media caster idMediaCasterStreamItemgetMediaCasterStreamItem()Get the media caster item associated with this media casterintgetMediaCasterType()Get the media caster type.intgetReconnectWaitTime()Get the minimum time between reconnect attempts (milliseconds)IMediaStreamgetStream()Get the underlying stream being used by this media casterlonggetStreamLastSeq()Get the AMFPacket sequence number of last watchdog processed packetlonggetStreamMissingTime()Get the time in milliseconds the stream has been missinglonggetStreamRunningIndex()Each time a MediaCaster stream switches from not running to running this value is incrementedintgetStreamTimeout()Get the watchdog stream timeout (milliseconds)longgetStreamTimeoutLastReset()Get system time in milliseconds of last time stream was reset due to stream timeout (debug)longgetStreamTimeoutLastTime()Get system time in milliseconds of last time stream was considered in missing state (debug)intgetStreamTimeoutReason()Get the reason the stream is in timeout condition (debug)IVHostgetVHost()Get the virtual host associated with this media castervoidinit(MediaCasterStreamItem mediaCasterStreamItem, MediaCasterItem mediaCasterDef, IApplicationInstance appInstance, String mediaCasterId, String streamExt)Initialize the media casterbooleanisSession()Is there current a session attached to this MediaCasterbooleanisStream()Is there a stream associated with this MediaCasterbooleanisStreamIsRunning()Return true if stream is currently runningvoidregisterPlayer(IMediaStreamPlay player)Register a player with this media castervoidsessionClosed(org.apache.mina.common.IoSession session)sessionClosed callbackvoidsessionOpened(org.apache.mina.common.IoSession session)sessionOpened callbackvoidsetAppInstance(IApplicationInstance appInstance)Set the application instance this media caster is assoicated withvoidsetMediaCasterDef(MediaCasterItem mediaCasterDef)Set the media caster definitionvoidsetMediaCasterId(String mediaCasterId)Get the media caster idvoidsetMediaCasterType(int mediaCasterType)Set the media caster type.voidsetReconnectWaitTime(int reconnectWaitTime)Set the minimum time between reconnect attempts (milliseconds)voidsetStream(IMediaStream stream)Set the underlying stream being used by this media castervoidsetStreamRunning(boolean streamRunning)Called internally to track when streams are running or are stopped.voidsetStreamTimeout(int streamTimeout)Set the watchdog stream timeout (millseconds)voidshutdown(boolean isAppInstanceShutdown)Shutdown media castervoidunregisterPlayer(IMediaStreamPlay player)Unregister a player with this media caster
 
- 
- 
- 
Field Detail- 
STREAMTIMEOUTREASON_UNKNOWNstatic final int STREAMTIMEOUTREASON_UNKNOWN - See Also:
- Constant Field Values
 
 - 
STREAMTIMEOUTREASON_NOTIMEOUTstatic final int STREAMTIMEOUTREASON_NOTIMEOUT - See Also:
- Constant Field Values
 
 - 
STREAMTIMEOUTREASON_NOSESSIONstatic final int STREAMTIMEOUTREASON_NOSESSION - See Also:
- Constant Field Values
 
 - 
STREAMTIMEOUTREASON_NOURLstatic final int STREAMTIMEOUTREASON_NOURL - See Also:
- Constant Field Values
 
 - 
STREAMTIMEOUTREASON_NOSTREAMstatic final int STREAMTIMEOUTREASON_NOSTREAM - See Also:
- Constant Field Values
 
 - 
STREAMTIMEOUTREASON_RECONNECTRUNNINGstatic final int STREAMTIMEOUTREASON_RECONNECTRUNNING - See Also:
- Constant Field Values
 
 - 
STREAMTIMEOUTREASON_NORTSPSESSIONstatic final int STREAMTIMEOUTREASON_NORTSPSESSION - See Also:
- Constant Field Values
 
 - 
STREAMTIMEOUTREASON_GOODstatic final int STREAMTIMEOUTREASON_GOOD - See Also:
- Constant Field Values
 
 - 
STREAMTIMEOUTREASON_MISSINGstatic final int STREAMTIMEOUTREASON_MISSING - See Also:
- Constant Field Values
 
 - 
MEDIACASTERTYPE_UNKNOWNstatic final int MEDIACASTERTYPE_UNKNOWN - See Also:
- Constant Field Values
 
 - 
MEDIACASTERTYPE_LIVEREPEATERstatic final int MEDIACASTERTYPE_LIVEREPEATER - See Also:
- Constant Field Values
 
 - 
MEDIACASTERTYPE_SHOUTCASTstatic final int MEDIACASTERTYPE_SHOUTCAST - See Also:
- Constant Field Values
 
 - 
MEDIACASTERTYPE_RTPLIVEstatic final int MEDIACASTERTYPE_RTPLIVE - See Also:
- Constant Field Values
 
 - 
MEDIACASTERTYPE_CUPERTINOstatic final int MEDIACASTERTYPE_CUPERTINO - See Also:
- Constant Field Values
 
 - 
MEDIACASTERTYPE_MPEGTSTCPstatic final int MEDIACASTERTYPE_MPEGTSTCP - See Also:
- Constant Field Values
 
 - 
MEDIACASTERTYPE_SRTRECEIVERstatic final int MEDIACASTERTYPE_SRTRECEIVER - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
initvoid init(MediaCasterStreamItem mediaCasterStreamItem, MediaCasterItem mediaCasterDef, IApplicationInstance appInstance, String mediaCasterId, String streamExt) throws Exception Initialize the media caster- Parameters:
- mediaCasterStreamItem- media caster item
- mediaCasterDef- media caster definition
- appInstance- application instance
- mediaCasterId- media caster id
- streamExt- stream ext or prefix
- Throws:
- Exception
 
 - 
getVHostIVHost getVHost() Get the virtual host associated with this media caster- Returns:
- virtual host associated with this media caster
 
 - 
getMediaCasterIdString getMediaCasterId() Get the media caster id- Returns:
- media caster id
 
 - 
setMediaCasterIdvoid setMediaCasterId(String mediaCasterId) Get the media caster id- Parameters:
- mediaCasterId- media caster id
 
 - 
getStreamIMediaStream getStream() Get the underlying stream being used by this media caster- Returns:
- underlying stream being used by this media caster
 
 - 
setStreamvoid setStream(IMediaStream stream) Set the underlying stream being used by this media caster- Parameters:
- stream- underlying stream being used by this media caster
 
 - 
getAppInstanceIApplicationInstance getAppInstance() Get the application instance this media caster is associated with- Returns:
- application instance this media caster is associated with
 
 - 
setAppInstancevoid setAppInstance(IApplicationInstance appInstance) Set the application instance this media caster is assoicated with- Parameters:
- appInstance- application instance this media caster is assoicated with
 
 - 
getMediaCasterDefMediaCasterItem getMediaCasterDef() Get the media caster definition- Returns:
- media caster definition
 
 - 
setMediaCasterDefvoid setMediaCasterDef(MediaCasterItem mediaCasterDef) Set the media caster definition- Parameters:
- mediaCasterDef- media caster definition
 
 - 
shutdownvoid shutdown(boolean isAppInstanceShutdown) Shutdown media caster- Parameters:
- isAppInstanceShutdown- is server shutdown
 
 - 
registerPlayervoid registerPlayer(IMediaStreamPlay player) Register a player with this media caster- Parameters:
- player- player to register
 
 - 
unregisterPlayervoid unregisterPlayer(IMediaStreamPlay player) Unregister a player with this media caster- Parameters:
- player- player to unregister
 
 - 
getIdleTimeoutint getIdleTimeout() Get the idle timeout for this media caster (milliseconds)- Returns:
- idle timeout for this media caster (milliseconds)
 
 - 
sessionOpenedvoid sessionOpened(org.apache.mina.common.IoSession session) sessionOpened callback- Parameters:
- session- IO Session
 
 - 
sessionClosedvoid sessionClosed(org.apache.mina.common.IoSession session) sessionClosed callback- Parameters:
- session- IO Session
 
 - 
getMediaCasterStreamItemMediaCasterStreamItem getMediaCasterStreamItem() Get the media caster item associated with this media caster- Returns:
- media caster item associated with this media caster
 
 - 
forceResetvoid forceReset() Force a reset/reconnect of this media caster
 - 
doWatchdogboolean doWatchdog() Idle processor- Returns:
- return true if media caster unloaded due to idle event
 
 - 
getStreamTimeoutint getStreamTimeout() Get the watchdog stream timeout (milliseconds)- Returns:
- stream timeout
 
 - 
setStreamTimeoutvoid setStreamTimeout(int streamTimeout) Set the watchdog stream timeout (millseconds)- Parameters:
- streamTimeout- stream timeout
 
 - 
getStreamMissingTimelong getStreamMissingTime() Get the time in milliseconds the stream has been missing- Returns:
- time in milliseconds the stream has been missing
 
 - 
getStreamLastSeqlong getStreamLastSeq() Get the AMFPacket sequence number of last watchdog processed packet- Returns:
- AMFPacket sequence number
 
 - 
getStreamTimeoutReasonint getStreamTimeoutReason() Get the reason the stream is in timeout condition (debug)- Returns:
- reason the stream is in timeout condition (debug)
 
 - 
getStreamTimeoutLastTimelong getStreamTimeoutLastTime() Get system time in milliseconds of last time stream was considered in missing state (debug)- Returns:
- time in milliseconds of last time stream was considered in missing
 
 - 
getStreamTimeoutLastResetlong getStreamTimeoutLastReset() Get system time in milliseconds of last time stream was reset due to stream timeout (debug)- Returns:
- time in milliseconds of last time stream was reset
 
 - 
isSessionboolean isSession() Is there current a session attached to this MediaCaster- Returns:
- true is MediaCaster has session
 
 - 
isStreamboolean isStream() Is there a stream associated with this MediaCaster- Returns:
- true if stream associated with this MediaCaster
 
 - 
getConnectLastAttemptlong getConnectLastAttempt() Get system time in milliseconds of last connection attempt- Returns:
- system time in milliseconds of last connection attempt
 
 - 
getConnectLastSuccesslong getConnectLastSuccess() Get system time in milliseconds of last connection success- Returns:
- system time in milliseconds of last connection success
 
 - 
getConnectLastForceResetlong getConnectLastForceReset() Get system time in milliseconds of last time forceReset was called- Returns:
- system time in milliseconds of last time forceReset was called
 
 - 
isStreamIsRunningboolean isStreamIsRunning() Return true if stream is currently running- Returns:
- true if stream is currently running
 
 - 
getReconnectWaitTimeint getReconnectWaitTime() Get the minimum time between reconnect attempts (milliseconds)- Returns:
- minimum time between reconnect attempts (milliseconds)
 
 - 
setReconnectWaitTimevoid setReconnectWaitTime(int reconnectWaitTime) Set the minimum time between reconnect attempts (milliseconds)- Parameters:
- reconnectWaitTime- minimum time between reconnect attempts (milliseconds)
 
 - 
getMediaCasterTypeint getMediaCasterType() Get the media caster type. See IMediaCaster.MEDIACASTERTYPE_*- Returns:
- media caster type
 
 - 
setMediaCasterTypevoid setMediaCasterType(int mediaCasterType) Set the media caster type. See IMediaCaster.MEDIACASTERTYPE_*- Parameters:
- mediaCasterType- media caster type
 
 - 
setStreamRunningvoid setStreamRunning(boolean streamRunning) Called internally to track when streams are running or are stopped.- Parameters:
- streamRunning- set to true if stream is running
 
 - 
getStreamRunningIndexlong getStreamRunningIndex() Each time a MediaCaster stream switches from not running to running this value is incremented- Returns:
- stream running index
 
 
- 
 
-