Class LiveStreamPacketizerMPEGDash
Object
com.wowza.wms.stream.livepacketizer.LiveStreamPacketizerBase
com.wowza.wms.httpstreamer.mpegdashstreaming.livestreampacketizer.LiveStreamPacketizerMPEGDash
- All Implemented Interfaces:
ILiveStreamPacketizer,com.wowza.wms.util.IIdleNotify,Runnable
public class LiveStreamPacketizerMPEGDash
extends com.wowza.wms.stream.livepacketizer.LiveStreamPacketizerBase
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected WMSPropertiesprotected intstatic final intprotected Classprotected Stringprotected booleanprotected CencInfoprotected booleanprotected intprotected Stringprotected Objectprotected booleanprotected intprotected intstatic final intprotected longprotected intprotected Stringprotected booleanprotected intstatic final Stringprotected intstatic final intprotected booleanprotected Stringprotected List<com.wowza.wms.httpstreamer.mpegdashstreaming.livestreampacketizer.MPEGDashRepeaterHolder>protected intprotected longprotected intstatic final intprotected com.wowza.wms.httpstreamer.mpegdashstreaming.livestreampacketizer.MPEGDashWriterHandlerprotected com.wowza.wms.httpstreamer.mpegdashstreaming.livestreampacketizer.MPEGDashWriterHandlerprotected IMediaStreamprotected intstatic final intFields inherited from class com.wowza.wms.stream.livepacketizer.LiveStreamPacketizerBase
appInstance, captionDefaultLanguages, captionIngestType, captionsEnabled, captionUseStreamNameGroups, checkTimeoutInterval, DEFAULT_STREAMTIMEOUT, EVENT_PACKET, EVENT_RESETSTREAM, EVENT_STARTSTREAM, eventProcessCount, events, id, inProcessEvent, isActive, isRepeater, isRepeaterEdge, isRunning, lastCheckTime, lastEventProcessTC, lastStreamStartTime, lastStreamUpdate, liveStreamPacketizerItem, liveTimedTextProvider, maxEventCount, maxEventCountErrors, maxEventsPerRun, MAXEVENTSPERRUN, MEDIA_CHUNK_DURATION, packetizeAudio, packetizeData, packetizerName, packetizeVideo, properties, runnerLock, startStream, streamName, streamStartupTimeout, streamTimeout, timeoutLock -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPacket(com.wowza.wms.httpstreamer.model.ContentPackaging contentPackaging, com.wowza.wms.httpstreamer.model.LiveStreamPacketizerPacketHolder holder) voidaddRepeaterItem(com.wowza.wms.httpstreamer.mpegdashstreaming.livestreampacketizer.MPEGDashRepeaterHolder item) protected voidprotected voiddoResetStream(IMediaStream stream) voidendChunk(com.wowza.wms.httpstreamer.model.ContentPackaging contentPackaging, long endTimecode, long segmentChunkCount) voidendSegment(com.wowza.wms.httpstreamer.model.ContentPackaging contentPackaging, long endTimecodeVideo, long timecodeAudio) com.wowza.wms.httpstreamer.cmafstreaming.livestreampacketizer.CmafSegmentgetAudioInit(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat) getAudioMimeType(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat) com.wowza.wms.httpstreamer.cmafstreaming.livestreampacketizer.CmafSegmentgetAudioSegment(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat, long index) com.wowza.wms.httpstreamer.cmafstreaming.livestreampacketizer.CmafSegmentgetAudioSegmentByTime(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat, long time) getAudioSegmentFileExtString(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat) getAudioSegmentFormatString(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat) longlonglonglonglonglonglonglonglongintcom.wowza.wms.media.model.MediaCodecInfoAudiocom.wowza.wms.media.model.MediaCodecInfoVideocom.wowza.wms.httpstreamer.model.SegmentFormatintdoublegetLock()intlongintreturns the minimum number of segments that must be available in a live manifestintvoidgetRepeaterItemsMPEGDash(List<com.wowza.wms.httpstreamer.mpegdashstreaming.livestreampacketizer.MPEGDashRepeaterHolder> items, long seq) longGet the sequence number of the last added repeater itemintintintintintReturns the duration in milliseconds of the segment else throws an UnsupportedOperationExceptionstatic intgetSegmentDurationTarget(IApplicationInstance appInstance, String packetizer) longReturns the start timecode for the current chunk / segmentlongReturns the stop timecode for the current chunk / segmentcom.wowza.wms.httpstreamer.cmafstreaming.livestreampacketizer.CmafSegmentgetVideoInit(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat) getVideoMimeType(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat) com.wowza.wms.httpstreamer.cmafstreaming.livestreampacketizer.CmafSegmentgetVideoSegment(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat, long index) com.wowza.wms.httpstreamer.cmafstreaming.livestreampacketizer.CmafSegmentgetVideoSegmentByTime(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat, long time) getVideoSegmentFileExtString(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat) getVideoSegmentFormatString(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat) longlongvoidindexStream(com.wowza.wms.httpstreamer.mpegdashstreaming.file.HTTPStreamerMPEGDashLiveIndexItem indexItem) voidinit(String streamName, String packetizerName, IApplicationInstance appInstance, com.wowza.wms.stream.livepacketizer.LiveStreamPacketizerItem liveStreamPacketizerItem) Initialize live stream packetizervoidinternalHandlePacket(IMediaStream stream, AMFPacket packet) voidinternalResetStream(IMediaStream stream) voidinternalStartStream(IMediaStream stream) booleanbooleanbooleanprotected voidlogEdgeConfigWarning(String method, com.wowza.wms.httpstreamer.model.ContentPackaging contentPackaging) protected voidparseProps(IApplicationInstance appInstance) voidvoidvoidSends the last chunk or segmentvoidsetAudioCodec(int codecId) voidsetCodecInfoAudio(com.wowza.wms.media.model.MediaCodecInfoAudio codecInfoAudio) voidsetCodecInfoVideo(com.wowza.wms.media.model.MediaCodecInfoVideo codecInfoVideo) voidprotected voidsetEncryptionRepeaterBytes(CencInfo encInfo) voidsetMaxSegmentCount(int maxSegmentCount) voidsetPlaylistSegmentCount(int playlistSegmentCount) voidsetRandomizeMediaName(boolean randomizeMediaName) voidsetRepeaterSegmentCount(int repeaterSegmentCount) voidsetSegmentIdHandler(IHTTPStreamerMPEGDashLiveStreamPacketizerChunkIdHandler segmentIdHandler) voidsetSegmentStopKeyTimecode(long timecode) Sets chunkStopKeyTimecodePTS to a specific valuevoidsetVideoCodec(int codecId) voidstartChunk(com.wowza.wms.httpstreamer.model.ContentPackaging contentPackaging, long timecode, long timecodeUser, long segmentChunkNum) voidstartSegment(com.wowza.wms.httpstreamer.model.ContentPackaging contentPackaging, long segmentId, long segmentIdUser, int videoCodecId, int audioCodecId, long timecode, long timecodeUser, String originRepeaterContext, CencInfo encInfo) protected voidtrimRepeaterItems(long segmentIndex) updateCencInfo(long segmentId, com.wowza.wms.httpstreamer.model.ContentPackaging contentPackaging) Methods inherited from class com.wowza.wms.stream.livepacketizer.LiveStreamPacketizerBase
addPacketizerEvent, checkTimeout, getAndSetStartStream, getApplicationInstance, getCaptionProvider, getContextStr, getLiveStreamPacketizerId, getMaxEventCount, getProperties, getRepeaterItems, getRepeaterItemsSanJose, getStreamStartupTimeout, getStreamTimeout, handlePacket, initLiveCaptionIngestor, isActive, isCEA608IngestModuleInstalled, isPacketizeAudio, isPacketizeData, isPacketizeVideo, isRepeaterEdge, onIdle, resetStream, run, setLiveStreamPacketizerId, setMaxEventCount, setPacketizeAudio, setPacketizeData, setPacketizeVideo, setRepeaterEdge, setStreamStartupTimeout, setStreamTimeout, shutdown, startStream, touchMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.wowza.wms.stream.livepacketizer.ILiveStreamPacketizer
getSessionFormat
-
Field Details
-
PACKETIZER_NAME
- See Also:
-
MAXSEGMENTLOGCOUNT
public static final int MAXSEGMENTLOGCOUNT- See Also:
-
SEGMENTDURATIONTOLERANCE
public static final int SEGMENTDURATIONTOLERANCE- See Also:
-
PLAYSTARTTOLERANCE
public static final int PLAYSTARTTOLERANCE- See Also:
-
AUDIOGROUPCOUNT
public static final int AUDIOGROUPCOUNT- See Also:
-
WAITFORCODECTIME
public static final int WAITFORCODECTIME- See Also:
-
clazz
-
clazzName
-
appProps
-
segmentWriterHandler
protected com.wowza.wms.httpstreamer.mpegdashstreaming.livestreampacketizer.MPEGDashWriterHandler segmentWriterHandler -
segmentWriterHandlerToBeKilled
protected com.wowza.wms.httpstreamer.mpegdashstreaming.livestreampacketizer.MPEGDashWriterHandler segmentWriterHandlerToBeKilled -
lock
-
stream
-
audioCodecId
protected int audioCodecId -
videoCodecId
protected int videoCodecId -
randomSessionStr
-
randomizeMediaName
protected boolean randomizeMediaName -
originRepeaterContext
-
encInfo
-
minimumUpdatePeriod
protected long minimumUpdatePeriod -
enableHbbtvLiveProfile
protected boolean enableHbbtvLiveProfile -
additionalLiveProfiles
-
forceDisplaySizeToBeEven
protected boolean forceDisplaySizeToBeEven -
segmentIdHandler
-
segmentDurationTarget
protected int segmentDurationTarget -
maxSegmentCount
protected int maxSegmentCount -
playlistSegmentCount
protected int playlistSegmentCount -
repeaterSegmentCount
protected int repeaterSegmentCount -
minPlaylistSegmentCount
protected int minPlaylistSegmentCount -
repeaterSeq
protected long repeaterSeq -
repeaterItems
protected List<com.wowza.wms.httpstreamer.mpegdashstreaming.livestreampacketizer.MPEGDashRepeaterHolder> repeaterItems -
packagingWarningCtr
protected int packagingWarningCtr -
maxPackagingWarning
protected int maxPackagingWarning -
packagingWarning
protected boolean packagingWarning -
lastBogusSequence
protected int lastBogusSequence -
logRepeaterItems
protected boolean logRepeaterItems -
dataHandler
-
-
Constructor Details
-
LiveStreamPacketizerMPEGDash
public LiveStreamPacketizerMPEGDash() throws com.wowza.wms.server.LicensingException- Throws:
com.wowza.wms.server.LicensingException
-
-
Method Details
-
init
public void init(String streamName, String packetizerName, IApplicationInstance appInstance, com.wowza.wms.stream.livepacketizer.LiveStreamPacketizerItem liveStreamPacketizerItem) Description copied from interface:ILiveStreamPacketizerInitialize live stream packetizer- Specified by:
initin interfaceILiveStreamPacketizer- Overrides:
initin classcom.wowza.wms.stream.livepacketizer.LiveStreamPacketizerBase- Parameters:
streamName- stream namepacketizerName- packetizer nameappInstance- application instanceliveStreamPacketizerItem- live stream packetizer
-
parseProps
-
setEncryptionRepeaterBytes
-
updateCencInfo
public CencInfo updateCencInfo(long segmentId, com.wowza.wms.httpstreamer.model.ContentPackaging contentPackaging) -
getLock
- Returns:
- Packetizer's Lock or null if none
-
internalHandlePacket
- Specified by:
internalHandlePacketin classcom.wowza.wms.stream.livepacketizer.LiveStreamPacketizerBase
-
internalStartStream
- Specified by:
internalStartStreamin classcom.wowza.wms.stream.livepacketizer.LiveStreamPacketizerBase
-
internalResetStream
- Specified by:
internalResetStreamin classcom.wowza.wms.stream.livepacketizer.LiveStreamPacketizerBase
-
createWriterHandler
protected void createWriterHandler() -
doResetStream
-
sendLastData
public void sendLastData()Description copied from interface:ILiveStreamPacketizerSends the last chunk or segment -
getCalculatedAudioBitratePeak
public long getCalculatedAudioBitratePeak()- Returns:
- calculated audio bitrate peak
-
getCalculatedAudioBitrateAverage
public long getCalculatedAudioBitrateAverage()- Returns:
- calculated audio bitrate average
-
getCalculatedVideoBitratePeak
public long getCalculatedVideoBitratePeak()- Returns:
- calculated video bitrate peak
-
getCalculatedVideoBitrateAverage
public long getCalculatedVideoBitrateAverage()- Returns:
- calculated video bitrate average
-
getDefaultSegmentSetIndex
public int getDefaultSegmentSetIndex() -
getDefaultSegmentFormat
public com.wowza.wms.httpstreamer.model.SegmentFormat getDefaultSegmentFormat() -
indexStream
public void indexStream(com.wowza.wms.httpstreamer.mpegdashstreaming.file.HTTPStreamerMPEGDashLiveIndexItem indexItem) -
getSegmentCount
public int getSegmentCount() -
getSegmentCountVideo
public int getSegmentCountVideo() -
getSegmentCountAudio
public int getSegmentCountAudio() -
getFrameRate
public double getFrameRate() -
setAudioCodec
public void setAudioCodec(int codecId) -
setVideoCodec
public void setVideoCodec(int codecId) -
getVideoSegmentFormatString
public String getVideoSegmentFormatString(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat) -
getAudioSegmentFormatString
public String getAudioSegmentFormatString(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat) -
getVideoSegmentFileExtString
public String getVideoSegmentFileExtString(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat) -
getAudioSegmentFileExtString
public String getAudioSegmentFileExtString(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat) -
getAudioSegmentByTime
public com.wowza.wms.httpstreamer.cmafstreaming.livestreampacketizer.CmafSegment getAudioSegmentByTime(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat, long time) -
getVideoSegmentByTime
public com.wowza.wms.httpstreamer.cmafstreaming.livestreampacketizer.CmafSegment getVideoSegmentByTime(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat, long time) -
getAudioSegment
public com.wowza.wms.httpstreamer.cmafstreaming.livestreampacketizer.CmafSegment getAudioSegment(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat, long index) -
getVideoSegment
public com.wowza.wms.httpstreamer.cmafstreaming.livestreampacketizer.CmafSegment getVideoSegment(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat, long index) -
getAudioInit
public com.wowza.wms.httpstreamer.cmafstreaming.livestreampacketizer.CmafSegment getAudioInit(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat) -
getVideoInit
public com.wowza.wms.httpstreamer.cmafstreaming.livestreampacketizer.CmafSegment getVideoInit(com.wowza.wms.httpstreamer.model.SegmentFormat segmentFormat) -
getVideoMimeType
-
getAudioMimeType
-
getBitrateAudio
public long getBitrateAudio() -
getBitrateVideo
public long getBitrateVideo() -
getBitrate
public long getBitrate() -
getCodecInfoVideo
public com.wowza.wms.media.model.MediaCodecInfoVideo getCodecInfoVideo() -
setCodecInfoVideo
public void setCodecInfoVideo(com.wowza.wms.media.model.MediaCodecInfoVideo codecInfoVideo) -
getCodecInfoAudio
public com.wowza.wms.media.model.MediaCodecInfoAudio getCodecInfoAudio() -
setCodecInfoAudio
public void setCodecInfoAudio(com.wowza.wms.media.model.MediaCodecInfoAudio codecInfoAudio) -
startSegment
-
endSegment
public void endSegment(com.wowza.wms.httpstreamer.model.ContentPackaging contentPackaging, long endTimecodeVideo, long timecodeAudio) -
addPacket
public void addPacket(com.wowza.wms.httpstreamer.model.ContentPackaging contentPackaging, com.wowza.wms.httpstreamer.model.LiveStreamPacketizerPacketHolder holder) -
startChunk
public void startChunk(com.wowza.wms.httpstreamer.model.ContentPackaging contentPackaging, long timecode, long timecodeUser, long segmentChunkNum) -
endChunk
public void endChunk(com.wowza.wms.httpstreamer.model.ContentPackaging contentPackaging, long endTimecode, long segmentChunkCount) -
logEdgeConfigWarning
protected void logEdgeConfigWarning(String method, com.wowza.wms.httpstreamer.model.ContentPackaging contentPackaging) -
resetStream
public void resetStream() -
repeaterItemsMPEGDashflushed
public void repeaterItemsMPEGDashflushed() -
isRandomizeMediaName
public boolean isRandomizeMediaName() -
setRandomizeMediaName
public void setRandomizeMediaName(boolean randomizeMediaName) -
getDataHandler
-
setDataHandler
-
isPlaylistReady
public boolean isPlaylistReady() -
getVideoSegmentIdFirst
public long getVideoSegmentIdFirst() -
getAudioSegmentIdFirst
public long getAudioSegmentIdFirst() -
getVideoSegmentIdLast
public long getVideoSegmentIdLast() -
getAudioSegmentIdLast
public long getAudioSegmentIdLast() -
getRandomSessionStr
-
getSegmentDurationTarget
public int getSegmentDurationTarget()Description copied from interface:ILiveStreamPacketizerReturns the duration in milliseconds of the segment else throws an UnsupportedOperationException- Specified by:
getSegmentDurationTargetin interfaceILiveStreamPacketizer- Overrides:
getSegmentDurationTargetin classcom.wowza.wms.stream.livepacketizer.LiveStreamPacketizerBase- Returns:
-
getChunkDurationTarget
public int getChunkDurationTarget()- Specified by:
getChunkDurationTargetin interfaceILiveStreamPacketizer- Overrides:
getChunkDurationTargetin classcom.wowza.wms.stream.livepacketizer.LiveStreamPacketizerBase
-
getStreamStartDate
-
getSegmentDurationTarget
-
getMinimumUpdatePeriod
public long getMinimumUpdatePeriod() -
isHbbtvLiveProfileEnabled
public boolean isHbbtvLiveProfileEnabled() -
getAdditionalLiveProfiles
-
getEncInfo
-
getSegmentIdHandler
-
setSegmentIdHandler
public void setSegmentIdHandler(IHTTPStreamerMPEGDashLiveStreamPacketizerChunkIdHandler segmentIdHandler) -
getMaxSegmentCount
public int getMaxSegmentCount() -
setMaxSegmentCount
public void setMaxSegmentCount(int maxSegmentCount) -
getPlaylistSegmentCount
public int getPlaylistSegmentCount() -
setPlaylistSegmentCount
public void setPlaylistSegmentCount(int playlistSegmentCount) -
getRepeaterSegmentCount
public int getRepeaterSegmentCount() -
setRepeaterSegmentCount
public void setRepeaterSegmentCount(int repeaterSegmentCount) -
addRepeaterItem
public void addRepeaterItem(com.wowza.wms.httpstreamer.mpegdashstreaming.livestreampacketizer.MPEGDashRepeaterHolder item) -
trimRepeaterItems
protected void trimRepeaterItems(long segmentIndex) -
getRepeaterLastSeqence
public long getRepeaterLastSeqence()Description copied from interface:ILiveStreamPacketizerGet the sequence number of the last added repeater item- Specified by:
getRepeaterLastSeqencein interfaceILiveStreamPacketizer- Overrides:
getRepeaterLastSeqencein classcom.wowza.wms.stream.livepacketizer.LiveStreamPacketizerBase- Returns:
- sequence number
-
getRepeaterItemsMPEGDash
public void getRepeaterItemsMPEGDash(List<com.wowza.wms.httpstreamer.mpegdashstreaming.livestreampacketizer.MPEGDashRepeaterHolder> items, long seq) -
getSegmentStartKeyTimecode
public long getSegmentStartKeyTimecode()Description copied from interface:ILiveStreamPacketizerReturns the start timecode for the current chunk / segment- Returns:
- chunkStartKeyTimecodePTS or -1 if not implemented
-
getSegmentStopKeyTimecode
public long getSegmentStopKeyTimecode()Description copied from interface:ILiveStreamPacketizerReturns the stop timecode for the current chunk / segment- Returns:
- chunkStopKeyTimecodePTS or -1 if not implemented
-
setSegmentStopKeyTimecode
Description copied from interface:ILiveStreamPacketizerSets chunkStopKeyTimecodePTS to a specific value- Parameters:
timecode- - new value for chunkStopKeyTimecodePTS, must be greater than chunkStartKeyTimecodePTS- Throws:
IllegalArgumentException- if timecode <= chunkStartKeyTimecodePTS
-
getMinPlaylistSegmentCount
public int getMinPlaylistSegmentCount()Description copied from interface:ILiveStreamPacketizerreturns the minimum number of segments that must be available in a live manifest- Returns:
- minPlaylistSegmentCount or -1 if not implemented
-