Interface ILiveStreamPacketizer
- All Known Subinterfaces:
IDvrStreamManager,ILiveStreamPacketizerCupertino
- All Known Implementing Classes:
com.wowza.wms.stream.livepacketizer.LiveStreamPacketizerBase,LiveStreamPacketizerCupertino,LiveStreamPacketizerMPEGDash
public interface ILiveStreamPacketizer
ILiveStreamPacketizer: live stream packetizer interface.
-
Method Summary
Modifier and TypeMethodDescriptiongetAndSetStartStream(IMediaStream stream) Get the current stream that is being packetizedGet the application instance associated with this live stream packetizer.intGet the live stream packetizer iddefault intreturns the minimum number of segments that must be available in a live manifestGet propertieslongGet the sequence number of the last added repeater itemintReturns the duration in milliseconds of the segment else throws an UnsupportedOperationExceptiondefault longReturns the start timecode for the current chunk / segmentdefault longReturns the stop timecode for the current chunk / segmentdefault intReturns the session format that this packetizer generatesvoidhandlePacket(IMediaStream stream, AMFPacket packet) Called to handle an incoming packetvoidinit(String streamName, String packetizerName, IApplicationInstance appInstance, com.wowza.wms.stream.livepacketizer.LiveStreamPacketizerItem liveStreamPacketizerItem) Initialize live stream packetizerbooleanisActive()Is the live stream packetizer activebooleanTrue if audio is being packetizedbooleanTrue if data is being packetizedbooleanTrue if video is being packetizedbooleanIs this packetizer a live repeater edgevoidresetStream(IMediaStream stream) Called when something happens that forces the stream to resetdefault voidSends the last chunk or segmentvoidsetLiveStreamPacketizerId(int id) Set the live stream packetizer idvoidsetPacketizeAudio(boolean packetizeAudio) Set to true to packetize audiovoidsetPacketizeData(boolean packetizeVideo) Set to true to packetize datavoidsetPacketizeVideo(boolean packetizeVideo) Set to true to packetize videovoidsetRepeaterEdge(boolean isRepeaterEdge) Set is live repeater edgedefault voidsetSegmentStopKeyTimecode(long timecode) Sets chunkStopKeyTimecodePTS to a specific valuevoidshutdown()Called to shutdown the live stream packetizervoidstartStream(IMediaStream stream) Called when the stream startsvoidtouch(long timecode) Touch the stream to keep it active
-
Method Details
-
init
void init(String streamName, String packetizerName, IApplicationInstance appInstance, com.wowza.wms.stream.livepacketizer.LiveStreamPacketizerItem liveStreamPacketizerItem) Initialize live stream packetizer- Parameters:
streamName- stream namepacketizerName- packetizer nameappInstance- application instanceliveStreamPacketizerItem- live stream packetizer
-
shutdown
void shutdown()Called to shutdown the live stream packetizer -
isActive
boolean isActive()Is the live stream packetizer active- Returns:
- true if active
-
getProperties
WMSProperties getProperties()Get properties- Returns:
- properties
-
getRepeaterLastSeqence
long getRepeaterLastSeqence()Get the sequence number of the last added repeater item- Returns:
- sequence number
-
getLiveStreamPacketizerId
int getLiveStreamPacketizerId()Get the live stream packetizer id- Returns:
- live stream packetizer id
-
setLiveStreamPacketizerId
void setLiveStreamPacketizerId(int id) Set the live stream packetizer id- Parameters:
id-
-
handlePacket
Called to handle an incoming packet- Parameters:
stream- streampacket- packet
-
startStream
Called when the stream starts- Parameters:
stream- stream
-
resetStream
Called when something happens that forces the stream to reset- Parameters:
stream- stream
-
touch
void touch(long timecode) Touch the stream to keep it active- Parameters:
timecode- timecode of touch in milliseconds
-
isRepeaterEdge
boolean isRepeaterEdge()Is this packetizer a live repeater edge- Returns:
- true if live repeater edge
-
setRepeaterEdge
void setRepeaterEdge(boolean isRepeaterEdge) Set is live repeater edge- Parameters:
isRepeaterEdge- is live repeater edge
-
isPacketizeAudio
boolean isPacketizeAudio()True if audio is being packetized- Returns:
- True if audio is being packetized
-
setPacketizeAudio
void setPacketizeAudio(boolean packetizeAudio) Set to true to packetize audio- Parameters:
packetizeAudio- true to packetize audio
-
isPacketizeVideo
boolean isPacketizeVideo()True if video is being packetized- Returns:
- True if video is being packetized
-
setPacketizeVideo
void setPacketizeVideo(boolean packetizeVideo) Set to true to packetize video- Parameters:
packetizeVideo- true to packetize video
-
isPacketizeData
boolean isPacketizeData()True if data is being packetized- Returns:
- True if data is being packetized
-
setPacketizeData
void setPacketizeData(boolean packetizeVideo) Set to true to packetize data- Parameters:
packetizeVideo- true to packetize data
-
getAndSetStartStream
Get the current stream that is being packetized- Returns:
- stream
-
getApplicationInstance
IApplicationInstance getApplicationInstance()Get the application instance associated with this live stream packetizer.- Returns:
- application instance
-
getSegmentDurationTarget
int getSegmentDurationTarget()Returns the duration in milliseconds of the segment else throws an UnsupportedOperationException- Returns:
-
sendLastData
default void sendLastData()Sends the last chunk or segment -
getSessionFormat
default int getSessionFormat()Returns the session format that this packetizer generates- Returns:
- a IHTTPStreamerSession.SESSIONFORMAT*
-
getSegmentStartKeyTimecode
default long getSegmentStartKeyTimecode()Returns the start timecode for the current chunk / segment- Returns:
- chunkStartKeyTimecodePTS or -1 if not implemented
-
getSegmentStopKeyTimecode
default long getSegmentStopKeyTimecode()Returns the stop timecode for the current chunk / segment- Returns:
- chunkStopKeyTimecodePTS or -1 if not implemented
-
setSegmentStopKeyTimecode
Sets chunkStopKeyTimecodePTS to a specific value- Parameters:
timecode- - new value for chunkStopKeyTimecodePTS, must be greater than chunkStartKeyTimecodePTS- Throws:
IllegalArgumentException- if timecode <= chunkStartKeyTimecodePTS
-
getMinPlaylistSegmentCount
default int getMinPlaylistSegmentCount()returns the minimum number of segments that must be available in a live manifest- Returns:
- minPlaylistSegmentCount or -1 if not implemented
-