Interface ILiveStreamPacketizer

    • 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 name
        packetizerName - packetizer name
        appInstance - application instance
        liveStreamPacketizerItem - 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 - stream
        packet - 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