Package com.wowza.wms.pushpublish.model
Class PushPublishHTTPBase
- Object
-
- com.wowza.wms.pushpublish.model.PushPublishBase
-
- com.wowza.wms.pushpublish.model.PushPublishHTTPBase
-
- All Implemented Interfaces:
IPushPublish
- Direct Known Subclasses:
PushPublishHTTPCupertino
,PushPublishHTTPYouTubeBase
public abstract class PushPublishHTTPBase extends PushPublishBase
-
-
Field Summary
Fields Modifier and Type Field Description static Float
CACHE_CONTROL_FACTOR
static String
CACHE_CONTROL_HEADER
static String
CACHE_CONTROL_HEADER_KEY
static String
CACHE_CONTROL_HEADER_NONE
static Integer
CACHE_CONTROL_MEDIA_DEFAULT
Cache Control header constants, used in push publish file cache control .e.g Cloud Storage ( S3, Azure, GCS )protected boolean
httpLogManifests
Enables logging of the manifest itself.protected boolean
httpManifestDebug
Enables manifest playlist debug logging.protected static int
INDETERMINATE_PLAYLIST_COUNT
protected int
maxSegmentCountFromMap
The max segment count from PushPublishMap.txt.protected int
maxSegmentCountFromPacketizer
The max segment count used by the associated live stream packetizer.protected static int
MIN_PLAYLIST_COUNT
The minimum allowable playlist size.protected boolean
playlistAcrossSessions
Indicates whether instance-specific playlists should be maintained across source stream interruptions and app restarts.protected String
playlistBaseUrl
base url to use in playlist/manifestprotected int
playlistCountFromMap
The playlist size from the map entry.protected int
playlistCountFromPacketizer
The playlist size used by the associated live stream packetizer.protected String
playlistCrossName
The instance-specific name for the playlist, allowing the playlist to be maintained across session restarts.protected long
playlistDurationFromMap
The playlist duration from the map entry.protected PushPublishHTTPPlaylistMap
playlistMap
The playlist map.protected String
playlistName
The actual name of playlist file that is to be pushed to the destination (e.g.protected int
playlistTimeout
The timeout value used to delete orphaned playlists from the vhost.protected boolean
relativePlaylists
use only relative URL references in the playlist/manifest.-
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
-
-
Constructor Summary
Constructors Constructor Description PushPublishHTTPBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAdaptiveGroupName()
int
getMaxSegmentCount()
String
getPlaylistBaseUrl()
int
getPlaylistCount()
Get the playlist count.PushPublishHTTPPlaylistMap
getPlaylistMap()
Get the playlist map.int
getPlaylistTimeout()
Get the playlist timeout value.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
isInAdaptiveGroup()
Is the entry in an adaptive group.boolean
isLogDebugManifest()
Get the current setting of the HTTP Manifest debug logging This is controlled by the pushPublishHTTPPlayListDebug boolean property in the application.xml and by the http.manifestDebug setting in the pushpublish map fileboolean
isPlaylistAcrossSessions()
Is the playlist maintained across recurring pushpublish sessions.boolean
isRelativePlaylists()
void
load(java.util.HashMap<String,String> dataMap)
Loads map and profile parametersvoid
logDebugManifest(String methodName, String log)
Log the provided log str if the HTTP Manifest logging is enabledvoid
setAdaptiveGroupName(String adaptiveGroup)
protected void
setLiveStreamPacketizer(ILiveStreamPacketizer liveStreamPacketizer)
void
setMaxSegmentCountFromMap(int maxSegmentCountFromMap)
void
setMaxSegmentCountFromPacketizer(int maxSegmentCount)
void
setPlaylistAcrossSessions(boolean playlistAcrossSessions)
Set whether the playlist is maintained across recurring pushpublish sessions.void
setPlaylistBaseUrl(String playlistBaseUrl)
void
setPlaylistCountFromMap(int playlistCountFromMap)
Set the playlist count value from the map file.void
setPlaylistCountFromPacketizer(int playlistCountFromPacketizer)
Set the playlist count value from the live stream packetizer.void
setPlaylistTimeout(int playlistTimeout)
Set the playlist timeout value.void
setRelativePlaylists(boolean relativePlaylists)
-
Methods inherited from class com.wowza.wms.pushpublish.model.PushPublishBase
add, addIOPerformance2, clearLoggingValues, createPushPublishSession, getAppInstance, getBandwidth, getBaseParams, getContextStr, 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.model.IPushPublish
connect, disconnect, getConnectedState, getMessagesAttemptedCount, getMessagesFailedCount, getMessagesRetriedCount, resetConnection
-
-
-
-
Field Detail
-
MIN_PLAYLIST_COUNT
protected static final int MIN_PLAYLIST_COUNT
The minimum allowable playlist size.- See Also:
- Constant Field Values
-
playlistCountFromPacketizer
protected int playlistCountFromPacketizer
The playlist size used by the associated live stream packetizer. How many segments to put in playlist
-
playlistCountFromMap
protected int playlistCountFromMap
The playlist size from the map entry.
-
maxSegmentCountFromPacketizer
protected int maxSegmentCountFromPacketizer
The max segment count used by the associated live stream packetizer. How many segments to hold for requests
-
maxSegmentCountFromMap
protected int maxSegmentCountFromMap
The max segment count from PushPublishMap.txt. How many segments to hold for requests
-
playlistMap
protected PushPublishHTTPPlaylistMap playlistMap
The playlist map.
-
playlistCrossName
protected String playlistCrossName
The instance-specific name for the playlist, allowing the playlist to be maintained across session restarts.
-
playlistName
protected String playlistName
The actual name of playlist file that is to be pushed to the destination (e.g. "playlist.m3u8").
-
relativePlaylists
protected boolean relativePlaylists
use only relative URL references in the playlist/manifest. If true baseUrl is ignored.
-
playlistBaseUrl
protected String playlistBaseUrl
base url to use in playlist/manifest
-
httpManifestDebug
protected boolean httpManifestDebug
Enables manifest playlist debug logging.
-
httpLogManifests
protected boolean httpLogManifests
Enables logging of the manifest itself.
-
INDETERMINATE_PLAYLIST_COUNT
protected static final int INDETERMINATE_PLAYLIST_COUNT
- See Also:
- Constant Field Values
-
playlistDurationFromMap
protected long playlistDurationFromMap
The playlist duration from the map entry. This value is in seconds. http.playlistDuration
-
playlistTimeout
protected int playlistTimeout
The timeout value used to delete orphaned playlists from the vhost.
-
playlistAcrossSessions
protected boolean playlistAcrossSessions
Indicates whether instance-specific playlists should be maintained across source stream interruptions and app restarts.
-
CACHE_CONTROL_MEDIA_DEFAULT
public static final Integer CACHE_CONTROL_MEDIA_DEFAULT
Cache Control header constants, used in push publish file cache control .e.g Cloud Storage ( S3, Azure, GCS )
-
CACHE_CONTROL_FACTOR
public static final Float CACHE_CONTROL_FACTOR
-
CACHE_CONTROL_HEADER_KEY
public static final String CACHE_CONTROL_HEADER_KEY
- See Also:
- Constant Field Values
-
CACHE_CONTROL_HEADER
public static final String CACHE_CONTROL_HEADER
- See Also:
- Constant Field Values
-
CACHE_CONTROL_HEADER_NONE
public static final String CACHE_CONTROL_HEADER_NONE
- See Also:
- Constant Field Values
-
-
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)
Inits the instance.- Specified by:
init
in interfaceIPushPublish
- Overrides:
init
in classPushPublishBase
- Parameters:
appInstance
- the app instancestreamName
- the source stream namemaps
- the map entry paramsprofileData
- the profile paramsstreamDebug
- stream debug flag
-
setPlaylistCountFromMap
public void setPlaylistCountFromMap(int playlistCountFromMap)
Set the playlist count value from the map file.- Parameters:
playlistCountFromMap
- the playlist count
-
setPlaylistCountFromPacketizer
public void setPlaylistCountFromPacketizer(int playlistCountFromPacketizer)
Set the playlist count value from the live stream packetizer.- Parameters:
playlistCountFromPacketizer
- the playlist count
-
setMaxSegmentCountFromMap
public void setMaxSegmentCountFromMap(int maxSegmentCountFromMap)
-
setMaxSegmentCountFromPacketizer
public void setMaxSegmentCountFromPacketizer(int maxSegmentCount)
-
getPlaylistCount
public int getPlaylistCount()
Get the playlist count. The value from the map file is returned if defined, else the packetizer value is returned return the playlist count
-
getMaxSegmentCount
public int getMaxSegmentCount()
-
getPlaylistTimeout
public int getPlaylistTimeout()
Get the playlist timeout value. return the playlist timeout value
-
setPlaylistTimeout
public void setPlaylistTimeout(int playlistTimeout)
Set the playlist timeout value.- Parameters:
playlistTimeout
- the playlist timeout
-
isPlaylistAcrossSessions
public boolean isPlaylistAcrossSessions()
Is the playlist maintained across recurring pushpublish sessions. return true if the playlist is maintained across recurring pushpublish sessions
-
setPlaylistAcrossSessions
public void setPlaylistAcrossSessions(boolean playlistAcrossSessions)
Set whether the playlist is maintained across recurring pushpublish sessions.- Parameters:
playlistAcrossSessions
- is the playlist maintained across recurring pushpublish sessions
-
getPlaylistMap
public PushPublishHTTPPlaylistMap getPlaylistMap()
Get the playlist map. return the playlist map
-
isRelativePlaylists
public boolean isRelativePlaylists()
-
setRelativePlaylists
public void setRelativePlaylists(boolean relativePlaylists)
-
getPlaylistBaseUrl
public String getPlaylistBaseUrl()
-
setPlaylistBaseUrl
public void setPlaylistBaseUrl(String playlistBaseUrl)
-
getAdaptiveGroupName
public String getAdaptiveGroupName()
-
setAdaptiveGroupName
public void setAdaptiveGroupName(String adaptiveGroup)
-
isInAdaptiveGroup
public boolean isInAdaptiveGroup()
Is the entry in an adaptive group. return true if the entry is in an adaptive group
-
load
public void load(java.util.HashMap<String,String> dataMap)
Loads map and profile parameters- Overrides:
load
in classPushPublishBase
- Parameters:
dataMap
- the data map
-
isLogDebugManifest
public boolean isLogDebugManifest()
Get the current setting of the HTTP Manifest debug logging This is controlled by the pushPublishHTTPPlayListDebug boolean property in the application.xml and by the http.manifestDebug setting in the pushpublish map file- Returns:
- true if HTTP Mainfest debug logging is enabled
-
logDebugManifest
public void logDebugManifest(String methodName, String log)
Log the provided log str if the HTTP Manifest logging is enabled- Parameters:
methodName
- name of the class method using the loglog
- string to log if enabled
-
setLiveStreamPacketizer
protected void setLiveStreamPacketizer(ILiveStreamPacketizer liveStreamPacketizer)
-
-