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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description IMediaStream
getAndSetStartStream(IMediaStream stream)
Get the current stream that is being packetizedIApplicationInstance
getApplicationInstance()
Get the application instance associated with this live stream packetizer.int
getLiveStreamPacketizerId()
Get the live stream packetizer idWMSProperties
getProperties()
Get propertieslong
getRepeaterLastSeqence()
Get the sequence number of the last added repeater itemint
getSegmentDurationTarget()
Returns the duration in milliseconds of the segment else throws an UnsupportedOperationExceptiondefault long
getSegmentStartKeyTimecode()
Returns the start timecode for the current chunk / segmentdefault long
getSegmentStopKeyTimecode()
Returns the stop timecode for the current chunk / segmentdefault int
getSessionFormat()
Returns the session format that this packetizer generatesvoid
handlePacket(IMediaStream stream, AMFPacket packet)
Called to handle an incoming packetvoid
init(String streamName, String packetizerName, IApplicationInstance appInstance, com.wowza.wms.stream.livepacketizer.LiveStreamPacketizerItem liveStreamPacketizerItem)
Initialize live stream packetizerboolean
isActive()
Is the live stream packetizer activeboolean
isPacketizeAudio()
True if audio is being packetizedboolean
isPacketizeData()
True if data is being packetizedboolean
isPacketizeVideo()
True if video is being packetizedboolean
isRepeaterEdge()
Is this packetizer a live repeater edgevoid
resetStream(IMediaStream stream)
Called when something happens that forces the stream to resetdefault void
sendLastData()
Sends the last chunk or segmentvoid
setLiveStreamPacketizerId(int id)
Set the live stream packetizer idvoid
setPacketizeAudio(boolean packetizeAudio)
Set to true to packetize audiovoid
setPacketizeData(boolean packetizeVideo)
Set to true to packetize datavoid
setPacketizeVideo(boolean packetizeVideo)
Set to true to packetize videovoid
setRepeaterEdge(boolean isRepeaterEdge)
Set is live repeater edgedefault void
setSegmentStopKeyTimecode(long timecode)
Sets chunkStopKeyTimecodePTS to a specific valuevoid
shutdown()
Called to shutdown the live stream packetizervoid
startStream(IMediaStream stream)
Called when the stream startsvoid
touch(long timecode)
Touch the stream to keep it active
-
-
-
Method Detail
-
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
void handlePacket(IMediaStream stream, AMFPacket packet)
Called to handle an incoming packet- Parameters:
stream
- streampacket
- packet
-
startStream
void startStream(IMediaStream stream)
Called when the stream starts- Parameters:
stream
- stream
-
resetStream
void resetStream(IMediaStream stream)
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
IMediaStream getAndSetStartStream(IMediaStream stream)
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
default void setSegmentStopKeyTimecode(long timecode) throws IllegalArgumentException
Sets chunkStopKeyTimecodePTS to a specific value- Parameters:
timecode
- - new value for chunkStopKeyTimecodePTS, must be greater than chunkStartKeyTimecodePTS- Throws:
IllegalArgumentException
- if timecode <= chunkStartKeyTimecodePTS
-
-