Class PushPublishRTMP
Object
com.wowza.wms.pushpublish.model.PushPublishBase
com.wowza.wms.pushpublish.protocol.rtmp.PushPublishRTMP
- All Implemented Interfaces:
IPushPublish
- Direct Known Subclasses:
PushPublishRTMPProfileHandler
PushPublish
Sample Code to push to Wowza Server or Adobe Media Server (no authentication)
This method should work with Level 3 as well as long as the publishing application on not authenticated.
try
{
PushPublishRTMP publisher = new PushPublishRTMP();
// Source stream
publisher.setAppInstance(appInstance);
publisher.setSrcStreamName("myStream");
// Destination stream
publisher.setHostname("localhost");
publisher.setPort(1935);
publisher.setDstApplicationName("live");
publisher.setDstStreamName("myStream");
// Uncomment if pushing to Adobe Media Server
//publisher.setSendOriginalTimecodes(true);
//publisher.setOriginalTimecodeThreshold(0x100000);
// SecureToken shared secret
//publisher.setSecureTokenSharedSecret("#ed%h0#w@1");
publisher.setSendFCPublish(true);
publisher.setSendReleaseStream(true);
publisher.setDebugLog(true);
publisher.connect();
}
catch(Exception e)
{
WMSLoggerFactory.getLogger(null).info(CLASSNAME+"RTMP: ", e);
}
Sample Code to push to Wowza Server or Adobe Media Server (RTMP username/password authentication)
This method should work with Level 3 as well if the publishing application is protected using RTMP authentication.
try
{
PushPublishRTMP publisher = new PushPublishRTMP();
// Source stream
publisher.setAppInstance(appInstance);
publisher.setSrcStreamName("myStream");
// Destination stream
publisher.setHostname("localhost");
publisher.setPort(1935);
publisher.setDstApplicationName("live");
publisher.setDstStreamName("myStream");
publisher.setConnectionFlashVersion(PushPublishRTMP.CURRENTFMLEVERSION);
// Uncomment if pushing to Adobe Media Server
//publisher.setSendOriginalTimecodes(true);
//publisher.setOriginalTimecodeThreshold(0x100000);
// SecureToken shared secret
//publisher.setSecureTokenSharedSecret("#ed%h0#w@1");
publisher.setSendFCPublish(true);
publisher.setSendReleaseStream(true);
publisher.setDebugLog(true);
PushPublishRTMPAuthProviderAdobe adobeRTMPAuthProvider = new PushPublishRTMPAuthProviderAdobe();
adobeRTMPAuthProvider.init(publisher);
adobeRTMPAuthProvider.setUserName("username");
adobeRTMPAuthProvider.setPassword("password");
publisher.setRTMPAuthProvider(adobeRTMPAuthProvider);
publisher.connect();
}
catch(Exception e)
{
WMSLoggerFactory.getLogger(null).info(CLASSNAME+"RTMP: ", e);
}
Sample Code to push to Akamai
try
{
PushPublishRTMP publisher = new PushPublishRTMP();
// Source stream
publisher.setAppInstance(appInstance);
publisher.setSrcStreamName("myStream");
// Destination stream
String streamId = "12345";
String akamaiUsername = "56789";
String akamaiPassword = "changeme";
boolean isPrimary = true;
String hostname = (isPrimary?"p":"b")+".ep"+streamId+".i.akamaientrypoint.net";
String dstApplicationName = "EntryPoint";
String dstStreamName = "myStream"+"@"+streamId;
publisher.setHostname(hostname);
publisher.setPort(1935);
publisher.setDstApplicationName(dstApplicationName);
publisher.setDstStreamName(dstStreamName);
publisher.setDebugLog(true);
publisher.setConnectionFlashVersion(PushPublishRTMP.getPushPublishVersionStr());
if (PushPublishRTMP.isFlashVersionFMLE(publisher.getConnectionFlashVersion()))
{
PushPublishRTMPAuthProviderAdobe adobeRTMPAuthProvider = new PushPublishRTMPAuthProviderAdobe();
adobeRTMPAuthProvider.init(publisher);
adobeRTMPAuthProvider.setUserName(akamaiUsername);
adobeRTMPAuthProvider.setPassword(akamaiPassword);
publisher.setRTMPAuthProvider(adobeRTMPAuthProvider);
}
else
{
publisher.setAkamaiUserName(akamaiUsername);
publisher.setAkamaiPassword(akamaiPassword);
}
publisher.setSendFCPublish(true);
publisher.setSendReleaseStream(true);
publisher.setSendStreamCloseCommands(true);
publisher.setSendOriginalTimecodes(true);
publisher.setOriginalTimecodeThreshold(0x100000);
publisher.connect();
}
catch(Exception e)
{
WMSLoggerFactory.getLogger(null).info(CLASSNAME+"RTMP: ", e);
}
Sample Code to push to Limelight
try
{
PushPublishRTMP publisher = new PushPublishRTMP();
// Source stream
publisher.setAppInstance(appInstance);
publisher.setSrcStreamName("myStream");
// Destination stream
publisher.setHostname("fmspush.lax.llnw.net");
publisher.setPort(1935);
publisher.setDstApplicationName("live");
publisher.setDstStreamName("myStream");
publisher.setSendFCPublish(true);
publisher.setSendReleaseStream(true);
publisher.setDebugLog(true);
publisher.setSendOriginalTimecodes(true);
publisher.setOriginalTimecodeThreshold(0x100000);
PushPublishRTMPAuthProviderLimelight limelightRTMPAuthProvider = new PushPublishRTMPAuthProviderLimelight();
limelightRTMPAuthProvider.init(publisher);
limelightRTMPAuthProvider.setUserName("username");
limelightRTMPAuthProvider.setPassword("password");
publisher.setRTMPAuthProvider(limelightRTMPAuthProvider);
publisher.connect();
}
catch(Exception e)
{
WMSLoggerFactory.getLogger(null).info(CLASSNAME+"RTMP: ", e);
}
Sample Code to push to BitGravity (streaming needs to be setup per instructions in BG Live 3rd Party Encoder Configuration guide.)
try
{
PushPublishRTMP publisher = new PushPublishRTMP();
// Source stream
publisher.setAppInstance(client.getAppInstance());
publisher.setSrcStreamName("myStream");
// Destination stream
publisher.setHostname("rtpdev1.iad1.bitgravity.com");
publisher.setPort(1935);
publisher.setDstApplicationName("rtmp");
publisher.setDstAppInstanceName("push");
publisher.setDstStreamName("test@test.com/71d73d4cfd1e2f2fed77238021a2cbbe/test/live/feed01");
publisher.setSendFCPublish(true);
publisher.setSendReleaseStream(true);
publisher.setDebugLog(true);
publisher.connect();
}
catch(Exception e)
{
WMSLoggerFactory.getLogger(null).info(CLASSNAME+"RTMP: ", e);
}
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Integerprotected Stringprotected Stringprotected Stringfloat[]static final Class<PushPublishRTMP>static final Stringprotected longprotected Stringprotected Stringprotected Stringprotected longprotected PushPublishRTMP.STATEprotected Stringprotected intprotected longprotected longstatic final Stringstatic final Stringprotected longprotected booleanprotected booleanprotected Stringprotected Stringprotected Stringprotected Map<org.apache.mina.common.IoSession,PushPublishRTMPNetConnectionSession> protected booleanprotected booleanprotected longprotected longprotected longprotected longprotected longprotected longprotected List<IPushPublishRTMPNotify>protected Objectprotected Map<INetConnection,PushPublishRTMPNetConnectionSession> longlongprotected longprotected booleanprotected longprotected longintprotected longprotected longprotected longprotected longprotected booleanprotected Stringprotected booleanprotected booleanprotected IPushPublishRTMPAuthProviderprotected booleanprotected Stringprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected longprotected List<PushPublishRTMPNetConnectionSession>protected longprotected intprotected intprotected longprotected intprotected longprotected booleanprotected booleanprotected longprotected booleanprotected booleanprotected booleanprotected booleanprotected longprotected longprotected booleanprotected booleanFields inherited from class com.wowza.wms.pushpublish.model.PushPublishBase
appInstance, className, DESTINATION_BAK, DESTINATION_PRI, DESTINATION_RED, destinationName, destinationServer, dstStreamName, entryName, hostname, inetAddr, isAdaptiveStreaming, isExternalRedundancy, logger, mImplementation, myMap, password, playbackHostname, port, profile, properties, pushPublishSession, pushPublishStreamDebug, pushPublishType, reconnectWaitTime, sendingPerformance, srcStream, srcStreamName, totalIOPerformance2Last, totalIOPerformanceLast, userNameFields inherited from interface com.wowza.wms.pushpublish.model.IPushPublish
CONNECTED_STATE_CONNECTED, CONNECTED_STATE_CONNECTING, CONNECTED_STATE_NOT_CONNECTED, CONNECTED_STATE_WAITING, PUSHPUBLISH_MAP_PATH_FIELD_NAME, PUSHPUBLISH_TYPE_CUPERTINO, PUSHPUBLISH_TYPE_MPEGDASH, PUSHPUBLISH_TYPE_NOTIFY_PACKET, PUSHPUBLISH_TYPE_RTMP, PUSHPUBLISH_TYPE_RTP, PUSHPUBLISH_TYPE_RTP_BUFFERED, PUSHPUBLISH_TYPE_SANJOSE, PUSHPUBLISH_TYPE_SRT, PUSHPUBLISH_TYPE_UNKNOWN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConnectMetaData(String key, AMFData value) Added metadata values to the connect metadata objectvoidaddListener(IPushPublishRTMPNotify listener) Add IPushPublishRTMPNotify listenervoidvoidaddSession(PushPublishRTMPNetConnectionSession sessionHolder) Add sessionprotected voidBump the reconnect wait timeprotected voidcallConnect(PushPublishRTMPNetConnectionSession pushPublisherSession, String addQueryStr) Internal connectvoidconnect()Connect to serverconvertDataEvenToAMFData(AMFPacket packet) protected PushPublishRTMPNetConnectionPublishercreateNetConnectionPublisher(PushPublishRTMPNetConnectionSession pushPublisherSession) voidDisconnect from servervoiddisconnect(boolean hard) filterOnMetadataEvent(AMFPacket packet, long flags, List<String> itemsToRemove, Map<String, AMFData> itemsToAdd) Get Akamai Origin IPintGet Akamai Origin PortGet Akamai passwordgetAkamaiSessionKey(String sessionId) Get Akamai session keyGet Akamai user nameGet appInstance interfacelongintGet Flash version used in connection metadataGet Flash version used in connection metadataGet Page URL used in connection metadataGet the connection query stringGet SWF URL used in connection metadataintGet the connection timeout (milliseconds)longGet timestamp of last connection attemptlongGet timestamp of last successful connectionGet the connection detailsGet destination appInstance nameGet destination application nameGet destination stream nameGet the howToPublish string (valid values are "live", "record" and "append")longGet the absolute timecode of the last sent audio packet (milliseconds)longGet the absolute timecode of the last sent data packet (milliseconds)Get the last session interfacelongGet the absolute timecode of the last sent video keyframe packet (milliseconds)longGet the absolute timecode of the last sent video packet (milliseconds)protected List<IPushPublishRTMPNotify>Get a list of IPushPublishRTMPNotify listenersgetLock()Get the synchronization locklonglonglongGet the underlying INetConnection interface for this sessionlonglonglongGet the original timecode threshold.longlonglonglongintgetPort()Get destination server portGet the queryStringprotected intgetReconnectDelay(long currTime) Get the reconnect delayGet RTMP authentication providerGet SecureToken shared secretgetSessionHolderByNetConnection(INetConnection netConnection) Get the session holder by INetConnection interfacegetSessionHolderBySession(org.apache.mina.common.IoSession session) Get session holder by IoSessionGet the list of active IoSession ids for this publishing sessionlongThe amount of audio/video in milliseconds that must be available in the source streams buffer before push publishing will being.Get source stream nameintGet stream close timeout (milliseconds)intlongintlongGet total number of packets sent during push publishing sessionlongGet connection validation frequency (millisecond).longTimeout (milliseconds) that the wait on onMetadata system will wait looking for video and audio data to be populated.protected org.apache.mina.common.IoSessioninternalConnect(PushPublishRTMPNetConnectionSession pushPublisherSession) Internal connect methodbooleanisCurrentSession(org.apache.mina.common.IoSession session) Test to see if passed in session is current sessionbooleanIs debug logging turned onbooleanSet to true to log every packet being sentstatic booleanisFlashVerionFMLE(String flashVersion) Returns true if the Flash player version string is a Flash Media Live Encoder version (start with FMLE/ or FME/)static booleanisFlashVersionFMLE(String flashVersion) Returns true if the Flash player version string is a Flash Media Live Encoder version (start with FMLE/ or FME/)protected booleanisOnMetadataReady(IMediaStream stream, AMFPacket packet) booleanIf true all onMetadata events are converted to @setDataFrame callsbooleanIf true and destination application instance is _definst_ then the application instance name will not be sent to the remove server as part of the connection information.booleanSet to true if you wish push to reset if timecodes jump out of order.booleanIf true call FCAnnounce(streamName) after connecting to serverbooleanIf true call FCPublish(streamName) after connecting to serverbooleanTrue if sending onMetadata event at start of streambooleantrue if sending the original timecodes of source stream.booleanIf true call releaseStream(streamName) after connecting to serverbooleanIf true will send FCUnpublish, closeStream, deleteStream on disconnectbooleanisSSL()booleanIf true and waitOnMetadataAvailable, publishing will not start until onMetadata packet is populated with audio data.booleanbooleanSet to true to turn on system that will monitor onMetadata packet and wait for it to be populated before it starts sending the stream.booleanIf true and waitOnMetadataAvailable, publishing will not start until onMetadata packet is populated with video data.booleanprotected voidnotifyAkamaiClientLogin(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify Akamai ClientLoginprotected voidnotifyAkamaiSetChallenge(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify Akamai SetChallengeprotected voidnotifyAkamaiSetOriginConnectionInfo(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify Akamai SetOriginConnectionInfoprotected voidnotifyConnect(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify connectprotected voidnotifyConnectFailure(PushPublishRTMPNetConnectionSession pushPublisherSession) Notify connect failureprotected voidnotifyConnectStart(PushPublishRTMPNetConnectionSession pushPublisherSession) Notify connect startprotected voidnotifyConnectSuccess(PushPublishRTMPNetConnectionSession pushPublisherSession) Notify connect successprotected voidnotifyFCAnnounce(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify FCAnnounceprotected voidnotifyFCPublish(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify FCPublishprotected voidnotifyHandshakeResult(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify handshake resultprotected voidnotifyPublishHandlerPlay(PushPublishRTMPNetConnectionSession pushPublisherSession, OutputStream out, long[] playSizes) Notify publish handler playprotected voidnotifyPushPublisherSessionCreate(PushPublishRTMPNetConnectionSession pushPublisherSession) Notify session createprotected voidnotifyPushPublisherSessionDestroy(PushPublishRTMPNetConnectionSession pushPublisherSession) Notify session destroyprotected voidnotifySessionClosed(PushPublishRTMPNetConnectionSession pushPublisherSession) Notify session closedprotected voidnotifySessionIdle(PushPublishRTMPNetConnectionSession pushPublisherSession) Notify session idle eventprotected voidnotifySessionOpened(PushPublishRTMPNetConnectionSession pushPublisherSession) Notify session openedprotected voidnotifyStreamCreate(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify stream createprotected voidnotifyStreamOnPlayStatus(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify OnPlayStatusprotected voidnotifyStreamOnStatus(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify StreamOnStatusprotected voidnotifyValidateSession(PushPublishRTMPNetConnectionSession pushPublisherSession) protected voidnotifyValidateSessionResult(PushPublishRTMPNetConnectionSession pushPublisherSession, boolean result) voidputOnMetadataItemToAdd(String name, AMFData value) booleanremoveListener(IPushPublishRTMPNotify listener) rempve IPushPublishRTMPNotify listenervoidremoveSession(PushPublishRTMPNetConnectionSession sessionHolder) Remove sessionvoidReset server connectionvoidresetConnection(boolean noDelay) Reset server connectionvoidsessionClosed(org.apache.mina.common.IoSession session) Internal callbackvoidsessionOpened(org.apache.mina.common.IoSession session) Internal callbackvoidsetAkamaiOriginIp(String akamaiOriginIp) Set Akamai Origin IPvoidsetAkamaiOriginPort(int akamaiOriginPort) Set Akamai Origin PortvoidsetAkamaiPassword(String akamaiPassword) Set Akamai passwordvoidsetAkamaiUserName(String akamaiUserName) Set Akamai user namevoidsetAppInstance(IApplicationInstance appInstance) Set appInstance interfacevoidsetBindAddress(String bindAddress) voidsetConnectionFlashVerion(String connectionFlashVersion) Set Flash version used in connection metadatavoidsetConnectionFlashVersion(String connectionFlashVersion) Set Flash version used in connection metadatavoidsetConnectionPageURL(String connectionPageURL) Set Page URL used in connection metadatavoidsetConnectionQueryStr(String connectionQueryStr) Set the connection query stringvoidsetConnectionSwfURL(String connectionSwfURL) Set SWF URL used in connection metadatavoidsetConnectionTimeout(int connectionTimeout) Set the connection timeout (milliseconds)voidsetConnectLastAttempt(long connectLastAttempt) Set timestamp of last connection attemptvoidsetConnectLastSuccess(long connectLastSuccess) Set timestamp of last successful connectionvoidsetDebugLog(boolean debugLog) Set debug loggingvoidsetDebugPackets(boolean debugPackets) Set to true to log every packet being sentvoidsetDstAppInstanceName(String dstAppInstanceName) Set destination appInstance namevoidsetDstApplicationName(String dstApplicationName) Set destination application namevoidsetDstStreamName(String dstStreamName) Set destination stream namevoidsetHowToPublish(String howToPublish) Set the howToPublish string (valid values are "live", "record" and "append")voidsetOnMetadataFilter(long onMetadataFilter) voidsetOnMetadataToSetDataFrame(boolean onMetadataToSetDataFrame) If true all onMetadata events are converted to @setDataFrame callsvoidsetOriginalTimecodeOffset(long originalTimecodeOffset) voidsetOriginalTimecodeThreshold(long originalTimecodeThreshold) Set the original timecode threshold.voidvoidsetPort(int port) Set destination server portvoidsetQueryString(String queryString) Set the queryString, as set in the map filevoidsetRemoveDefaultAppInstance(boolean removeDefaultAppInstance) If true and destination application instance is _definst_ then the application instance name will not be sent to the remove server as part of the connection information.voidsetResetOnTimecodeOutOfOrder(boolean resetOnTimecodeOutOfOrder) Set to true if you wish push to reset if timecodes jump out of order.voidsetRTMPAuthProvider(IPushPublishRTMPAuthProvider rtmpAuthProvider) Set RTMP authentication providervoidsetSecureTokenSharedSecret(String secureTokenSharedSecret) Set SecureToken shared secretvoidsetSendFCAnnounce(boolean sendFCAnnounce) If true call FCAnnounce(streamName) after connecting to servervoidsetSendFCPublish(boolean sendFCPublish) If true call FCPublish(streamName) after connecting to servervoidsetSendOnMetadata(boolean sendOnMetadata) True if sending onMetadata event at start of streamvoidsetSendOriginalTimecodes(boolean sendOriginalTimecodes) true if sending the original timecodes of source stream.voidsetSendReleaseStream(boolean sendReleaseStream) If true call releaseStream(streamName) after connecting to servervoidsetSendStreamCloseCommands(boolean sendStreamCloseCommands) If true will send FCUnpublish, closeStream, deleteStream on disconnectvoidsetSrcStreamBufferSize(long srcStreamBufferSize) The amount of audio/video in milliseconds that must be available in the source streams buffer before push publishing will being.voidsetSrcStreamName(String srcStreamName) Set source stream namevoidsetSSL(boolean isSSL) voidsetStreamCloseWaitTime(int streamCloseWaitTime) Set stream close timeout (milliseconds)voidsetStreamDebugLog(boolean debugLog) voidsetSyncPacketType(int syncPacketType) voidsetSyncTimecode(long syncTimecode) voidsetTimecodesOutOfOrderThreshold(int timecodesOutOfOrderThreshold) voidsetValidationFrequency(long validationFrequency) Set connection validation frequency (millisecond).voidsetWaitOnMetadataAudio(boolean waitOnMetadataAudio) If true and waitOnMetadataAvailable, publishing will not start until onMetadata packet is populated with audio data.voidsetWaitOnMetadataAudioDatarate(boolean waitOnMetadataAudioDatarate) voidsetWaitOnMetadataAvailable(boolean waitOnMetadataAvailable) Set to true to turn on system that will monitor onMetadata packet and wait for it to be populated before it starts sending the stream.voidsetWaitOnMetadataTimeout(long waitOnMetadataTimeout) Timeout (milliseconds) that the wait on onMetadata system will wait looking for video and audio data to be populated.voidsetWaitOnMetadataVideo(boolean waitOnMetadataVideo) If true and waitOnMetadataAvailable, publishing will not start until onMetadata packet is populated with video data.voidsetWaitOnMetadataVideoDatarate(boolean waitOnMetadataVideoDatarate) protected voidtryToConnect(PushPublishRTMP.STATE connectionState) Try to connect to serverMethods inherited from class com.wowza.wms.pushpublish.model.PushPublishBase
add, addIOPerformance2, clearLoggingValues, getBandwidth, getBaseParams, getDestinationID, getDestinationName, getDestinationServer, getEntryName, getHostname, getImplementation, getInetAddr, getMap, getMessagesOutBytes, getMessagesOutCount, getPassword, getPlaybackHostname, getProfile, getProperties, getPushPublishType, getReconnectWaitTime, getSrcStream, getUserName, getWowzaStreamingEngineVersionStr, incrementMessagesOut, init, isAdaptiveStreaming, isExternalRedundancy, load, logDebug, logError, logError, logError, logInfo, logWarn, resolveHostName, setAdaptiveStreaming, setAdaptiveStreaming, setDestinationName, setDestinationServer, setDestinationServer, setEntryName, setExternalRedundancy, setExternalRedundancy, setHost, setHostname, setImplementation, setInetAddr, setPassword, setPlaybackHostname, setPort, setProfile, setReconnectWaitTime, setSrcStream, setStreamName, setUserName, updateLoggingValues, updateUsageTracker
-
Field Details
-
CLASS
-
CLASSNAME
- See Also:
-
CURRENTFMLEVERSION
- See Also:
-
CURRENTFLASHVERSION
- See Also:
-
rtmpDebugLog
protected boolean rtmpDebugLog -
debugLogLastPacketCount
protected long debugLogLastPacketCount -
debugPackets
protected boolean debugPackets -
netconnectToSessionHolder
-
ioSessionToSessionHolder
protected Map<org.apache.mina.common.IoSession,PushPublishRTMPNetConnectionSession> ioSessionToSessionHolder -
sessionOrder
-
listeners
-
dstApplicationName
-
dstAppInstanceName
-
lock
-
howToPublish
-
sendFCPublish
protected boolean sendFCPublish -
sendFCAnnounce
protected boolean sendFCAnnounce -
sendReleaseStream
protected boolean sendReleaseStream -
sendStreamCloseCommands
protected boolean sendStreamCloseCommands -
sendOnMetadata
protected boolean sendOnMetadata -
onMetadataToSetDataFrame
protected boolean onMetadataToSetDataFrame -
onMetadataFilter
protected long onMetadataFilter -
onMetadataItemsToRemove
-
onMetadataItemsToAdd
-
timecodesOutOfOrderThreshold
protected int timecodesOutOfOrderThreshold -
tryConnect
protected boolean tryConnect -
isReconnectorRunning
protected boolean isReconnectorRunning -
connectionQueryStr
-
queryString
-
connectionFlashVersion
-
connectionSwfURL
-
connectionPageURL
-
akamaiUserName
-
akamaiPassword
-
akamaiOriginIp
-
akamaiOriginPort
-
validationFrequency
protected long validationFrequency -
sendOriginalTimecodes
protected boolean sendOriginalTimecodes -
originalTimecodeThreshold
protected long originalTimecodeThreshold -
originalTimecodeOffset
protected long originalTimecodeOffset -
connectionTimeout
protected int connectionTimeout -
connectLastAttempt
protected long connectLastAttempt -
connectLastSuccess
protected long connectLastSuccess -
connectionResetCount
protected long connectionResetCount -
connectAttemptCount
protected long connectAttemptCount -
connectionState
-
doSendOnMetaData
protected boolean doSendOnMetaData -
removeDefaultAppInstance
protected boolean removeDefaultAppInstance -
resetOnTimecodeOutOfOrder
protected boolean resetOnTimecodeOutOfOrder -
sendStreamCloseCommandsSendTime
protected long sendStreamCloseCommandsSendTime -
streamCloseWaitTime
protected int streamCloseWaitTime -
lastIdleReadTime
protected long lastIdleReadTime -
lastIdleWriteTime
protected long lastIdleWriteTime -
totalPacketsSent
protected long totalPacketsSent -
lastVideoTC
protected long lastVideoTC -
lastVideoKeyFrameTC
protected long lastVideoKeyFrameTC -
lastAudioTC
protected long lastAudioTC -
lastDataTC
protected long lastDataTC -
packetsSentAudio
protected long packetsSentAudio -
packetsSentVideo
protected long packetsSentVideo -
packetsSentVideoKeyFrame
protected long packetsSentVideoKeyFrame -
packetsSentData
protected long packetsSentData -
waitOnMetadataAvailable
protected boolean waitOnMetadataAvailable -
waitOnMetadataVideo
protected boolean waitOnMetadataVideo -
waitOnMetadataVideoDatarate
protected boolean waitOnMetadataVideoDatarate -
waitOnMetadataAudio
protected boolean waitOnMetadataAudio -
waitOnMetadataAudioDatarate
protected boolean waitOnMetadataAudioDatarate -
waitOnMetadataTimeout
protected long waitOnMetadataTimeout -
waitOnMetadataReady
protected boolean waitOnMetadataReady -
waitOnMetadataStartime
protected long waitOnMetadataStartime -
srcStreamBufferSize
protected long srcStreamBufferSize -
bindAddress
-
rtmpAuthProvider
-
connectMetaData
-
offlineTime
public long offlineTime -
onlineTime
public long onlineTime -
outprint
public int outprint -
bytesAvg
public float[] bytesAvg -
isSSL
protected boolean isSSL -
usePingPong
protected boolean usePingPong -
pingPongListenerRegistered
protected boolean pingPongListenerRegistered -
syncTimecode
protected long syncTimecode -
syncPacketType
protected int syncPacketType
-
-
Constructor Details
-
PushPublishRTMP
public PushPublishRTMP() throws com.wowza.wms.server.LicensingException- Throws:
com.wowza.wms.server.LicensingException
-
-
Method Details
-
createNetConnectionPublisher
protected PushPublishRTMPNetConnectionPublisher createNetConnectionPublisher(PushPublishRTMPNetConnectionSession pushPublisherSession) -
getNetConnection
Get the underlying INetConnection interface for this session- Returns:
- INetConnection interface for this session
-
getLock
Get the synchronization lock- Returns:
- synchronization lock
-
getConnectionTimeout
public int getConnectionTimeout()Get the connection timeout (milliseconds)- Returns:
- connection timeout (milliseconds)
-
setConnectionTimeout
public void setConnectionTimeout(int connectionTimeout) Set the connection timeout (milliseconds)- Parameters:
connectionTimeout- connection timeout (milliseconds)
-
getHowToPublish
Get the howToPublish string (valid values are "live", "record" and "append")- Returns:
- howToPublish string
-
setHowToPublish
Set the howToPublish string (valid values are "live", "record" and "append")- Parameters:
howToPublish- howToPublish string
-
isSendFCPublish
public boolean isSendFCPublish()If true call FCPublish(streamName) after connecting to server- Returns:
- true if calling FCPublish(streamName) after connecting to server
-
setSendFCPublish
public void setSendFCPublish(boolean sendFCPublish) If true call FCPublish(streamName) after connecting to server- Parameters:
sendFCPublish- true if calling FCPublish(streamName) after connecting to server
-
isSendReleaseStream
public boolean isSendReleaseStream()If true call releaseStream(streamName) after connecting to server- Returns:
- true if calling releaseStream(streamName) after connecting to server
-
setSendReleaseStream
public void setSendReleaseStream(boolean sendReleaseStream) If true call releaseStream(streamName) after connecting to server- Parameters:
sendReleaseStream- true if calling releaseStream(streamName) after connecting to server
-
getSessionListDebug
Get the list of active IoSession ids for this publishing session- Returns:
- list of active IoSession ids for this publishing session
-
isCurrentSession
public boolean isCurrentSession(org.apache.mina.common.IoSession session) Test to see if passed in session is current session- Parameters:
session- IoSession interface- Returns:
- true if current session
-
getLastSession
Get the last session interface- Returns:
- last session interface
-
addSession
Add session- Parameters:
sessionHolder- session holder
-
removeSession
Remove session- Parameters:
sessionHolder- session holder
-
getSessionHolderBySession
public PushPublishRTMPNetConnectionSession getSessionHolderBySession(org.apache.mina.common.IoSession session) Get session holder by IoSession- Parameters:
session- IoSession- Returns:
- session holder
-
getSessionHolderByNetConnection
public PushPublishRTMPNetConnectionSession getSessionHolderByNetConnection(INetConnection netConnection) Get the session holder by INetConnection interface- Parameters:
netConnection- INetConnection interface- Returns:
- session holder
-
sessionOpened
public void sessionOpened(org.apache.mina.common.IoSession session) Internal callback- Parameters:
session- IoSession
-
sessionClosed
public void sessionClosed(org.apache.mina.common.IoSession session) Internal callback- Parameters:
session- IoSession
-
tryToConnect
Try to connect to server -
resetConnection
public void resetConnection()Reset server connection -
resetConnection
public void resetConnection(boolean noDelay) Reset server connection- Parameters:
noDelay- if true reset immediately
-
getContextStr
Get the connection details- Specified by:
getContextStrin interfaceIPushPublish- Specified by:
getContextStrin classPushPublishBase- Returns:
- connection details
-
internalConnect
protected org.apache.mina.common.IoSession internalConnect(PushPublishRTMPNetConnectionSession pushPublisherSession) Internal connect method- Parameters:
pushPublisherSession- session holder- Returns:
- Io session
-
getRemoteIpAddress
-
getConnectionQueryStr
Get the connection query string- Returns:
- connection query string
-
setConnectionQueryStr
Set the connection query string- Parameters:
connectionQueryStr- connection query string
-
getQueryString
Get the queryString- Parameters:
queryString-
-
setQueryString
Set the queryString, as set in the map file- Parameters:
queryString-
-
connect
public void connect()Connect to server -
callConnect
protected void callConnect(PushPublishRTMPNetConnectionSession pushPublisherSession, String addQueryStr) Internal connect- Parameters:
pushPublisherSession- session holderaddQueryStr- additional query params
-
getAkamaiSessionKey
Get Akamai session key- Parameters:
sessionId- session Id- Returns:
- Akamai session key
-
getConnectionFlashVerion
Get Flash version used in connection metadata- Returns:
- Flash version used in connection metadata
-
getConnectionFlashVersion
Get Flash version used in connection metadata- Returns:
- Flash version used in connection metadata
-
setConnectionFlashVersion
Set Flash version used in connection metadata- Parameters:
connectionFlashVersion- Flash version used in connection metadata
-
setConnectionFlashVerion
Set Flash version used in connection metadata- Parameters:
connectionFlashVersion- Flash version used in connection metadata
-
getConnectionSwfURL
Get SWF URL used in connection metadata- Returns:
- SWF URL used in connection metadata
-
setConnectionSwfURL
Set SWF URL used in connection metadata- Parameters:
connectionSwfURL- SWF URL used in connection metadata
-
getConnectionPageURL
Get Page URL used in connection metadata- Returns:
- Page URL used in connection metadata
-
setConnectionPageURL
Set Page URL used in connection metadata- Parameters:
connectionPageURL- Page URL used in connection metadata
-
getAkamaiUserName
Get Akamai user name- Returns:
- Akamai user name
-
setAkamaiUserName
Set Akamai user name- Parameters:
akamaiUserName- Akamai user name
-
getAkamaiPassword
Get Akamai password- Returns:
- Akamai password
-
setAkamaiPassword
Set Akamai password- Parameters:
akamaiPassword- Akamai password
-
getAkamaiOriginIp
Get Akamai Origin IP- Returns:
- Akamai Origin IP
-
setAkamaiOriginIp
Set Akamai Origin IP- Parameters:
akamaiOriginIp- Akamai Origin IP
-
getAkamaiOriginPort
public int getAkamaiOriginPort()Get Akamai Origin Port- Returns:
- Akamai Origin Port
-
setAkamaiOriginPort
public void setAkamaiOriginPort(int akamaiOriginPort) Set Akamai Origin Port- Parameters:
akamaiOriginPort- Akamai Origin Port
-
isSendFCAnnounce
public boolean isSendFCAnnounce()If true call FCAnnounce(streamName) after connecting to server- Returns:
- true if calling FCAnnounce(streamName) after connecting to server
-
setSendFCAnnounce
public void setSendFCAnnounce(boolean sendFCAnnounce) If true call FCAnnounce(streamName) after connecting to server- Parameters:
sendFCAnnounce- true if calling FCAnnounce(streamName) after connecting to server
-
getValidationFrequency
public long getValidationFrequency()Get connection validation frequency (millisecond). Zero to turn off validation.- Returns:
- connection validation frequency (millisecond)
-
setValidationFrequency
public void setValidationFrequency(long validationFrequency) Set connection validation frequency (millisecond). Zero to turn off validation.- Parameters:
validationFrequency- connection validation frequency (millisecond)
-
addListener
Add IPushPublishRTMPNotify listener- Parameters:
listener- IPushPublishRTMPNotify listener
-
removeListener
rempve IPushPublishRTMPNotify listener- Parameters:
listener- IPushPublishRTMPNotify listener- Returns:
- true if removed
-
getLocalListeners
Get a list of IPushPublishRTMPNotify listeners- Returns:
- list of IPushPublishRTMPNotify listeners
-
notifyConnectStart
Notify connect start- Parameters:
pushPublisherSession- session holder
-
notifyConnectSuccess
Notify connect success- Parameters:
pushPublisherSession- session holder
-
notifyConnectFailure
Notify connect failure- Parameters:
pushPublisherSession- session holder
-
notifyHandshakeResult
protected void notifyHandshakeResult(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify handshake result- Parameters:
pushPublisherSession- session holderfunction- functionparams- params
-
notifyAkamaiSetChallenge
protected void notifyAkamaiSetChallenge(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify Akamai SetChallenge- Parameters:
pushPublisherSession- session holderfunction- functionparams- params
-
notifyAkamaiSetOriginConnectionInfo
protected void notifyAkamaiSetOriginConnectionInfo(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify Akamai SetOriginConnectionInfo- Parameters:
pushPublisherSession- session holderfunction- functionparams- params
-
notifyAkamaiClientLogin
protected void notifyAkamaiClientLogin(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify Akamai ClientLogin- Parameters:
pushPublisherSession- session holderfunction- functionparams- params
-
notifyFCPublish
protected void notifyFCPublish(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify FCPublish- Parameters:
pushPublisherSession- session holderfunction- functionparams- params
-
notifyFCAnnounce
protected void notifyFCAnnounce(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify FCAnnounce- Parameters:
pushPublisherSession- session holderfunction- functionparams- params
-
notifyConnect
protected void notifyConnect(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify connect- Parameters:
pushPublisherSession- session holderfunction- functionparams- params
-
notifyStreamCreate
protected void notifyStreamCreate(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify stream create- Parameters:
pushPublisherSession- session holderfunction- functionparams- params
-
notifyStreamOnPlayStatus
protected void notifyStreamOnPlayStatus(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify OnPlayStatus- Parameters:
pushPublisherSession- session holderfunction- functionparams- params
-
notifyStreamOnStatus
protected void notifyStreamOnStatus(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify StreamOnStatus- Parameters:
pushPublisherSession- session holderfunction- functionparams- params
-
notifyPublishHandlerPlay
protected void notifyPublishHandlerPlay(PushPublishRTMPNetConnectionSession pushPublisherSession, OutputStream out, long[] playSizes) Notify publish handler play- Parameters:
pushPublisherSession- session holderout- output streamplaySizes- play sizes
-
notifySessionIdle
Notify session idle event- Parameters:
pushPublisherSession- session holder
-
notifySessionOpened
Notify session opened- Parameters:
pushPublisherSession- session holder
-
notifySessionClosed
Notify session closed- Parameters:
pushPublisherSession- session holder
-
notifyValidateSession
-
notifyValidateSessionResult
protected void notifyValidateSessionResult(PushPublishRTMPNetConnectionSession pushPublisherSession, boolean result) -
notifyPushPublisherSessionCreate
protected void notifyPushPublisherSessionCreate(PushPublishRTMPNetConnectionSession pushPublisherSession) Notify session create- Parameters:
pushPublisherSession- session holder
-
notifyPushPublisherSessionDestroy
protected void notifyPushPublisherSessionDestroy(PushPublishRTMPNetConnectionSession pushPublisherSession) Notify session destroy- Parameters:
pushPublisherSession- session holder
-
getConnectLastAttempt
public long getConnectLastAttempt()Get timestamp of last connection attempt- Returns:
- timestamp of last connection attempt
-
getConnectAttemptCount
public long getConnectAttemptCount() -
setConnectLastAttempt
public void setConnectLastAttempt(long connectLastAttempt) Set timestamp of last connection attempt- Parameters:
connectLastAttempt- timestamp of last connection attempt
-
bumpReconnectWaitTime
protected void bumpReconnectWaitTime()Bump the reconnect wait time -
getReconnectDelay
protected int getReconnectDelay(long currTime) Get the reconnect delay- Parameters:
currTime- current timestamp- Returns:
- delay in milliseconds
-
getConnectLastSuccess
public long getConnectLastSuccess()Get timestamp of last successful connection- Returns:
- timestamp of last successful connection
-
setConnectLastSuccess
public void setConnectLastSuccess(long connectLastSuccess) Set timestamp of last successful connection- Parameters:
connectLastSuccess- timestamp of last successful connection
-
isSendOriginalTimecodes
public boolean isSendOriginalTimecodes()true if sending the original timecodes of source stream. false if starting at zero.- Returns:
- true if sending the original timecodes of source stream
-
setSendOriginalTimecodes
public void setSendOriginalTimecodes(boolean sendOriginalTimecodes) true if sending the original timecodes of source stream. false if starting at zero.- Parameters:
sendOriginalTimecodes- true if sending the original timecodes of source stream
-
getOriginalTimecodeThreshold
public long getOriginalTimecodeThreshold()Get the original timecode threshold. This value will attempt to reduce the magnitude of absolute timecodes while keeping multiple-bitrate alignment. It is probably best to set this value quite high to a value such as 0x100000. The value is in milliseconds. The following forumla is used to calculate a timecode offset timecodeOffset = timecode - (timecode%originalTimecodeThreshold);- Returns:
- original timecode threshold
-
setOriginalTimecodeThreshold
public void setOriginalTimecodeThreshold(long originalTimecodeThreshold) Set the original timecode threshold. This value will attempt to reduce the magnitude of absolute timecodes while keeping multiple-bitrate alignment. It is probably best to set this value quite high to a value such as 0x100000. The value is in milliseconds. The following forumla is used to calculate a timecode offset timecodeOffset = timecode - (timecode%originalTimecodeThreshold);- Parameters:
originalTimecodeThreshold- original timecode threshold
-
setOriginalTimecodeThreshold
-
isDebugLog
public boolean isDebugLog()Is debug logging turned on- Specified by:
isDebugLogin interfaceIPushPublish- Overrides:
isDebugLogin classPushPublishBase- Returns:
- true if debug logging is turned on
-
setDebugLog
public void setDebugLog(boolean debugLog) Set debug logging- Specified by:
setDebugLogin interfaceIPushPublish- Overrides:
setDebugLogin classPushPublishBase- Parameters:
debugLog- debug logging
-
setStreamDebugLog
public void setStreamDebugLog(boolean debugLog) -
getAppInstance
Get appInstance interface- Overrides:
getAppInstancein classPushPublishBase- Returns:
- appInstance interface
-
setAppInstance
Set appInstance interface- Overrides:
setAppInstancein classPushPublishBase- Parameters:
appInstance- appInstance interface
-
getSrcStreamName
Get source stream name- Specified by:
getSrcStreamNamein interfaceIPushPublish- Overrides:
getSrcStreamNamein classPushPublishBase- Returns:
- source stream name
-
setSrcStreamName
Set source stream name- Specified by:
setSrcStreamNamein interfaceIPushPublish- Overrides:
setSrcStreamNamein classPushPublishBase- Parameters:
srcStreamName- source stream name
-
getDstStreamName
Get destination stream name- Specified by:
getDstStreamNamein interfaceIPushPublish- Overrides:
getDstStreamNamein classPushPublishBase- Returns:
- destination stream name
-
setDstStreamName
Set destination stream name- Specified by:
setDstStreamNamein interfaceIPushPublish- Overrides:
setDstStreamNamein classPushPublishBase- Parameters:
dstStreamName- destination stream name
-
getPort
public int getPort()Get destination server port- Specified by:
getPortin interfaceIPushPublish- Overrides:
getPortin classPushPublishBase- Returns:
- destination server port
-
setPort
public void setPort(int port) Set destination server port- Specified by:
setPortin interfaceIPushPublish- Overrides:
setPortin classPushPublishBase- Parameters:
port- destination server port
-
getDstApplicationName
Get destination application name- Returns:
- destination application name
-
setDstApplicationName
Set destination application name- Parameters:
dstApplicationName- destination application name
-
getDstAppInstanceName
Get destination appInstance name- Returns:
- destination appInstance name
-
setDstAppInstanceName
Set destination appInstance name- Parameters:
dstAppInstanceName- destination appInstance name
-
getRTMPAuthProvider
Get RTMP authentication provider- Returns:
- RTMP authentication provider
-
setRTMPAuthProvider
Set RTMP authentication provider- Parameters:
rtmpAuthProvider- RTMP authentication provider
-
isSendOnMetadata
public boolean isSendOnMetadata()True if sending onMetadata event at start of stream- Returns:
- True if sending onMetadata event at start of stream
-
setSendOnMetadata
public void setSendOnMetadata(boolean sendOnMetadata) True if sending onMetadata event at start of stream- Parameters:
sendOnMetadata- True if sending onMetadata event at start of stream
-
isRemoveDefaultAppInstance
public boolean isRemoveDefaultAppInstance()If true and destination application instance is _definst_ then the application instance name will not be sent to the remove server as part of the connection information.- Returns:
- true if omitting _definst_
-
setRemoveDefaultAppInstance
public void setRemoveDefaultAppInstance(boolean removeDefaultAppInstance) If true and destination application instance is _definst_ then the application instance name will not be sent to the remove server as part of the connection information.- Parameters:
removeDefaultAppInstance- true if omitting _definst_
-
isOnMetadataToSetDataFrame
public boolean isOnMetadataToSetDataFrame()If true all onMetadata events are converted to @setDataFrame calls- Returns:
- true all onMetadata events are converted to @setDataFrame calls
-
setOnMetadataToSetDataFrame
public void setOnMetadataToSetDataFrame(boolean onMetadataToSetDataFrame) If true all onMetadata events are converted to @setDataFrame calls- Parameters:
onMetadataToSetDataFrame- true all onMetadata events are converted to @setDataFrame calls
-
isSendStreamCloseCommands
public boolean isSendStreamCloseCommands()If true will send FCUnpublish, closeStream, deleteStream on disconnect- Returns:
- true will send close commands
-
setSendStreamCloseCommands
public void setSendStreamCloseCommands(boolean sendStreamCloseCommands) If true will send FCUnpublish, closeStream, deleteStream on disconnect- Parameters:
sendStreamCloseCommands- true will send close commands
-
convertDataEvenToAMFData
-
convertOnMetadataToSetDataFrame
-
filterOnMetadataEvent
-
getStreamCloseWaitTime
public int getStreamCloseWaitTime()Get stream close timeout (milliseconds)- Returns:
- stream close timeout (milliseconds)
-
setStreamCloseWaitTime
public void setStreamCloseWaitTime(int streamCloseWaitTime) Set stream close timeout (milliseconds)- Parameters:
streamCloseWaitTime- stream close timeout (milliseconds)
-
disconnect
public void disconnect()Disconnect from server -
disconnect
public void disconnect(boolean hard) -
isFlashVerionFMLE
Returns true if the Flash player version string is a Flash Media Live Encoder version (start with FMLE/ or FME/)- Parameters:
flashVersion- true if Flash Media Live Encoder version- Returns:
- true if flash
-
isFlashVersionFMLE
Returns true if the Flash player version string is a Flash Media Live Encoder version (start with FMLE/ or FME/)- Parameters:
flashVersion- true if Flash Media Live Encoder version- Returns:
- true if flash
-
isDebugPackets
public boolean isDebugPackets()Set to true to log every packet being sent- Returns:
- true to log every packet being sent
-
setDebugPackets
public void setDebugPackets(boolean debugPackets) Set to true to log every packet being sent- Parameters:
debugPackets- true to log every packet being sent
-
getTotalPacketsSent
public long getTotalPacketsSent()Get total number of packets sent during push publishing session- Returns:
- total number of packets sent during push publishing session
-
isResetOnTimecodeOutOfOrder
public boolean isResetOnTimecodeOutOfOrder()Set to true if you wish push to reset if timecodes jump out of order.- Returns:
- true if you wish push to reset if timecodes jump out of order
-
setResetOnTimecodeOutOfOrder
public void setResetOnTimecodeOutOfOrder(boolean resetOnTimecodeOutOfOrder) Set to true if you wish push to reset if timecodes jump out of order.- Parameters:
resetOnTimecodeOutOfOrder- true if you wish push to reset if timecodes jump out of order
-
getTimecodesOutOfOrderThreshold
public int getTimecodesOutOfOrderThreshold() -
setTimecodesOutOfOrderThreshold
public void setTimecodesOutOfOrderThreshold(int timecodesOutOfOrderThreshold) -
getLastVideoTC
public long getLastVideoTC()Get the absolute timecode of the last sent video packet (milliseconds)- Returns:
- absolute timecode of the last sent video packet (milliseconds)
-
getLastVideoKeyFrameTC
public long getLastVideoKeyFrameTC()Get the absolute timecode of the last sent video keyframe packet (milliseconds)- Returns:
- absolute timecode of the last sent video keyframe packet (milliseconds)
-
getLastAudioTC
public long getLastAudioTC()Get the absolute timecode of the last sent audio packet (milliseconds)- Returns:
- absolute timecode of the last sent audio packet (milliseconds)
-
getLastDataTC
public long getLastDataTC()Get the absolute timecode of the last sent data packet (milliseconds)- Returns:
- absolute timecode of the last sent data packet (milliseconds)
-
isOnMetadataReady
-
isWaitOnMetadataAvailable
public boolean isWaitOnMetadataAvailable()Set to true to turn on system that will monitor onMetadata packet and wait for it to be populated before it starts sending the stream. Default is true. If stream is audio or video only, be sure to use setWaitOnMetadataVideo and setWaitOnMetadataAudio to properly turn off the channel you are not using or the system will always timeout.- Returns:
- true to turn on system that will monitor onMetadata packet
-
setWaitOnMetadataAvailable
public void setWaitOnMetadataAvailable(boolean waitOnMetadataAvailable) Set to true to turn on system that will monitor onMetadata packet and wait for it to be populated before it starts sending the stream. Default is true. If stream is audio or video only, be sure to use setWaitOnMetadataVideo and setWaitOnMetadataAudio to properly turn off the channel you are not using or the system will always timeout.- Parameters:
waitOnMetadataAvailable- true to turn on system that will monitor onMetadata packet
-
isWaitOnMetadataVideo
public boolean isWaitOnMetadataVideo()If true and waitOnMetadataAvailable, publishing will not start until onMetadata packet is populated with video data.- Returns:
- publishing will not start until onMetadata packet is populated with video data
-
setWaitOnMetadataVideo
public void setWaitOnMetadataVideo(boolean waitOnMetadataVideo) If true and waitOnMetadataAvailable, publishing will not start until onMetadata packet is populated with video data.- Parameters:
waitOnMetadataVideo- publishing will not start until onMetadata packet is populated with video data
-
isWaitOnMetadataAudio
public boolean isWaitOnMetadataAudio()If true and waitOnMetadataAvailable, publishing will not start until onMetadata packet is populated with audio data.- Returns:
- publishing will not start until onMetadata packet is populated with audio data
-
setWaitOnMetadataAudio
public void setWaitOnMetadataAudio(boolean waitOnMetadataAudio) If true and waitOnMetadataAvailable, publishing will not start until onMetadata packet is populated with audio data.- Parameters:
waitOnMetadataAudio- publishing will not start until onMetadata packet is populated with audio data
-
getWaitOnMetadataTimeout
public long getWaitOnMetadataTimeout()Timeout (milliseconds) that the wait on onMetadata system will wait looking for video and audio data to be populated.- Returns:
- timeout (milliseconds) that the wait on onMetadata system will wait looking for video and audio data to be populated
-
setWaitOnMetadataTimeout
public void setWaitOnMetadataTimeout(long waitOnMetadataTimeout) Timeout (milliseconds) that the wait on onMetadata system will wait looking for video and audio data to be populated.- Parameters:
waitOnMetadataTimeout- timeout (milliseconds) that the wait on onMetadata system will wait looking for video and audio data to be populated
-
isWaitOnMetadataVideoDatarate
public boolean isWaitOnMetadataVideoDatarate() -
setWaitOnMetadataVideoDatarate
public void setWaitOnMetadataVideoDatarate(boolean waitOnMetadataVideoDatarate) -
isWaitOnMetadataAudioDatarate
public boolean isWaitOnMetadataAudioDatarate() -
setWaitOnMetadataAudioDatarate
public void setWaitOnMetadataAudioDatarate(boolean waitOnMetadataAudioDatarate) -
getSrcStreamBufferSize
public long getSrcStreamBufferSize()The amount of audio/video in milliseconds that must be available in the source streams buffer before push publishing will being.- Returns:
- amount of audio/video in milliseconds that must be available
-
setSrcStreamBufferSize
public void setSrcStreamBufferSize(long srcStreamBufferSize) The amount of audio/video in milliseconds that must be available in the source streams buffer before push publishing will being.- Parameters:
srcStreamBufferSize- amount of audio/video in milliseconds that must be available
-
addConnectMetaData
Added metadata values to the connect metadata object- Parameters:
key- keyvalue- AMFDataObj value
-
createPushPublishSession
- Specified by:
createPushPublishSessionin interfaceIPushPublish- Overrides:
createPushPublishSessionin classPushPublishBase
-
getPacketsSentAudio
public long getPacketsSentAudio() -
getPacketsSentVideo
public long getPacketsSentVideo() -
getPacketsSentVideoKeyFrame
public long getPacketsSentVideoKeyFrame() -
getPacketsSentData
public long getPacketsSentData() -
isSSL
public boolean isSSL() -
setSSL
public void setSSL(boolean isSSL) -
getBindAddress
-
setBindAddress
-
getConnectedState
public int getConnectedState() -
getMessagesAttemptedCount
public long getMessagesAttemptedCount() -
getMessagesRetriedCount
public long getMessagesRetriedCount() -
getMessagesFailedCount
public long getMessagesFailedCount() -
getSyncTimecode
public long getSyncTimecode() -
setSyncTimecode
public void setSyncTimecode(long syncTimecode) -
getSyncPacketType
public int getSyncPacketType() -
setSyncPacketType
public void setSyncPacketType(int syncPacketType) -
getOnMetadataFilter
public long getOnMetadataFilter() -
setOnMetadataFilter
public void setOnMetadataFilter(long onMetadataFilter) -
addOnMetadataItemToRemove
-
putOnMetadataItemToAdd
-
getOriginalTimecodeOffset
public long getOriginalTimecodeOffset() -
setOriginalTimecodeOffset
public void setOriginalTimecodeOffset(long originalTimecodeOffset)
-