Class PushPublishHTTPCupertino
- Object
-
- com.wowza.wms.pushpublish.model.PushPublishBase
-
- com.wowza.wms.pushpublish.model.PushPublishHTTPBase
-
- com.wowza.wms.pushpublish.protocol.cupertino.PushPublishHTTPCupertino
-
- All Implemented Interfaces:
IPushPublish
,IPushPublishHTTPGroupMember
,IPushPublishHTTPOutputBuilder
,IPushPublishHTTPCupertino
- Direct Known Subclasses:
PushPublishHTTPCupertinoAkamaiHandler
,PushPublishHTTPCupertinoCloudStorageHandler
,PushPublishHTTPCupertinoGoogleHandler
public abstract class PushPublishHTTPCupertino extends PushPublishHTTPBase implements IPushPublishHTTPCupertino, IPushPublishHTTPGroupMember, IPushPublishHTTPOutputBuilder
-
-
Field Summary
-
Fields inherited from class com.wowza.wms.pushpublish.model.PushPublishHTTPBase
CACHE_CONTROL_FACTOR, CACHE_CONTROL_HEADER, CACHE_CONTROL_HEADER_KEY, CACHE_CONTROL_HEADER_NONE, CACHE_CONTROL_MEDIA_DEFAULT, httpLogManifests, httpManifestDebug, INDETERMINATE_PLAYLIST_COUNT, maxSegmentCountFromMap, maxSegmentCountFromPacketizer, MIN_PLAYLIST_COUNT, playlistAcrossSessions, playlistBaseUrl, playlistCountFromMap, playlistCountFromPacketizer, playlistCrossName, playlistDurationFromMap, playlistMap, playlistName, playlistTimeout, relativePlaylists
-
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_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
-
Fields inherited from interface com.wowza.wms.pushpublish.model.IPushPublishHTTPOutputBuilder
PUSHER_ERROR_LIVEPACKETIZER_NOT_CONFIGURED, PUSHER_ERROR_RENDITIONS_MISCONFIGURED
-
-
Constructor Summary
Constructors Constructor Description PushPublishHTTPCupertino()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Boolean
adaptiveGroupPlaylistNeedsUpdating(long lastUpdateTime, java.util.List<java.util.List<IPushPublishHTTPGroupMember>> groupingsByRedundantPairs, java.util.List<java.util.List<IPushPublishHTTPGroupMember>> groupingsByAbrGroups)
protected void
addPlaylistToMasterPlaylist(int rIndex, com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerApplicationContextCupertinoStreamer appContext, PlaylistModel mediaPlaylist, PlaylistModel masterPlaylist)
protected void
addTagToPlaylist(PlaylistModel playlist, int idx, TagModel tag)
Adds the provided TagModel to the list of TagModels at the idx for the provided Playlist Modelprotected void
addTagToPlaylist(PlaylistModel playlist, TagModel tag)
Adds the provided TagModel to the end of the list of TagModels for the provided Playlist Modelvoid
connect()
ManifestModel
createGroupPlaylist(String id, java.util.List<java.util.List<IPushPublishHTTPGroupMember>> groupingsByRedundantPairs, java.util.List<java.util.List<IPushPublishHTTPGroupMember>> groupingsByAbrGroups, IApplicationInstance appInstance, String context, WMSProperties properties)
Creates a group playlist.protected PlaylistModel
createMasterPlaylist(com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerApplicationContextCupertinoStreamer appContext)
Creates a master playlist and propagates the context string from this implementation to the returned playlist modelprotected PlaylistModel
createMediaPlaylist(int rIndex)
Creates a empty media playlist and propagates the context from this implemenation to the returned playlistprotected MediaSegmentModel
createMediaSegmentModel()
Creates an empty media segment model and propagates the context from the implementation to the returnd media segment modelPushPublishHTTPOutputItem
createOutputItem(ILiveStreamPacketizer liveStreamPacketizer, int lastChunkIndex)
protected TagModel
createStreamInfTag(int rendition, com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerApplicationContextCupertinoStreamer appContext, ILiveStreamPacketizerCupertino liveStreamPacketizer)
protected TagModel
createTag(Class<? extends TagModel> clazz)
Create a TagModel of the provided TagModelvoid
disconnect()
void
disconnect(boolean hard)
void
error(int errorCode)
int
getChunkDurationTarget(ILiveStreamPacketizer liveStreamPacketizer)
int
getConnectedState()
String
getContextStr()
abstract String
getDestionationLogData()
Get a JSON formatted string of data that represents the destination to include with the connect/disconnect loggingString
getGroupPlaylistRenditionDescription(boolean forABRPlaylist)
Generates a description or playlist-element String which can be used to differentiate this rendition from other renditions in a group.protected MediaSegmentModel
getHeaderSegment(int rIndex)
(Internal-use) Created to be overriden by CMAF coreint
getLastChunkId(ILiveStreamPacketizer liveStreamPacketizer)
protected ILiveStreamPacketizerCupertino
getLiveStreamPacketizerCupertino(ILiveStreamPacketizer liveStreamPacketizer)
String
getLiveStreamPacketizerName()
protected PlaylistModel
getMediaPlaylistForRendtion(int rIndex, PlaylistModel masterPlaylist)
(Meant for internal use)String
getMediaPlaylistPlaybackURL(int rendition)
protected java.util.Map<Integer,PlaylistModel>
getMediaPlaylists(int rIndex, PlaylistModel masterPlaylist, com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerApplicationContextCupertinoStreamer appContext, int lastChunkIndex)
(internal) Used bycreateOutputItem(ILiveStreamPacketizer, int)
This will be overriden by CMAF HLS to handle AUDIO VIDEO casesprotected String
getMediaPlaylistStr(int rIndex)
long
getMessagesAttemptedCount()
long
getMessagesFailedCount()
long
getMessagesRetriedCount()
Object
getPacketizerLock(ILiveStreamPacketizer liveStreamPacketizer)
int
getPlaylistCount()
Get the playlist count.WMSProperties
getPlaylistProperties()
String
getRandomSessionStr()
Gets a random session string that lives for the life time of the currently published stream.String
getRenditionsStr()
void
init(IApplicationInstance appInstance, String streamName, IMediaStream stream, java.util.Map<String,String> profileData, java.util.Map<String,String> maps, com.wowza.wms.pushpublish.manager.IPushPublisher pushPublisher, boolean streamDebug)
Inits the instance.Boolean
isGroupReady(java.util.List<java.util.List<IPushPublishHTTPGroupMember>> groupingsByRedundantPairs, java.util.List<java.util.List<IPushPublishHTTPGroupMember>> groupingsByAbrGroups)
boolean
isInRedundancyPair()
protected boolean
isRendition(int rendition)
void
load(java.util.HashMap<String,String> dataMap)
Loads map and profile parametersprotected void
loadMediaSegment(MediaSegmentModel mediaSegment, IMediaSegment chunk)
void
outputSend(PushPublishHTTPOutputItem outputItem)
protected PlaylistModel
prepareMediaPlaylist(PlaylistModel masterPlaylist, com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerApplicationContextCupertinoStreamer appContext, int lastChunkIndex, int rIndex, int chunkRendition)
String
printPlaylist(PlaylistModel playlist)
Will print the provided playlist to a String.protected void
processPlaylistChunks(int rIndex, int playlistChunksToProcess, int playlistChunkStartIndex, int lastChunkIndex, PlaylistModel livePacketizerMediaPlaylist, boolean isCustomChunkId, PlaylistModel mediaPlaylist)
protected int
renditionIndexToRendition(int renditionIndex)
protected int
renditionToPacketizerRendition(int rendition)
protected int
renditionToRenditionIndex(int rendition)
void
resetConnection()
void
resetNewPacketizer(ILiveStreamPacketizer liveStreamPacketizer)
void
sendGroupPlaylist(String groupName, ManifestModel manifest)
Sends a group playlist to the destination.protected void
setLiveStreamPacketizer(ILiveStreamPacketizer liveStreamPacketizer)
void
setRenditionsStr(String renditionsStr)
protected String
writeTagToString(TagModel tag)
Writes the tag contents out to a string in UTF-8 encoding to a String-
Methods inherited from class com.wowza.wms.pushpublish.model.PushPublishHTTPBase
getAdaptiveGroupName, getMaxSegmentCount, getPlaylistBaseUrl, getPlaylistMap, getPlaylistTimeout, isInAdaptiveGroup, isLogDebugManifest, isPlaylistAcrossSessions, isRelativePlaylists, logDebugManifest, setAdaptiveGroupName, setMaxSegmentCountFromMap, setMaxSegmentCountFromPacketizer, setPlaylistAcrossSessions, setPlaylistBaseUrl, setPlaylistCountFromMap, setPlaylistCountFromPacketizer, setPlaylistTimeout, setRelativePlaylists
-
Methods inherited from class com.wowza.wms.pushpublish.model.PushPublishBase
add, addIOPerformance2, clearLoggingValues, createPushPublishSession, getAppInstance, getBandwidth, getBaseParams, getDestinationID, getDestinationName, getDestinationServer, getDstStreamName, getEntryName, getHostname, getImplementation, getInetAddr, getMap, getMessagesOutBytes, getMessagesOutCount, getPassword, getPlaybackHostname, getPort, getProfile, getProperties, getPushPublishType, getReconnectWaitTime, getSrcStream, getSrcStreamName, getUserName, getWowzaStreamingEngineVersionStr, incrementMessagesOut, isAdaptiveStreaming, isDebugLog, isExternalRedundancy, logDebug, logError, logError, logError, logInfo, logWarn, resolveHostName, setAdaptiveStreaming, setAdaptiveStreaming, setAppInstance, setDebugLog, setDestinationName, setDestinationServer, setDestinationServer, setDstStreamName, setEntryName, setExternalRedundancy, setExternalRedundancy, setHost, setHostname, setImplementation, setInetAddr, setPassword, setPlaybackHostname, setPort, setPort, setProfile, setReconnectWaitTime, setSrcStream, setSrcStreamName, setStreamName, setUserName, updateLoggingValues, updateUsageTracker
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.wowza.wms.pushpublish.protocol.cupertino.IPushPublishHTTPCupertino
deleteMediaSegment, isSendToBackupServer, outputClose, outputOpen, sendGroupMasterPlaylist, sendMasterPlaylist, sendMediaPlaylist, sendMediaSegment, setSendToBackupServer, updateGroupMasterPlaylistPlaybackURI, updateMasterPlaylistPlaybackURI, updateMediaPlaylistPlaybackURI, updateMediaSegmentPlaybackURI
-
Methods inherited from interface com.wowza.wms.pushpublish.model.IPushPublishHTTPGroupMember
getAdaptiveGroupName, isInAdaptiveGroup, isLogDebugManifest, isSendToBackupServer
-
Methods inherited from interface com.wowza.wms.pushpublish.model.IPushPublishHTTPOutputBuilder
getAppInstance, getDstStreamName, getSrcStreamName, isDebugLog, outputClose, outputOpen
-
-
-
-
Field Detail
-
PLAYLISTNAME
public static final String PLAYLISTNAME
- See Also:
- Constant Field Values
-
liveStreamPacketizerCupertino
protected ILiveStreamPacketizerCupertino liveStreamPacketizerCupertino
-
CHUNKLISTNAME_AUDIOVIDEO
public static final String CHUNKLISTNAME_AUDIOVIDEO
- See Also:
- Constant Field Values
-
CHUNKLISTNAME_AUDIOONLY
public static final String CHUNKLISTNAME_AUDIOONLY
- See Also:
- Constant Field Values
-
CHUNKLISTNAME_VIDEOONLY
public static final String CHUNKLISTNAME_VIDEOONLY
- See Also:
- Constant Field Values
-
CHUNKLISTNAME_KEYFRAMEONLY
public static final String CHUNKLISTNAME_KEYFRAMEONLY
- See Also:
- Constant Field Values
-
SUBTITLELISTNAME
public static final String SUBTITLELISTNAME
- See Also:
- Constant Field Values
-
CHUNKLISTNAMES
public static final String[] CHUNKLISTNAMES
-
RENDITIONINDEX_AUDIOVIDEO
public static final int RENDITIONINDEX_AUDIOVIDEO
- See Also:
- Constant Field Values
-
RENDITIONINDEX_AUDIOONLY
public static final int RENDITIONINDEX_AUDIOONLY
- See Also:
- Constant Field Values
-
RENDITIONINDEX_VIDEOONLY
public static final int RENDITIONINDEX_VIDEOONLY
- See Also:
- Constant Field Values
-
RENDITIONINDEX_KEYFRAMEONLY
public static final int RENDITIONINDEX_KEYFRAMEONLY
- See Also:
- Constant Field Values
-
RENDITIONINDEX_SUBTITLES
public static final int RENDITIONINDEX_SUBTITLES
- See Also:
- Constant Field Values
-
RENDITIONINDEX_COUNT
public static final int RENDITIONINDEX_COUNT
- See Also:
- Constant Field Values
-
RENDITION_AUDIOVIDEO
public static final int RENDITION_AUDIOVIDEO
- See Also:
- Constant Field Values
-
RENDITION_AUDIOONLY
public static final int RENDITION_AUDIOONLY
- See Also:
- Constant Field Values
-
RENDITION_VIDEOONLY
public static final int RENDITION_VIDEOONLY
- See Also:
- Constant Field Values
-
RENDITION_KEYFRAMEONLY
public static final int RENDITION_KEYFRAMEONLY
- See Also:
- Constant Field Values
-
RENDITION_SUBTITLES
public static final int RENDITION_SUBTITLES
- See Also:
- Constant Field Values
-
chunkDurationTarget
protected int chunkDurationTarget
-
addEndListOnDisconnect
protected boolean addEndListOnDisconnect
-
keepMediaSegmentDataAfterSending
protected boolean keepMediaSegmentDataAfterSending
-
pusher
protected PushPublishHTTPPusher pusher
-
minNumToSend
protected int minNumToSend
Normal amount of chunks to be sent on one outputSend. If we find a number higher than this, it will be logged as a warning
-
minNumToDelete
protected int minNumToDelete
Normal amount of chunks to be deleted on one outputSend. If we find a number higher than this, it will be logged as a warning
-
-
Method Detail
-
init
public void init(IApplicationInstance appInstance, String streamName, IMediaStream stream, java.util.Map<String,String> profileData, java.util.Map<String,String> maps, com.wowza.wms.pushpublish.manager.IPushPublisher pushPublisher, boolean streamDebug)
Description copied from class:PushPublishHTTPBase
Inits the instance.- Specified by:
init
in interfaceIPushPublish
- Overrides:
init
in classPushPublishHTTPBase
- Parameters:
appInstance
- the app instancestreamName
- the source stream nameprofileData
- the profile paramsmaps
- the map entry paramsstreamDebug
- stream debug flag
-
getPlaylistCount
public int getPlaylistCount()
Description copied from class:PushPublishHTTPBase
Get the playlist count. The value from the map file is returned if defined, else the packetizer value is returned return the playlist count- Overrides:
getPlaylistCount
in classPushPublishHTTPBase
-
load
public void load(java.util.HashMap<String,String> dataMap)
Description copied from class:PushPublishHTTPBase
Loads map and profile parameters- Overrides:
load
in classPushPublishHTTPBase
- Parameters:
dataMap
- the data map
-
createOutputItem
public final PushPublishHTTPOutputItem createOutputItem(ILiveStreamPacketizer liveStreamPacketizer, int lastChunkIndex)
- Specified by:
createOutputItem
in interfaceIPushPublishHTTPOutputBuilder
-
getMediaPlaylists
protected java.util.Map<Integer,PlaylistModel> getMediaPlaylists(int rIndex, PlaylistModel masterPlaylist, com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerApplicationContextCupertinoStreamer appContext, int lastChunkIndex) throws java.net.URISyntaxException
(internal) Used bycreateOutputItem(ILiveStreamPacketizer, int)
This will be overriden by CMAF HLS to handle AUDIO VIDEO cases- Parameters:
rIndex
- specified playlist rendition to be preparedmasterPlaylist
- current master playlist being createdappContext
- HTTPStreamerApplicationContextCupertinoStreamer initilaized in parent functionlastChunkIndex
- last chunk index passed from parent function- Returns:
- map with playlists generated for the specified playlistRendition
- Throws:
java.net.URISyntaxException
-
prepareMediaPlaylist
protected PlaylistModel prepareMediaPlaylist(PlaylistModel masterPlaylist, com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerApplicationContextCupertinoStreamer appContext, int lastChunkIndex, int rIndex, int chunkRendition) throws java.net.URISyntaxException
- Throws:
java.net.URISyntaxException
-
processPlaylistChunks
protected void processPlaylistChunks(int rIndex, int playlistChunksToProcess, int playlistChunkStartIndex, int lastChunkIndex, PlaylistModel livePacketizerMediaPlaylist, boolean isCustomChunkId, PlaylistModel mediaPlaylist) throws java.net.URISyntaxException
- Throws:
java.net.URISyntaxException
-
getHeaderSegment
protected MediaSegmentModel getHeaderSegment(int rIndex) throws java.net.URISyntaxException
(Internal-use) Created to be overriden by CMAF core- Parameters:
rIndex
- PushPublishHTTPCupertino rendition index- Returns:
- MediaSegmentModel containing the header used for this rendition
- Throws:
java.net.URISyntaxException
- on invalid segment URIs
-
loadMediaSegment
protected void loadMediaSegment(MediaSegmentModel mediaSegment, IMediaSegment chunk)
-
addPlaylistToMasterPlaylist
protected void addPlaylistToMasterPlaylist(int rIndex, com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerApplicationContextCupertinoStreamer appContext, PlaylistModel mediaPlaylist, PlaylistModel masterPlaylist)
-
getMediaPlaylistForRendtion
protected PlaylistModel getMediaPlaylistForRendtion(int rIndex, PlaylistModel masterPlaylist)
(Meant for internal use)- Parameters:
languageId
-rIndex
- rendtion indexmasterPlaylist
-PlaylistModel
playlist to search- Returns:
- The already generated
PlaylistModel
for this rendition or a new emptyPlaylistModel
in case it doesnt exist
-
getMediaPlaylistStr
protected String getMediaPlaylistStr(int rIndex)
-
outputSend
public final void outputSend(PushPublishHTTPOutputItem outputItem)
- Specified by:
outputSend
in interfaceIPushPublishHTTPOutputBuilder
-
getContextStr
public String getContextStr()
- Specified by:
getContextStr
in interfaceIPushPublish
- Specified by:
getContextStr
in classPushPublishBase
-
resetNewPacketizer
public void resetNewPacketizer(ILiveStreamPacketizer liveStreamPacketizer)
- Specified by:
resetNewPacketizer
in interfaceIPushPublishHTTPOutputBuilder
-
error
public void error(int errorCode)
- Specified by:
error
in interfaceIPushPublishHTTPOutputBuilder
-
isInRedundancyPair
public boolean isInRedundancyPair()
- Specified by:
isInRedundancyPair
in interfaceIPushPublishHTTPGroupMember
-
createGroupPlaylist
public ManifestModel createGroupPlaylist(String id, java.util.List<java.util.List<IPushPublishHTTPGroupMember>> groupingsByRedundantPairs, java.util.List<java.util.List<IPushPublishHTTPGroupMember>> groupingsByAbrGroups, IApplicationInstance appInstance, String context, WMSProperties properties)
Description copied from interface:IPushPublishHTTPGroupMember
Creates a group playlist.- Specified by:
createGroupPlaylist
in interfaceIPushPublishHTTPGroupMember
- Parameters:
id
- the idgroupingsByRedundantPairs
- the renditions grouped by redundant pairsgroupingsByAbrGroups
- the renditions grouped by redundant ABR groupproperties
- the properties- Returns:
- the manifest model
-
sendGroupPlaylist
public void sendGroupPlaylist(String groupName, ManifestModel manifest)
Description copied from interface:IPushPublishHTTPGroupMember
Sends a group playlist to the destination.- Specified by:
sendGroupPlaylist
in interfaceIPushPublishHTTPGroupMember
- Parameters:
groupName
- the group namemanifest
- the playlist/manifest to send
-
getGroupPlaylistRenditionDescription
public String getGroupPlaylistRenditionDescription(boolean forABRPlaylist)
Description copied from interface:IPushPublishHTTPGroupMember
Generates a description or playlist-element String which can be used to differentiate this rendition from other renditions in a group. The group playlist could either for a single stream being pushed redundantly to a primary & backup destination, or for an ABR group of streams being pushed to a single destination or being pushed redundantly to multiple destinations.- Specified by:
getGroupPlaylistRenditionDescription
in interfaceIPushPublishHTTPGroupMember
- Parameters:
forABRPlaylist
- flag to indicate whether the description is for an adaptive bitrate group playlist.
-
isGroupReady
public Boolean isGroupReady(java.util.List<java.util.List<IPushPublishHTTPGroupMember>> groupingsByRedundantPairs, java.util.List<java.util.List<IPushPublishHTTPGroupMember>> groupingsByAbrGroups)
- Specified by:
isGroupReady
in interfaceIPushPublishHTTPGroupMember
-
adaptiveGroupPlaylistNeedsUpdating
public Boolean adaptiveGroupPlaylistNeedsUpdating(long lastUpdateTime, java.util.List<java.util.List<IPushPublishHTTPGroupMember>> groupingsByRedundantPairs, java.util.List<java.util.List<IPushPublishHTTPGroupMember>> groupingsByAbrGroups)
- Specified by:
adaptiveGroupPlaylistNeedsUpdating
in interfaceIPushPublishHTTPGroupMember
-
getPlaylistProperties
public WMSProperties getPlaylistProperties()
- Specified by:
getPlaylistProperties
in interfaceIPushPublishHTTPGroupMember
-
getRenditionsStr
public String getRenditionsStr()
-
setRenditionsStr
public void setRenditionsStr(String renditionsStr)
-
getLiveStreamPacketizerName
public String getLiveStreamPacketizerName()
- Specified by:
getLiveStreamPacketizerName
in interfaceIPushPublishHTTPOutputBuilder
-
getPacketizerLock
public Object getPacketizerLock(ILiveStreamPacketizer liveStreamPacketizer)
- Specified by:
getPacketizerLock
in interfaceIPushPublishHTTPOutputBuilder
-
getLastChunkId
public int getLastChunkId(ILiveStreamPacketizer liveStreamPacketizer)
- Specified by:
getLastChunkId
in interfaceIPushPublishHTTPOutputBuilder
-
getChunkDurationTarget
public int getChunkDurationTarget(ILiveStreamPacketizer liveStreamPacketizer)
- Specified by:
getChunkDurationTarget
in interfaceIPushPublishHTTPOutputBuilder
-
connect
public void connect()
- Specified by:
connect
in interfaceIPushPublish
-
disconnect
public void disconnect()
-
disconnect
public void disconnect(boolean hard)
- Specified by:
disconnect
in interfaceIPushPublish
-
getMessagesAttemptedCount
public long getMessagesAttemptedCount()
- Specified by:
getMessagesAttemptedCount
in interfaceIPushPublish
-
getMessagesRetriedCount
public long getMessagesRetriedCount()
- Specified by:
getMessagesRetriedCount
in interfaceIPushPublish
-
getMessagesFailedCount
public long getMessagesFailedCount()
- Specified by:
getMessagesFailedCount
in interfaceIPushPublish
-
resetConnection
public void resetConnection()
- Specified by:
resetConnection
in interfaceIPushPublish
-
getConnectedState
public int getConnectedState()
- Specified by:
getConnectedState
in interfaceIPushPublish
-
getRandomSessionStr
public String getRandomSessionStr()
Gets a random session string that lives for the life time of the currently published stream. If the stream times out or drops for one reason or another, this will return a new session string.- Returns:
- String contianing a unique string to the incoming stream
-
getDestionationLogData
public abstract String getDestionationLogData()
Get a JSON formatted string of data that represents the destination to include with the connect/disconnect logging- Specified by:
getDestionationLogData
in interfaceIPushPublishHTTPCupertino
- Returns:
- JSON formatted string representation
-
printPlaylist
public String printPlaylist(PlaylistModel playlist)
Will print the provided playlist to a String. Intended as a debug tool- Parameters:
playlist
- to print to a String- Returns:
- String containing the text based representation of the playlist (not UTF-8 encoded)
-
createTag
protected TagModel createTag(Class<? extends TagModel> clazz)
Create a TagModel of the provided TagModel- Parameters:
clazz
- Class of the TagModel to create- Returns:
- a new instance of the TagModel requested
-
addTagToPlaylist
protected void addTagToPlaylist(PlaylistModel playlist, TagModel tag)
Adds the provided TagModel to the end of the list of TagModels for the provided Playlist Model- Parameters:
playlist
- to add the TagModel totag
- to add to the playlist
-
addTagToPlaylist
protected void addTagToPlaylist(PlaylistModel playlist, int idx, TagModel tag)
Adds the provided TagModel to the list of TagModels at the idx for the provided Playlist Model- Parameters:
playlist
- to add the TagModel toidx
- index where to insert the TagModel attag
- Model to insert into the list of TagModels
-
createMasterPlaylist
protected PlaylistModel createMasterPlaylist(com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerApplicationContextCupertinoStreamer appContext)
Creates a master playlist and propagates the context string from this implementation to the returned playlist model- Parameters:
appContext
-- Returns:
- a new master playlist
-
createMediaPlaylist
protected PlaylistModel createMediaPlaylist(int rIndex)
Creates a empty media playlist and propagates the context from this implemenation to the returned playlist- Returns:
- a new media playlist
-
createMediaSegmentModel
protected MediaSegmentModel createMediaSegmentModel()
Creates an empty media segment model and propagates the context from the implementation to the returnd media segment model- Returns:
- media segment model
-
writeTagToString
protected String writeTagToString(TagModel tag)
Writes the tag contents out to a string in UTF-8 encoding to a String- Parameters:
tag
- to be encoded- Returns:
- String containing the tag contents for use in a playlist
-
createStreamInfTag
protected TagModel createStreamInfTag(int rendition, com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerApplicationContextCupertinoStreamer appContext, ILiveStreamPacketizerCupertino liveStreamPacketizer)
-
renditionToPacketizerRendition
protected int renditionToPacketizerRendition(int rendition)
-
renditionToRenditionIndex
protected int renditionToRenditionIndex(int rendition)
-
renditionIndexToRendition
protected int renditionIndexToRendition(int renditionIndex)
-
getMediaPlaylistPlaybackURL
public String getMediaPlaylistPlaybackURL(int rendition)
-
isRendition
protected boolean isRendition(int rendition)
-
setLiveStreamPacketizer
protected void setLiveStreamPacketizer(ILiveStreamPacketizer liveStreamPacketizer)
- Overrides:
setLiveStreamPacketizer
in classPushPublishHTTPBase
-
getLiveStreamPacketizerCupertino
protected ILiveStreamPacketizerCupertino getLiveStreamPacketizerCupertino(ILiveStreamPacketizer liveStreamPacketizer)
-
-