Class LiveStreamPacketizerCupertinoUtils
- Object
-
- com.wowza.wms.httpstreamer.cupertinostreaming.util.LiveStreamPacketizerCupertinoUtils
-
public class LiveStreamPacketizerCupertinoUtils extends Object
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description LiveStreamPacketizerCupertinoUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
appendUserManifestHeaders(StringBuffer strBuf, LiveStreamPacketizerCupertinoChunk chunk)
static int
chunkFilenameToStreamMode(String filename)
static String
codecInfoAudioToCodecsStr(com.wowza.wms.media.model.MediaCodecInfoAudio codecInfoAudio)
static String
codecInfoAudioToCodecsStr(com.wowza.wms.media.model.MediaCodecInfoAudio codecInfoAudio, int codecStrFormatId)
static String
codecInfoVideoToCodecsStr(int codec, int profile, int level, int codecStrFormatId)
static String
codecInfoVideoToCodecsStr(int codec, int profile, int level, int codecStrFormatId, boolean forceH264BaselineProfile)
static String
codecInfoVideoToCodecsStr(com.wowza.wms.media.model.MediaCodecInfoVideo codecInfoVideo, int codecStrFormatId)
static String
codecInfoVideoToCodecsStr(com.wowza.wms.media.model.MediaCodecInfoVideo codecInfoVideo, int codecStrFormatId, boolean forceH264BaselineProfile)
static String
codecInfoVideoToCodecsStr(String codecStr, int codecStrFormatId)
static String
codecInfoVideoToResolutionStr(com.wowza.wms.media.model.MediaCodecInfoVideo codecInfoVideo)
static java.util.Map<String,java.util.Map<String,String>>
createUserManifestHeaderMapFromString(String userManifestHeaders)
static String
createUserManifestParameterString(java.util.Map<String,String> encUserParams)
static java.util.Map<String,java.util.Map<String,String>>
deepCopyUserManifestHeaders(java.util.Map<String,java.util.Map<String,String>> userManifestHeaders)
static void
encryptChunk(LiveStreamPacketizerCupertinoChunk chunk, ICupertinoEncryptor encryptor)
static void
encryptChunk2(LiveStreamPacketizerCupertinoChunk chunk, com.wowza.wms.httpstreamer.cupertinostreaming.util.CupertinoEncInfo encInfo)
static long
floatingPointToWholeNumberDuration(double seconds)
static com.wowza.wms.httpstreamer.cupertinostreaming.util.CupertinoEncInfo
getEncInfo(IApplicationInstance appInstance, String streamName)
static boolean
isValidAudioCodec(int codec)
static boolean
isValidVideoCodec(int codec)
static void
mergeUserManifestHeaders(java.util.Map<String,java.util.Map<String,String>> dst, java.util.Map<String,java.util.Map<String,String>> src)
static int
millisToSecondsCeilDuration(long millis)
static int
millisToSecondsDuration(long millis)
static long
segmentFilenameToIndex(String filename)
static String
segmentFilenameToIndexStr(String filename)
static String
streamModeToFileExtension(int streamMode)
-
-
-
Field Detail
-
initProvider
public static boolean initProvider
-
CODEC_H264_ID
public static final String CODEC_H264_ID
- See Also:
- Constant Field Values
-
PROGRAMDATETIME_DATEFORMAT
public static final String PROGRAMDATETIME_DATEFORMAT
- See Also:
- Constant Field Values
-
CRLF_STR
public static final String CRLF_STR
- See Also:
- Constant Field Values
-
EMPTYPLAYLISTSTR
public static final String EMPTYPLAYLISTSTR
- See Also:
- Constant Field Values
-
PLAYLISTSTARTSTR
public static final String PLAYLISTSTARTSTR
- See Also:
- Constant Field Values
-
EXTXVERSIONPLACEHOLDER
public static final String EXTXVERSIONPLACEHOLDER
- See Also:
- Constant Field Values
-
EXTXVERSIONSTR
public static final String EXTXVERSIONSTR
- See Also:
- Constant Field Values
-
PLAYLISTSTOPSTR
public static final String PLAYLISTSTOPSTR
- See Also:
- Constant Field Values
-
PLAYLISTTARGETDURATIONSTR
public static final String PLAYLISTTARGETDURATIONSTR
- See Also:
- Constant Field Values
-
PLAYLISTINDEPENDENTSEGMENTSSTR
public static final String PLAYLISTINDEPENDENTSEGMENTSSTR
- See Also:
- Constant Field Values
-
PLAYLISTIFRAMESONLY
public static final String PLAYLISTIFRAMESONLY
- See Also:
- Constant Field Values
-
PLAYLISTMEDIASEQSTR
public static final String PLAYLISTMEDIASEQSTR
- See Also:
- Constant Field Values
-
PLAYLISTDISCONTINUITYSEQSTR
public static final String PLAYLISTDISCONTINUITYSEQSTR
- See Also:
- Constant Field Values
-
PLAYLISTITEMSTR
public static final String PLAYLISTITEMSTR
- See Also:
- Constant Field Values
-
CACHECONTROLSTR
public static final String CACHECONTROLSTR
- See Also:
- Constant Field Values
-
PLAYLISTPLAYLISTTYPESTR
public static final String PLAYLISTPLAYLISTTYPESTR
- See Also:
- Constant Field Values
-
PLAYLISTSTART
public static final String PLAYLISTSTART
- See Also:
- Constant Field Values
-
PLAYLISTBYTERANGE
public static final String PLAYLISTBYTERANGE
- See Also:
- Constant Field Values
-
PLAYLISTSTREAMINF
public static final String PLAYLISTSTREAMINF
- See Also:
- Constant Field Values
-
PLAYLISTIFRAMESTREAMINF
public static final String PLAYLISTIFRAMESTREAMINF
- See Also:
- Constant Field Values
-
PLAYLISTMEDIA
public static final String PLAYLISTMEDIA
- See Also:
- Constant Field Values
-
PLAYLIST_GROUPID_AUDIO
public static final String PLAYLIST_GROUPID_AUDIO
- See Also:
- Constant Field Values
-
PLAYLIST_GROUPID_VIDEO
public static final String PLAYLIST_GROUPID_VIDEO
- See Also:
- Constant Field Values
-
DOMAINPLACHOLDER
public static final String DOMAINPLACHOLDER
- See Also:
- Constant Field Values
-
HOSTPLACHOLDER
public static final String HOSTPLACHOLDER
- See Also:
- Constant Field Values
-
APPLICATIONPLACHOLDER
public static final String APPLICATIONPLACHOLDER
- See Also:
- Constant Field Values
-
APPINSTANCEPLACHOLDER
public static final String APPINSTANCEPLACHOLDER
- See Also:
- Constant Field Values
-
STREAMPLACHOLDER
public static final String STREAMPLACHOLDER
- See Also:
- Constant Field Values
-
FILENAMEPLACHOLDER
public static final String FILENAMEPLACHOLDER
- See Also:
- Constant Field Values
-
INDEXPLACHOLDER
public static final String INDEXPLACHOLDER
- See Also:
- Constant Field Values
-
EXTPLACEHOLDER
public static final String EXTPLACEHOLDER
- See Also:
- Constant Field Values
-
QUERYSTRPLACHOLDER
public static final String QUERYSTRPLACHOLDER
- See Also:
- Constant Field Values
-
RESOLUTIONPLACEHOLDER
public static final String RESOLUTIONPLACEHOLDER
- See Also:
- Constant Field Values
-
RESOLUTIONWIDTHPLACEHOLDER
public static final String RESOLUTIONWIDTHPLACEHOLDER
- See Also:
- Constant Field Values
-
RESOLUTIONHEIGHTPLACEHOLDER
public static final String RESOLUTIONHEIGHTPLACEHOLDER
- See Also:
- Constant Field Values
-
RENDITIONPLACHOLDER
public static final String RENDITIONPLACHOLDER
- See Also:
- Constant Field Values
-
LANGUAGEPLACHOLDER
public static final String LANGUAGEPLACHOLDER
- See Also:
- Constant Field Values
-
TITLEPLACHOLDER
public static final String TITLEPLACHOLDER
- See Also:
- Constant Field Values
-
PLAYSTARTPLACEHOLDER
public static final String PLAYSTARTPLACEHOLDER
- See Also:
- Constant Field Values
-
PLAYDURATIONPLACEHOLDER
public static final String PLAYDURATIONPLACEHOLDER
- See Also:
- Constant Field Values
-
PLAYSEEKPLACEHOLDER
public static final String PLAYSEEKPLACEHOLDER
- See Also:
- Constant Field Values
-
NGRPEPLACHOLDER
public static final String NGRPEPLACHOLDER
- See Also:
- Constant Field Values
-
ENCKEYPLACEHOLDERPLACHOLDER
public static final String ENCKEYPLACEHOLDERPLACHOLDER
- See Also:
- Constant Field Values
-
ENCMETHODPLACEHOLDERPLACHOLDER
public static final String ENCMETHODPLACEHOLDERPLACHOLDER
- See Also:
- Constant Field Values
-
ENCIVPLACEHOLDER
public static final String ENCIVPLACEHOLDER
- See Also:
- Constant Field Values
-
ENCPLAYREADYHEADERPLACEHOLDER
public static final String ENCPLAYREADYHEADERPLACEHOLDER
- See Also:
- Constant Field Values
-
SESSIONIDPLACEHOLDER
public static final String SESSIONIDPLACEHOLDER
- See Also:
- Constant Field Values
-
DVRPLACEHOLDER
public static final String DVRPLACEHOLDER
- See Also:
- Constant Field Values
-
SECURETOKENPLACEHOLDER
public static final String SECURETOKENPLACEHOLDER
- See Also:
- Constant Field Values
-
CAPTIONFILEPLACEHOLDER
public static final String CAPTIONFILEPLACEHOLDER
- See Also:
- Constant Field Values
-
PARAMETERDELIMITERKEY
public static final String PARAMETERDELIMITERKEY
- See Also:
- Constant Field Values
-
DVRKEY
public static final String DVRKEY
- See Also:
- Constant Field Values
-
PLAYSTARTKEY
public static final String PLAYSTARTKEY
- See Also:
- Constant Field Values
-
PLAYDURATIONKEY
public static final String PLAYDURATIONKEY
- See Also:
- Constant Field Values
-
PLAYSEEKKEY
public static final String PLAYSEEKKEY
- See Also:
- Constant Field Values
-
SESSIONIDKEY
public static final String SESSIONIDKEY
- See Also:
- Constant Field Values
-
BITRATEKEY
public static final String BITRATEKEY
- See Also:
- Constant Field Values
-
NGRPKEY
public static final String NGRPKEY
- See Also:
- Constant Field Values
-
AUDIOONLYKEY
public static final String AUDIOONLYKEY
- See Also:
- Constant Field Values
-
VIDEOONLYKEY
public static final String VIDEOONLYKEY
- See Also:
- Constant Field Values
-
KEYFRAMEONLYKEY
public static final String KEYFRAMEONLYKEY
- See Also:
- Constant Field Values
-
LANGUAGEIDKEY
public static final String LANGUAGEIDKEY
- See Also:
- Constant Field Values
-
SYSTEMLANGUAGEIDKEY
public static final String SYSTEMLANGUAGEIDKEY
- See Also:
- Constant Field Values
-
TITLEKEY
public static final String TITLEKEY
- See Also:
- Constant Field Values
-
SECURETOKENKEY
public static final String SECURETOKENKEY
- See Also:
- Constant Field Values
-
CAPTIONFILEKEY
public static final String CAPTIONFILEKEY
- See Also:
- Constant Field Values
-
SEGMENTFORMATKEY
public static final String SEGMENTFORMATKEY
- See Also:
- Constant Field Values
-
INITIALIZTIONSEGMENTPREFIX
public static final String INITIALIZTIONSEGMENTPREFIX
- See Also:
- Constant Field Values
-
MEDIASEGMENTPREFIX
public static final String MEDIASEGMENTPREFIX
- See Also:
- Constant Field Values
-
ENCKEYSTR
public static final String ENCKEYSTR
- See Also:
- Constant Field Values
-
ENCKEYSTRWITHURI
public static final String ENCKEYSTRWITHURI
- See Also:
- Constant Field Values
-
ENCKEYSTRWITHIV
public static final String ENCKEYSTRWITHIV
- See Also:
- Constant Field Values
-
ENCKEYONLYSTR
public static final String ENCKEYONLYSTR
- See Also:
- Constant Field Values
-
ENCKEYURLSESSIONIDPLACEHOLDER
public static final String ENCKEYURLSESSIONIDPLACEHOLDER
- See Also:
- Constant Field Values
-
ENCPLAYREADYHEADER
public static final String ENCPLAYREADYHEADER
- See Also:
- Constant Field Values
-
ENCPLAYREADYHEADERMSFT
public static final String ENCPLAYREADYHEADERMSFT
- See Also:
- Constant Field Values
-
DISCONTINUITYSTR
public static final String DISCONTINUITYSTR
- See Also:
- Constant Field Values
-
PROGRAMDATETIMESTR
public static final String PROGRAMDATETIMESTR
- See Also:
- Constant Field Values
-
RESOLUTIONSTR
public static final String RESOLUTIONSTR
- See Also:
- Constant Field Values
-
CHUNKLISTNAMEPLACEHOLDER
public static final String CHUNKLISTNAMEPLACEHOLDER
- See Also:
- Constant Field Values
-
MEDIANAMEPLACEHOLDER
public static final String MEDIANAMEPLACEHOLDER
- See Also:
- Constant Field Values
-
BITRATEPLACEHOLDER
public static final String BITRATEPLACEHOLDER
- See Also:
- Constant Field Values
-
SEGMENTFORMATPLACEHOLDER
public static final String SEGMENTFORMATPLACEHOLDER
- See Also:
- Constant Field Values
-
FILENAMEBASEPATTERN
public static final String FILENAMEBASEPATTERN
- See Also:
- Constant Field Values
-
MEDIAFILENAMEPATTERN
public static final String MEDIAFILENAMEPATTERN
- See Also:
- Constant Field Values
-
CHUNKLISTFILENAMEPATTERN
public static final String CHUNKLISTFILENAMEPATTERN
- See Also:
- Constant Field Values
-
URLPATTERN
public static final String URLPATTERN
- See Also:
- Constant Field Values
-
URLPATTERN_RELATIVE
public static final String URLPATTERN_RELATIVE
- See Also:
- Constant Field Values
-
ENCMETHOD_DEFAULT
public static final String ENCMETHOD_DEFAULT
- See Also:
- Constant Field Values
-
SUBTITLELISTNAMEPLACEHOLDER
public static final String SUBTITLELISTNAMEPLACEHOLDER
- See Also:
- Constant Field Values
-
SUBTITLEBASEPATTERN
public static final String SUBTITLEBASEPATTERN
- See Also:
- Constant Field Values
-
SUBTITLELISTFILENAMEPATTERN
public static final String SUBTITLELISTFILENAMEPATTERN
- See Also:
- Constant Field Values
-
DEFAULT_MEDIANAME
public static final String DEFAULT_MEDIANAME
- See Also:
- Constant Field Values
-
DEFAULT_CHUNKLISTNAME
public static final String DEFAULT_CHUNKLISTNAME
- See Also:
- Constant Field Values
-
DEFAULT_EXT
public static final String DEFAULT_EXT
- See Also:
- Constant Field Values
-
DEFAULT_SUBTITLELISTNAME
public static final String DEFAULT_SUBTITLELISTNAME
- See Also:
- Constant Field Values
-
DEFAULT_SUBTITLECHUNKLISTNAME
public static final String DEFAULT_SUBTITLECHUNKLISTNAME
- See Also:
- Constant Field Values
-
DEFAULT_SUBTITLEGROUPNAME
public static final String DEFAULT_SUBTITLEGROUPNAME
- See Also:
- Constant Field Values
-
DEFAULT_CORS_ENABLED
public static final boolean DEFAULT_CORS_ENABLED
- See Also:
- Constant Field Values
-
-
Method Detail
-
streamModeToFileExtension
public static String streamModeToFileExtension(int streamMode)
-
segmentFilenameToIndex
public static long segmentFilenameToIndex(String filename)
-
segmentFilenameToIndexStr
public static String segmentFilenameToIndexStr(String filename)
-
encryptChunk
public static void encryptChunk(LiveStreamPacketizerCupertinoChunk chunk, ICupertinoEncryptor encryptor)
-
encryptChunk2
public static void encryptChunk2(LiveStreamPacketizerCupertinoChunk chunk, com.wowza.wms.httpstreamer.cupertinostreaming.util.CupertinoEncInfo encInfo)
-
getEncInfo
public static com.wowza.wms.httpstreamer.cupertinostreaming.util.CupertinoEncInfo getEncInfo(IApplicationInstance appInstance, String streamName)
-
mergeUserManifestHeaders
public static void mergeUserManifestHeaders(java.util.Map<String,java.util.Map<String,String>> dst, java.util.Map<String,java.util.Map<String,String>> src)
-
appendUserManifestHeaders
public static void appendUserManifestHeaders(StringBuffer strBuf, LiveStreamPacketizerCupertinoChunk chunk)
-
deepCopyUserManifestHeaders
public static java.util.Map<String,java.util.Map<String,String>> deepCopyUserManifestHeaders(java.util.Map<String,java.util.Map<String,String>> userManifestHeaders)
-
createUserManifestHeaderMapFromString
public static java.util.Map<String,java.util.Map<String,String>> createUserManifestHeaderMapFromString(String userManifestHeaders)
-
createUserManifestParameterString
public static String createUserManifestParameterString(java.util.Map<String,String> encUserParams)
-
millisToSecondsDuration
public static int millisToSecondsDuration(long millis)
-
floatingPointToWholeNumberDuration
public static long floatingPointToWholeNumberDuration(double seconds)
-
millisToSecondsCeilDuration
public static int millisToSecondsCeilDuration(long millis)
-
codecInfoVideoToResolutionStr
public static String codecInfoVideoToResolutionStr(com.wowza.wms.media.model.MediaCodecInfoVideo codecInfoVideo)
-
chunkFilenameToStreamMode
public static int chunkFilenameToStreamMode(String filename)
-
codecInfoAudioToCodecsStr
public static String codecInfoAudioToCodecsStr(com.wowza.wms.media.model.MediaCodecInfoAudio codecInfoAudio)
-
codecInfoAudioToCodecsStr
public static String codecInfoAudioToCodecsStr(com.wowza.wms.media.model.MediaCodecInfoAudio codecInfoAudio, int codecStrFormatId)
-
codecInfoVideoToCodecsStr
public static String codecInfoVideoToCodecsStr(com.wowza.wms.media.model.MediaCodecInfoVideo codecInfoVideo, int codecStrFormatId)
-
codecInfoVideoToCodecsStr
public static String codecInfoVideoToCodecsStr(int codec, int profile, int level, int codecStrFormatId)
-
codecInfoVideoToCodecsStr
public static String codecInfoVideoToCodecsStr(int codec, int profile, int level, int codecStrFormatId, boolean forceH264BaselineProfile)
-
codecInfoVideoToCodecsStr
public static String codecInfoVideoToCodecsStr(String codecStr, int codecStrFormatId)
-
codecInfoVideoToCodecsStr
public static String codecInfoVideoToCodecsStr(com.wowza.wms.media.model.MediaCodecInfoVideo codecInfoVideo, int codecStrFormatId, boolean forceH264BaselineProfile)
-
isValidVideoCodec
public static boolean isValidVideoCodec(int codec)
-
isValidAudioCodec
public static boolean isValidAudioCodec(int codec)
-
-