Interface IHTTPStreamerMPEGDashLivePacketizerDataHandler


  • public interface IHTTPStreamerMPEGDashLivePacketizerDataHandler
    Interface for MPEG-DASH live packetizer data events

    This interface provides access to segment start, end, data packet and media packet events when MPEG-DASH segments are being created.

    Example implementation

     public class Control extends ModuleBase
     {
    
            public void onAppStart(IApplicationInstance appInstance)
            {
                    appInstance.addLiveStreamPacketizerListener(new LiveStreamPacketizer());
            }
    
            class LiveStreamPacketizer implements ILiveStreamPacketizerActionNotify
            {
                    public void onLiveStreamPacketizerCreate(ILiveStreamPacketizer liveStreamPacketizer,
                                                    String streamName) { }
                    public void onLiveStreamPacketizerDestroy(ILiveStreamPacketizer liveStreamPacketizer) { }
                    public void onLiveStreamPacketizerInit(ILiveStreamPacketizer liveStreamPacketizer,
                                                    String streamName)
                    {
                            if ( liveStreamPacketizer instanceof LiveStreamPacketizerMPEGDash )
                            {
                                    LiveStreamPacketizerMPEGDash mpegdashPacketizer = (LiveStreamPacketizerMPEGDash)liveStreamPacketizer;
                                    mpegdashPacketizer.setDataHandler(new MPEGDashLivePacketizerDataHandler());
                            }
                    }
            }
    
            class MPEGDashLivePacketizerDataHandler implements IHTTPStreamerMPEGDashLivePacketizerDataHandler
            {
                    public void onFillSegmentStart(long startTimecode, long endTimecode, InbandEventStreams inbandEventStreams) { }
    
                    public void onFillSegmentEnd(long endTimecodeVideo, long endTimecodeAudio, InbandEventStreams inbandEventStreams) { }
    
                    public void onFillSegmentDataPacket(LiveStreamPacketizerPacketHolder holder, AMFPacket packet, InbandEventStreams inbandEventStreams) { }
    
                    public void onFillSegmentMediaPacket(LiveStreamPacketizerPacketHolder holder, AMFPacket packet) { }
            }
    
     }
     
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void onFillSegmentDataPacket​(com.wowza.wms.httpstreamer.model.LiveStreamPacketizerPacketHolder holder, AMFPacket packet, InbandEventStreams inbandEventStreams)
      This is called when a data packet is being processed.
      default void onFillSegmentDataPacket​(com.wowza.wms.httpstreamer.model.LiveStreamPacketizerPacketHolder holder, AMFPacket packet, InbandEventStreams inbandEventStreams, com.wowza.wms.httpstreamer.mpegdashstreaming.file.EventStream eventStream)
      This is called when a data packet is being processed.
      default void onFillSegmentEnd​(long endTimecodeVideo, long endTimecodeAudio, InbandEventStreams inbandEventStreams)
      This is called when a segment has been filled with data.
      default void onFillSegmentEnd​(long endTimecodeVideo, long endTimecodeAudio, InbandEventStreams inbandEventStreams, com.wowza.wms.httpstreamer.mpegdashstreaming.file.EventStream eventStream)
      This is called when a segment has been filled with data.
      default void onFillSegmentMediaPacket​(com.wowza.wms.httpstreamer.model.LiveStreamPacketizerPacketHolder holder, AMFPacket packet)
      This is called when a media packet is being processed.
      default void onFillSegmentStart​(long segmentId, long startTimecode, long endTimecode, InbandEventStreams inbandEventStreams, com.wowza.wms.httpstreamer.mpegdashstreaming.file.EventStream eventStream)  
      default void onFillSegmentStart​(long startTimecode, long endTimecode, InbandEventStreams inbandEventStreams)
      This is called when a segment is about to be filled with data.
      default void onFillSegmentStart​(long startTimecode, long endTimecode, InbandEventStreams inbandEventStreams, com.wowza.wms.httpstreamer.mpegdashstreaming.file.EventStream eventStream)
      This is called when a segment is about to be filled with data.
    • Method Detail

      • onFillSegmentStart

        default void onFillSegmentStart​(long startTimecode,
                                        long endTimecode,
                                        InbandEventStreams inbandEventStreams)
        This is called when a segment is about to be filled with data. At this point the data had been processed but there is no data in the segment.
        Parameters:
        startTimecode - the start time of the segment
        endTimecode - the end time of the segment
        inbandEventStreams - the MPEG-Dash inband event streams
      • onFillSegmentStart

        default void onFillSegmentStart​(long startTimecode,
                                        long endTimecode,
                                        InbandEventStreams inbandEventStreams,
                                        com.wowza.wms.httpstreamer.mpegdashstreaming.file.EventStream eventStream)
        This is called when a segment is about to be filled with data. At this point the data had been processed but there is no data in the segment.
        Parameters:
        startTimecode - the start time of the segment
        endTimecode - the end time of the segment
        inbandEventStreams - the MPEG-Dash inband event streams
        eventStream - the MPEG-Dash event streams
      • onFillSegmentStart

        default void onFillSegmentStart​(long segmentId,
                                        long startTimecode,
                                        long endTimecode,
                                        InbandEventStreams inbandEventStreams,
                                        com.wowza.wms.httpstreamer.mpegdashstreaming.file.EventStream eventStream)
      • onFillSegmentEnd

        default void onFillSegmentEnd​(long endTimecodeVideo,
                                      long endTimecodeAudio,
                                      InbandEventStreams inbandEventStreams)
        This is called when a segment has been filled with data.
        Parameters:
        endTimecodeVideo - segment end time of video
        endTimecodeAudio - segment end time of audio
        inbandEventStreams - the MPEG-Dash inband event streams
      • onFillSegmentEnd

        default void onFillSegmentEnd​(long endTimecodeVideo,
                                      long endTimecodeAudio,
                                      InbandEventStreams inbandEventStreams,
                                      com.wowza.wms.httpstreamer.mpegdashstreaming.file.EventStream eventStream)
        This is called when a segment has been filled with data.
        Parameters:
        endTimecodeVideo - segment end time of video
        endTimecodeAudio - segment end time of audio
        inbandEventStreams - the MPEG-Dash inband event streams
        eventStream - the MPEG-Dash event streams
      • onFillSegmentDataPacket

        default void onFillSegmentDataPacket​(com.wowza.wms.httpstreamer.model.LiveStreamPacketizerPacketHolder holder,
                                             AMFPacket packet,
                                             InbandEventStreams inbandEventStreams)
        This is called when a data packet is being processed. This provides access to the packet and InbandEventStreams and the emsgs contained within
        Parameters:
        holder - packet holder
        packet - AMF packet
        inbandEventStreams -
      • onFillSegmentDataPacket

        default void onFillSegmentDataPacket​(com.wowza.wms.httpstreamer.model.LiveStreamPacketizerPacketHolder holder,
                                             AMFPacket packet,
                                             InbandEventStreams inbandEventStreams,
                                             com.wowza.wms.httpstreamer.mpegdashstreaming.file.EventStream eventStream)
        This is called when a data packet is being processed. This provides access to the packet and InbandEventStreams and the emsgs contained within
        Parameters:
        holder - packet holder
        packet - AMF packet
        inbandEventStreams -
        eventStream - the MPEG-Dash event streams
      • onFillSegmentMediaPacket

        default void onFillSegmentMediaPacket​(com.wowza.wms.httpstreamer.model.LiveStreamPacketizerPacketHolder holder,
                                              AMFPacket packet)
        This is called when a media packet is being processed. This provides access to the packets being pushed into this segment from the stream.
        Parameters:
        holder - packet holder
        packet - AMF packet