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 String
protected Integer
protected String
protected String
protected String
float[]
static final Class<PushPublishRTMP>
static final String
protected long
protected String
protected String
protected String
protected long
protected PushPublishRTMP.STATE
protected String
protected int
protected long
protected long
static final String
static final String
protected long
protected boolean
protected boolean
protected String
protected String
protected String
protected Map<org.apache.mina.common.IoSession,
PushPublishRTMPNetConnectionSession> protected boolean
protected boolean
protected long
protected long
protected long
protected long
protected long
protected long
protected List<IPushPublishRTMPNotify>
protected Object
protected Map<INetConnection,
PushPublishRTMPNetConnectionSession> long
long
protected long
protected boolean
protected long
protected long
int
protected long
protected long
protected long
protected long
protected boolean
protected String
protected boolean
protected boolean
protected IPushPublishRTMPAuthProvider
protected boolean
protected String
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected boolean
protected long
protected List<PushPublishRTMPNetConnectionSession>
protected long
protected int
protected int
protected long
protected int
protected long
protected boolean
protected boolean
protected long
protected boolean
protected boolean
protected boolean
protected boolean
protected long
protected long
protected boolean
protected boolean
Fields 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, userName
Fields 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 TypeMethodDescriptionvoid
addConnectMetaData
(String key, AMFData value) Added metadata values to the connect metadata objectvoid
addListener
(IPushPublishRTMPNotify listener) Add IPushPublishRTMPNotify listenervoid
void
addSession
(PushPublishRTMPNetConnectionSession sessionHolder) Add sessionprotected void
Bump the reconnect wait timeprotected void
callConnect
(PushPublishRTMPNetConnectionSession pushPublisherSession, String addQueryStr) Internal connectvoid
connect()
Connect to serverconvertDataEvenToAMFData
(AMFPacket packet) protected PushPublishRTMPNetConnectionPublisher
createNetConnectionPublisher
(PushPublishRTMPNetConnectionSession pushPublisherSession) void
Disconnect from servervoid
disconnect
(boolean hard) filterOnMetadataEvent
(AMFPacket packet, long flags, List<String> itemsToRemove, Map<String, AMFData> itemsToAdd) Get Akamai Origin IPint
Get Akamai Origin PortGet Akamai passwordgetAkamaiSessionKey
(String sessionId) Get Akamai session keyGet Akamai user nameGet appInstance interfacelong
int
Get 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 metadataint
Get the connection timeout (milliseconds)long
Get timestamp of last connection attemptlong
Get 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")long
Get the absolute timecode of the last sent audio packet (milliseconds)long
Get the absolute timecode of the last sent data packet (milliseconds)Get the last session interfacelong
Get the absolute timecode of the last sent video keyframe packet (milliseconds)long
Get the absolute timecode of the last sent video packet (milliseconds)protected List<IPushPublishRTMPNotify>
Get a list of IPushPublishRTMPNotify listenersgetLock()
Get the synchronization locklong
long
long
Get the underlying INetConnection interface for this sessionlong
long
long
Get the original timecode threshold.long
long
long
long
int
getPort()
Get destination server portGet the queryStringprotected int
getReconnectDelay
(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 sessionlong
The amount of audio/video in milliseconds that must be available in the source streams buffer before push publishing will being.Get source stream nameint
Get stream close timeout (milliseconds)int
long
int
long
Get total number of packets sent during push publishing sessionlong
Get connection validation frequency (millisecond).long
Timeout (milliseconds) that the wait on onMetadata system will wait looking for video and audio data to be populated.protected org.apache.mina.common.IoSession
internalConnect
(PushPublishRTMPNetConnectionSession pushPublisherSession) Internal connect methodboolean
isCurrentSession
(org.apache.mina.common.IoSession session) Test to see if passed in session is current sessionboolean
Is debug logging turned onboolean
Set to true to log every packet being sentstatic boolean
isFlashVerionFMLE
(String flashVersion) Returns true if the Flash player version string is a Flash Media Live Encoder version (start with FMLE/ or FME/)static boolean
isFlashVersionFMLE
(String flashVersion) Returns true if the Flash player version string is a Flash Media Live Encoder version (start with FMLE/ or FME/)protected boolean
isOnMetadataReady
(IMediaStream stream, AMFPacket packet) boolean
If true all onMetadata events are converted to @setDataFrame callsboolean
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.boolean
Set to true if you wish push to reset if timecodes jump out of order.boolean
If true call FCAnnounce(streamName) after connecting to serverboolean
If true call FCPublish(streamName) after connecting to serverboolean
True if sending onMetadata event at start of streamboolean
true if sending the original timecodes of source stream.boolean
If true call releaseStream(streamName) after connecting to serverboolean
If true will send FCUnpublish, closeStream, deleteStream on disconnectboolean
isSSL()
boolean
If true and waitOnMetadataAvailable, publishing will not start until onMetadata packet is populated with audio data.boolean
boolean
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.boolean
If true and waitOnMetadataAvailable, publishing will not start until onMetadata packet is populated with video data.boolean
protected void
notifyAkamaiClientLogin
(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify Akamai ClientLoginprotected void
notifyAkamaiSetChallenge
(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify Akamai SetChallengeprotected void
notifyAkamaiSetOriginConnectionInfo
(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify Akamai SetOriginConnectionInfoprotected void
notifyConnect
(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify connectprotected void
notifyConnectFailure
(PushPublishRTMPNetConnectionSession pushPublisherSession) Notify connect failureprotected void
notifyConnectStart
(PushPublishRTMPNetConnectionSession pushPublisherSession) Notify connect startprotected void
notifyConnectSuccess
(PushPublishRTMPNetConnectionSession pushPublisherSession) Notify connect successprotected void
notifyFCAnnounce
(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify FCAnnounceprotected void
notifyFCPublish
(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify FCPublishprotected void
notifyHandshakeResult
(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify handshake resultprotected void
notifyPublishHandlerPlay
(PushPublishRTMPNetConnectionSession pushPublisherSession, OutputStream out, long[] playSizes) Notify publish handler playprotected void
notifyPushPublisherSessionCreate
(PushPublishRTMPNetConnectionSession pushPublisherSession) Notify session createprotected void
notifyPushPublisherSessionDestroy
(PushPublishRTMPNetConnectionSession pushPublisherSession) Notify session destroyprotected void
notifySessionClosed
(PushPublishRTMPNetConnectionSession pushPublisherSession) Notify session closedprotected void
notifySessionIdle
(PushPublishRTMPNetConnectionSession pushPublisherSession) Notify session idle eventprotected void
notifySessionOpened
(PushPublishRTMPNetConnectionSession pushPublisherSession) Notify session openedprotected void
notifyStreamCreate
(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify stream createprotected void
notifyStreamOnPlayStatus
(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify OnPlayStatusprotected void
notifyStreamOnStatus
(PushPublishRTMPNetConnectionSession pushPublisherSession, com.wowza.wms.request.RequestFunction function, AMFDataList params) Notify StreamOnStatusprotected void
notifyValidateSession
(PushPublishRTMPNetConnectionSession pushPublisherSession) protected void
notifyValidateSessionResult
(PushPublishRTMPNetConnectionSession pushPublisherSession, boolean result) void
putOnMetadataItemToAdd
(String name, AMFData value) boolean
removeListener
(IPushPublishRTMPNotify listener) rempve IPushPublishRTMPNotify listenervoid
removeSession
(PushPublishRTMPNetConnectionSession sessionHolder) Remove sessionvoid
Reset server connectionvoid
resetConnection
(boolean noDelay) Reset server connectionvoid
sessionClosed
(org.apache.mina.common.IoSession session) Internal callbackvoid
sessionOpened
(org.apache.mina.common.IoSession session) Internal callbackvoid
setAkamaiOriginIp
(String akamaiOriginIp) Set Akamai Origin IPvoid
setAkamaiOriginPort
(int akamaiOriginPort) Set Akamai Origin Portvoid
setAkamaiPassword
(String akamaiPassword) Set Akamai passwordvoid
setAkamaiUserName
(String akamaiUserName) Set Akamai user namevoid
setAppInstance
(IApplicationInstance appInstance) Set appInstance interfacevoid
setBindAddress
(String bindAddress) void
setConnectionFlashVerion
(String connectionFlashVersion) Set Flash version used in connection metadatavoid
setConnectionFlashVersion
(String connectionFlashVersion) Set Flash version used in connection metadatavoid
setConnectionPageURL
(String connectionPageURL) Set Page URL used in connection metadatavoid
setConnectionQueryStr
(String connectionQueryStr) Set the connection query stringvoid
setConnectionSwfURL
(String connectionSwfURL) Set SWF URL used in connection metadatavoid
setConnectionTimeout
(int connectionTimeout) Set the connection timeout (milliseconds)void
setConnectLastAttempt
(long connectLastAttempt) Set timestamp of last connection attemptvoid
setConnectLastSuccess
(long connectLastSuccess) Set timestamp of last successful connectionvoid
setDebugLog
(boolean debugLog) Set debug loggingvoid
setDebugPackets
(boolean debugPackets) Set to true to log every packet being sentvoid
setDstAppInstanceName
(String dstAppInstanceName) Set destination appInstance namevoid
setDstApplicationName
(String dstApplicationName) Set destination application namevoid
setDstStreamName
(String dstStreamName) Set destination stream namevoid
setHowToPublish
(String howToPublish) Set the howToPublish string (valid values are "live", "record" and "append")void
setOnMetadataFilter
(long onMetadataFilter) void
setOnMetadataToSetDataFrame
(boolean onMetadataToSetDataFrame) If true all onMetadata events are converted to @setDataFrame callsvoid
setOriginalTimecodeOffset
(long originalTimecodeOffset) void
setOriginalTimecodeThreshold
(long originalTimecodeThreshold) Set the original timecode threshold.void
void
setPort
(int port) Set destination server portvoid
setQueryString
(String queryString) Set the queryString, as set in the map filevoid
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.void
setResetOnTimecodeOutOfOrder
(boolean resetOnTimecodeOutOfOrder) Set to true if you wish push to reset if timecodes jump out of order.void
setRTMPAuthProvider
(IPushPublishRTMPAuthProvider rtmpAuthProvider) Set RTMP authentication providervoid
setSecureTokenSharedSecret
(String secureTokenSharedSecret) Set SecureToken shared secretvoid
setSendFCAnnounce
(boolean sendFCAnnounce) If true call FCAnnounce(streamName) after connecting to servervoid
setSendFCPublish
(boolean sendFCPublish) If true call FCPublish(streamName) after connecting to servervoid
setSendOnMetadata
(boolean sendOnMetadata) True if sending onMetadata event at start of streamvoid
setSendOriginalTimecodes
(boolean sendOriginalTimecodes) true if sending the original timecodes of source stream.void
setSendReleaseStream
(boolean sendReleaseStream) If true call releaseStream(streamName) after connecting to servervoid
setSendStreamCloseCommands
(boolean sendStreamCloseCommands) If true will send FCUnpublish, closeStream, deleteStream on disconnectvoid
setSrcStreamBufferSize
(long srcStreamBufferSize) The amount of audio/video in milliseconds that must be available in the source streams buffer before push publishing will being.void
setSrcStreamName
(String srcStreamName) Set source stream namevoid
setSSL
(boolean isSSL) void
setStreamCloseWaitTime
(int streamCloseWaitTime) Set stream close timeout (milliseconds)void
setStreamDebugLog
(boolean debugLog) void
setSyncPacketType
(int syncPacketType) void
setSyncTimecode
(long syncTimecode) void
setTimecodesOutOfOrderThreshold
(int timecodesOutOfOrderThreshold) void
setValidationFrequency
(long validationFrequency) Set connection validation frequency (millisecond).void
setWaitOnMetadataAudio
(boolean waitOnMetadataAudio) If true and waitOnMetadataAvailable, publishing will not start until onMetadata packet is populated with audio data.void
setWaitOnMetadataAudioDatarate
(boolean waitOnMetadataAudioDatarate) 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.void
setWaitOnMetadataTimeout
(long waitOnMetadataTimeout) Timeout (milliseconds) that the wait on onMetadata system will wait looking for video and audio data to be populated.void
setWaitOnMetadataVideo
(boolean waitOnMetadataVideo) If true and waitOnMetadataAvailable, publishing will not start until onMetadata packet is populated with video data.void
setWaitOnMetadataVideoDatarate
(boolean waitOnMetadataVideoDatarate) protected void
tryToConnect
(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:
getContextStr
in interfaceIPushPublish
- Specified by:
getContextStr
in 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:
isDebugLog
in interfaceIPushPublish
- Overrides:
isDebugLog
in classPushPublishBase
- Returns:
- true if debug logging is turned on
-
setDebugLog
public void setDebugLog(boolean debugLog) Set debug logging- Specified by:
setDebugLog
in interfaceIPushPublish
- Overrides:
setDebugLog
in classPushPublishBase
- Parameters:
debugLog
- debug logging
-
setStreamDebugLog
public void setStreamDebugLog(boolean debugLog) -
getAppInstance
Get appInstance interface- Overrides:
getAppInstance
in classPushPublishBase
- Returns:
- appInstance interface
-
setAppInstance
Set appInstance interface- Overrides:
setAppInstance
in classPushPublishBase
- Parameters:
appInstance
- appInstance interface
-
getSrcStreamName
Get source stream name- Specified by:
getSrcStreamName
in interfaceIPushPublish
- Overrides:
getSrcStreamName
in classPushPublishBase
- Returns:
- source stream name
-
setSrcStreamName
Set source stream name- Specified by:
setSrcStreamName
in interfaceIPushPublish
- Overrides:
setSrcStreamName
in classPushPublishBase
- Parameters:
srcStreamName
- source stream name
-
getDstStreamName
Get destination stream name- Specified by:
getDstStreamName
in interfaceIPushPublish
- Overrides:
getDstStreamName
in classPushPublishBase
- Returns:
- destination stream name
-
setDstStreamName
Set destination stream name- Specified by:
setDstStreamName
in interfaceIPushPublish
- Overrides:
setDstStreamName
in classPushPublishBase
- Parameters:
dstStreamName
- destination stream name
-
getPort
public int getPort()Get destination server port- Specified by:
getPort
in interfaceIPushPublish
- Overrides:
getPort
in classPushPublishBase
- Returns:
- destination server port
-
setPort
public void setPort(int port) Set destination server port- Specified by:
setPort
in interfaceIPushPublish
- Overrides:
setPort
in 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:
createPushPublishSession
in interfaceIPushPublish
- Overrides:
createPushPublishSession
in 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)
-